Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

feng2088

Members
  • Content Count

    35
  • Joined

  • Last visited

Posts posted by feng2088


  1. Hello

     

    Does anyone know why I am getting this error message " FPInvalidException: Floating point invalid numbers in calculation" when I put in a number that's greater than 10 yrs for the data range on the Format Symbol window? The strategy works fine for any range that is less than or equal to 10 yrs.

     

    I know people usually get that error if their code has a divisor = 0, but my issue doesnt seem like it's caused by this.

     

    Thanks


  2. Wait a BIG minute....your slippage calculation is completely wrong. I used to make the same mistake in TS before I realized my mistake.

     

    In TS you can set the value for commissions and slippage in DOLLARS. With TS the commissions are $1.20 per contract, and my real time testing over many, many years and many, many contracts tells me to use the average bid-ask spread in DOLLARS as slippage.

     

    For the ES the average bid-ask spread is .25. This is NOT 25 cents! This is $12.50. If you don't get this right your entire system calculations will be incorrect.

     

    To correctly calculate the slippage you take the average bid-ask spread times the Big Point Value shown on the Symbol Properties page.

     

    I have a TS Radar Screen workspace that continuously calculates the average bid-ask spread in points and dollars for a variety of futures contracts and another workspace for stocks. You absolutely have to get this number correct, otherwise all your system testing will be bogus...

     

    One other thing, whenever I see these wonderful looking backtest results, they invariably leave out the drawdown stats. You have to have money management rules in place so that when you get drawdown you won't either go broke or get so scared and/or depressed that you stop trading. So, it's impossible for me to evaluate any system without knowing what level of drawdown to expect, and to adjust position size accordingly.

     

    Let's say you don't want to lose more than 10% of your portfolio value when you get large drawdown. This means you have to allow 10x the max intraday drawdown in dollars to trade one contract. Then, you look at your monthly or annual gains and divide that by the 10x drawdown value, and you'll get an idea of the true profitability of the system.

     

    Most novice traders don't do this, and most wipe out - it's almost guaranteed.

     

     

    eqsys, TS reads this $0.25 as a tick instead of 25 cents. A tick = $12.5. When I put $0.25 in that box, it would actually reduce my profit by $25 or increase my loss by $25 ($12.5 * 2 = $25 buy and sell) It doesn't matter if I have limit orders. Thats why I said it's not accurate as it should only apply this to market order.

     

    In regard to max drawdown, my # is a bit high since my initial investment is only $5000.

    Max. Drawdown (Trade Close to Trade Close) = -$1,051.66.16 or 21.03% of my initial 5k captial.

     

    Max. Drawdown (Intra-day Peak to Valley) = -$2,167.22 or 43.34% of my initial 5k captial. It happened on 11/7/08, however the acct had a 39k total net profit as of that day.

     

    I will definitely start with more than 5k real money, so the number will look better than this if I would be getting the same performance. I do respect risk and I use stoploss.

     

    Thank you all!

    3333.JPG.3371de0cf635d6fc0b4953ba4f91b9c8.JPG


  3. Hello guys,

     

    I designed a system using EasyLanguage that solely trades ES, however it makes less than 50 trades a year in average. I don't want to be charged for $100 platform fee and $20 data fee every month by TradeStation. Are there any cheaper brokers out there that support easylanguage. If no, how do your guys manage to pay less fees and commissions? Do you convert your codes to other languages and use a different broker?

     

    Also, I tried to make the test result look realistic..so I checked "Fill entire order when trade price exceeds limit price" (1st attachment), however I didn't apply any slippage to the market orders. If I put in $0.25, it will apply a tick of slippage to my limit orders as well which is not what I wanted. Does anyone have the same issue?

     

    Thanks

    33.JPG.563304100d7dc2ae6490a2eae6a33975.JPG

    11.JPG.943a636386af65ed166409b04c4c0370.JPG

    22.JPG.1a6bc2ad8f747b97da4e42109cd93428.JPG


  4. Did you perform any walk-forward or walk-backwards testing on your trading system?

     

    Meeting certain performance criteria on "out of sample" data should be one of your primary considerations before going live.

     

    It's not easy that's for sure.

     

    Best,

    Gabriel

     

    Do you mean to test the strategies by randomly picking a historical time period or using real live data? If yes, then I did. I can tell you that my strategies actually perform better in the past 5 yrs than in the past 10 yrs. I also observed how they traded with the real live data.

     

    When you refered to "out of sample" data, did you mean how well it can handle the contingency on crazy days like today ? My system did not generate any trades today. I know it's sad. It would be a nice ride. But since it gapped down "so much" at open, I think it's not worth to take the risk. Yup..some might think I am stupid.

     

    P.S.--I backtested them with @ES.D only and I incorporated a stoploss for every of my strategies.

     

    Thanks!


  5. Thanks again. What do you think the 5-year performance of my 3 strategies? You think I can go live yet? I started coding my strategies 4 months ago. I am still relatively new to automated trading. So I really wanted to know how other people do.. Thanks!

    setup.JPG.b0b31454694043c04d5e45b255bcd404.JPG

    5aa710963efdd_cyclicaltrend.JPG.4e31d499a6079ce035843429fa7aaf1a.JPG

    5aa7109643675_gaptrading.JPG.aed9c7e4cfd201882d5a938fb2a6a12c.JPG

    5aa7109647852_smalltrends.JPG.5bfb68540ddf2731fe18e79008669fa8.JPG


  6. Thanks UrmaBlume. So you are saying I don't physically need to open 3 accts if I wanna trade 3 strategies. All I need is to clone 2 accts and link them with the real acct? How do I do that? If I only have $6k in my acct, is it still doable? Thanks again


  7. Thank you guys!

     

    MightyMouse: I am actually trading counter to the main trend. I back tested the system with 5-yrs historical data. The profit factor was about 2 and percent profitable was about 80%. I observed the chart and most of the time my order did get filled. However I still want to limit the risk. I believe closing the entire position if I don't get filled on all the contracts of my target is the best option for me.

     

    Tams: not sure if you are quant trader, but you are smart as hell in coding strategies :) what is DOM?

     

    Tradewinds: I am trading the 5 mins charts with the daily chart. ( counter to the main trend) ..Do I believe in my trades? I do, but I just want to play safely. If I bail after one contract got filled, my other contracts would still make money.

     

    Can you guys give me an idea how to code this? Does Tradestation have any reserved words for position size? ContractSize? Thanks! Enjoy your weekend!


  8. Hello all,

     

    I always wanted to trade with more than 1 emini contract. My system would buy in with market price and sell to close the position when target price hits. I wouldn't have any problem getting my order filled, but exiting the trade would be hard since I use limit order and have more than 1 contract in the position.

     

    How would your guys handle this? lets say if you are trading 3 contracts and the profit target hits. Only 1 contract gets sold and you still have 2 open. The profit target may hit again in next bar or two bars later, but you never know. It may never hit again. How would you close this trade? I am thinking if one contract gets sold and the other two are still pending after 10 mins, I will close the position by selling at market price. I know this is not the best option, but what do you think? How could you code this? Thanks!


  9. I tested it....when a profit traget hit and the sell order didn't get executed within a min..the system wouldn't close the postion for me the next min with this small stoploss..I think it has something to do with this line "If Time_elapsed > 1 "...can we really compare times (currenttime Vs. entrytime) in easylanguage? how does it read this value 1? 1 min ? 1 hour? I tried 0001 but no luck.


  10. I am trading off the 15 min bars and i have a stoploss of $150...let's say if my Buy order is executed at 10:00AM and I want my limit sell order to be executed within 1 min. If the sell order is still open at 10:01AM, the syetem would sell it for a much smaller loss(=> $12.5, but smaller than <$150). This is something I can't test on SIM because my limit sell order always get executed regardless of the volume. But in real life, even my limit sell price gets hit, I might not be able to sell it due to the low volume. Would these codes work? Thank you for your time!

     

     

    
    Time_elapsed(0),
    Stoploss(0);
    
    
    Stoploss = 150;
    Time_elapsed= Time - entrytime;
    
    
    If Time_elapsed > 1 and MarketPosition = 1 then StopLoss = 12.5;
    
    
    Setstopposition;
    SetStopLoss(StopLoss);
    
    
    


  11. Can someone please show me how to get the intraday profit /Loss of all the positions traded ? I can't find any reserved words for this. Basically I want the system to stop trading for the day if the total intraday loss is greater than certain amount. Thank you.


  12. Hi all,

     

    I use the below codes to stop the system from trading for the day if the predefined max loss is hit, but it doesn't seem to be working. I saw the system kept trading even the max loss was hit...any clue? Thanks!

     

     

    If Date <> Date[1] then begin
    yesterdaynet = Netprofit;
    end;
    
    todaynet = Netprofit - yesterdaynet;
    
    If todaynet < neg(DayMaxLoss) and MarketPosition(0) =0 then begin
    
    SetExitOnClose;
    
    end;
    


  13. Thanks both. To be safe, I might just change to a 1-min time frame. The theoretical return on other way is not as promising as I got from the 10-tick frame, but it's more realistic. The volume is pretty high on the 1 min chart. I am thinking instead of using a limit order to sell my position, can I set a profit target?? What is a chance of getting a slippage on that? Have you tried?

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.