Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Data Difference Between Replay and Backtest

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

    Data Difference Between Replay and Backtest

    I ran a strategy for a month on replay. When I used the Strategy Analyzer for the same strategy and the same dates, the results were different. Is there a difference between the data used for replay and for the analyzer? I'm on a 5 minute chart, latest Ninja version. Thanks.

    #2
    Hello Fran888,

    Thank you for your post.

    Please review the help guide page on the differences on real-time vs backtest.



    A strategy running real-time (live brokerage account, live market simulation, Market Replay etc...) will produce different results than the performance results generated during a backtest.

    When in historical data, only the Open, High, Low, and Close will be available and there will be no intra-bar data. This means actions cannot happen intra-bar, fills cannot happen intra-bar. All prices and actions come from and occur when the bar closes as this is all the information that is known.

    Because of this, OnBarUpdate will only update 'On bar close' as it does not have the intra-bar information necessary for 'On price change' or 'On each tick' and the script will not have the intra-bar information to accurately fill an order at the exact price and time.

    Calculate - https://ninjatrader.com/support/help.../calculate.htm

    To improve the accuracy of a backtest, you may use Tick Replay along with an added 1-tick series to have logic processed intra-bar and have orders filled intrabar. Tick Replay would be used to have the logic process OnEachTick or OnPriceChange with historical data, but this does not allow for intra-bar order fills. You would need to add a single tick data series and submit orders to that single tick data series for a strategy that uses Tick Replay.

    High Order Fill Resolution allows for intra-bar order fills with historical processing, but is not compatible with Tick Replay.

    Please reference the SampleIntrabarBacktest example and the following Help Guide links for more information.

    SampleIntrabarBacktest 'Backtesting NinjaScript Strategies with an intrabar granularity' - https://ninjatrader.com/support/helpGuides/nt8/backtesting_ninjascript_strate.htm

    TickReplay - https://ninjatrader.com/support/help...ick_replay.htm

    Please see this support article for a detailed explanation:

    https://support.ninjatrader.com/s/ar...ar-granularity

    Please let us know if we may be of further assistance.​
    Gaby V.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ChrisR, Today, 12:04 PM
    0 responses
    4 views
    0 likes
    Last Post ChrisR
    by ChrisR
     
    Started by vitaly_p, Today, 11:21 AM
    3 responses
    7 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by Merlin997, Today, 11:44 AM
    0 responses
    1 view
    0 likes
    Last Post Merlin997  
    Started by Thomas75k, 11-29-2024, 02:11 AM
    9 responses
    78 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by NISNOS69, Yesterday, 08:00 AM
    3 responses
    13 views
    0 likes
    Last Post NISNOS69  
    Working...
    X