Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How not to cheat in backtest?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How not to cheat in backtest?

    I used the wizard to create a simple %K crossover strategy with a 10 tick target and 1 tick trailing stop in the YM contract on a 15 minute timeframe.

    In real live trading this would almost always get stopped out at a loss, but the Strategy Analyzer thinks it's a fantastic idea. Giving the backtest a virtual straight line up profit curve.

    It's set to calculate on close. What other settings or precautions are needed to ensure no peeking into future data on indicator calculations and the limit and stop orders are executed in the order that they would have occurred?

    #2
    Backtests in NinjaTrader do not peek into the future. The problem is the granularity of your stop and targets. I suspect a lot of your entries and exits are on the same bar? If yes, this is the problem and you will be hard pressed to get a better back test result. The reason is, in a 15 min bar that is 30 ticks high to low, you will not know if the stop or target is hit first. Thus we can't tell which order the orders would have really been filled.
    RayNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by usazencort, Today, 01:16 AM
    0 responses
    1 view
    0 likes
    Last Post usazencort  
    Started by kaywai, 09-01-2023, 08:44 PM
    5 responses
    603 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by xiinteractive, 04-09-2024, 08:08 AM
    6 responses
    22 views
    0 likes
    Last Post xiinteractive  
    Started by Pattontje, Yesterday, 02:10 PM
    2 responses
    21 views
    0 likes
    Last Post Pattontje  
    Started by flybuzz, 04-21-2024, 04:07 PM
    17 responses
    230 views
    0 likes
    Last Post TradingLoss  
    Working...
    X