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 DannyP96, 05-18-2026, 02:38 PM
    1 response
    89 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    144 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    83 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    257 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    335 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X