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

Contracts do not rollback when backtesting?

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

    Contracts do not rollback when backtesting?

    Hello,

    When trying to backtest far back (months), it appears that the Future contract is not rolling back. So I am getting low volume and Doji candles like when you are viewing a far-in-the-future contract. Is it possible for the system to automatically roll back the contracts without having to change the date yourself when backtesting and replaying?
    Attached Files

    #2
    Hello Plzwork123,

    Thanks for your post.

    Market Replay will mimic realtime data which does not follow Merge Policy. Merge Policy affects historical data in a data series and the default is MergeBackAdjusted which will merge previous contract months to the current contract month.

    It would be best to use historical processing (backtesting, I.E. the Strategy Analyzer) to have previous contract periods merged together. This is also the same as opening a chart, and applying the strategy to the chart since the strategy processes historical data on the chart the same way it would backtest in the Strategy Analyzer.

    MergePolicy - https://ninjatrader.com/support/help...rge_policy.htm

    If you are using the Playback Connection to allow for intrabar actions and order fills, you may combine using Tick Replay (for intra bar Calculate.OnPriceChange/OnEachTick) and submitting orders to a single tick data series (for intra bar order fills.) Tick Replay options can be displayed by setting "Show Tick Replay" in the Control Center under Tools > Options > Market Data menu

    Backtesting with Intrabar granularity (submitting orders to a single tick data series) - https://ninjatrader.com/support/help...ipt_strate.htm

    Please let us know if we can be of further assistance.
    JimNinjaTrader Customer Service

    Comment


      #3
      Ok. So its technically not possible on Market Replay. I have to change the contracts manually. Thank you for the information.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by smartromain, Today, 02:52 AM
      1 response
      21 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by Critical_Catch, Today, 08:35 AM
      1 response
      19 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by ttrader23, Today, 09:33 AM
      1 response
      14 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by HiddenPhilosopher, 05-22-2020, 01:09 AM
      25 responses
      2,699 views
      0 likes
      Last Post Trader17  
      Started by Misplace, Today, 11:55 AM
      1 response
      14 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Working...
      X