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 Javierw.ok, Today, 04:12 PM
      0 responses
      2 views
      0 likes
      Last Post Javierw.ok  
      Started by timmbbo, Today, 08:59 AM
      2 responses
      10 views
      0 likes
      Last Post bltdavid  
      Started by alifarahani, Today, 09:40 AM
      6 responses
      40 views
      0 likes
      Last Post alifarahani  
      Started by Waxavi, Today, 02:10 AM
      1 response
      18 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Started by Kaledus, Today, 01:29 PM
      5 responses
      15 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X