Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Backtest Historical Vs Playback Historical?

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

    Backtest Historical Vs Playback Historical?

    Hello,
    I'm experiencing a strange issue with backtesting versus playback. During playback, as I scrub through a trade, it splits into partial fills like 5-1-1 for a 7-contract order. However, when I hit F5 to refresh, it shows a solid fill of 7 contracts. Is there something I'm missing in the settings? I've tried adjusting settings like high resolution, market replay, and fill limit order on touch, but nothing seems to make the playback behave like the historical test. Any insights or suggestions would be appreciated.​
    Click image for larger version

Name:	image.png
Views:	28
Size:	62.3 KB
ID:	1297013Click image for larger version

Name:	image.png
Views:	25
Size:	47.8 KB
ID:	1297014

    #2
    Hello NUVERSA,

    Thank you for your post.

    When using the Playback, are you testing using historical data or replay data? You mention both in your post so I'm not clear on which data you are seeing this behavior occur on.

    Market Replay is a recording of live data as it is seen and includes Level II data. By replaying this data, you replay the market movements the instrument experienced as accurately as possible on the platform, as you replay a full recording.

    When replaying historical data, or backtesting (which uses historical data), this only includes Level I data. 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.

    If you are doing a replay, then hit F5 to refresh, these orders are now "historical" orders instead of orders replayed using Market Replay which has more granular data.

    Please let me know if I can assist further.
    Gaby V.NinjaTrader Customer Service

    Comment


      #3
      okay got it, So you're saying id have to inject a 1 tick series to execute orders on to obtain similar action as playback.
      As a note, even on the historical data playback im getting partial fills
      on market replay im getting more market fills, but when i hit F5 refresh, it changes the exit index as you so and fills them all as 7

      Comment


        #4
        Hello NUVERSA,

        Yes exactly, intra-bar granularity adds a second data series such as a 1 tick series using AddDataSeries() so that the strategy or indicator has the individual ticks in the historical data in between the High and Low of the primary series.​In NinjaTrader 8, there have been two new enhancements so that programmers may not have to manually add this secondary series and code the script for high accuracy fills (Order Fill Resolution) or for intra-bar actions (TickReplay) depending on the needs of the script.

        on market replay im getting more market fills, but when i hit F5 refresh, it changes the exit index as you so and fills them all as 7


        When you refresh after the Market Replay, this is re-calculating those trades under historical data instead of Market Replay data. When you let the playback run on Market Replay, it is producing virtually real time results. However once you refresh or skip through the replay, it will reload all the historical data.

        Please let me know if you have any further questions.
        Gaby V.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Haiasi, 04-25-2024, 06:53 PM
        2 responses
        16 views
        0 likes
        Last Post Massinisa  
        Started by Creamers, Today, 05:32 AM
        0 responses
        4 views
        0 likes
        Last Post Creamers  
        Started by Segwin, 05-07-2018, 02:15 PM
        12 responses
        1,785 views
        0 likes
        Last Post Leafcutter  
        Started by poplagelu, Today, 05:00 AM
        0 responses
        3 views
        0 likes
        Last Post poplagelu  
        Started by fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,407 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Working...
        X