Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtest w multiple targets get filled as single exit, at wrong levels

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

    Backtest w multiple targets get filled as single exit, at wrong levels

    My strategy that uses tick replay and multiple profit targets generate backtest fills as single exit. Plus most targets and stoplosses are filled at wrong price levels. ie. historical exits all got executed at the opens of the next bar of where they were supposed to take place, not during the bars.

    Running live the strategy performs as expected.
    The strategy calculates on bar close, resets stoploss order price depending on target fills. It does not reset target prices.
    What's the potential cause of this behavior?
    Last edited by yubo27; 05-07-2021, 09:13 AM.

    #2
    Hello yubo27,

    Thank you for your post.

    It should be noted that Tick Replay would help indicators to calculate tick by tick historically, but wouldn't have any effect on fill prices. Adding intrabar granularity, however, can give more accurate fill prices.

    I'd take a look at this example from our help guide that goes into how you can enter a trade using one time frame and exit on another:


    Here is a link to our forums that goes into depth on using Order Fill Resolution and Tick Replay to ensure your backtests are as close to real time results as possible:

    https://ninjatrader.com/support/foru...mance?t=102504

    High Fill Order Resolution and TickReplay cannot be used together, but it is still possible to add intra-bar granularity to a script in the code itself for order fill accuracy and use TickReplay to update indicators with Calculate set to OnPriceChange or OnEachTick historically.

    Thanks in advance; I look forward to assisting you further.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    563 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    329 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    547 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X