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

Multiple Dataseries with the same base future

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

    Multiple Dataseries with the same base future

    I am trying to plot the spread between 2 futures with the same underlying in different months. When I try to load the second dataseries all the historical data is equal to the primary series. Is there a workaround for this?

    Thanks in advance

    #2
    Hello Hank_R,

    Are one of those contracts being used before the rollover date for that instrument?

    For example comparing the current contract with the next?

    If not, please let me know so that we may further investigate.

    If so, the issue is with the expiry and merge policy.

    With the merge policy set MergeBackAdjusted, for the upcoming contract month the merge policy is loading historical data for the current contract month due the rollover dates. Then real-time data is streamed from the upcoming contract month (causing a discrepancy in price and a large bar to form on the screen as real-time data is being received if loaded on a chart).

    To correct this, you can set the merge policy to DoNotMerge, either for this instrument or globally for all instruments.

    This causes only the historical data and real-time for the selected contract month to appear on the chart without attempting to merge data based on rollover dates. This also means if you load more data than the upcoming contract has, the chart will not continuously scroll back indefinitely (merging contracts months by the rollover date).

    The instructions below are for NinjaTrader 8. Please let me know if you are not using the latest version of NinjaTrader.

    To change the merge policy for a single instrument:
    • Click Tools -> Instruments...
    • Search for the instrument (for example CL) and select the search result row -> click the edit link on the lower right corner
    • Set the Merge policy to Do not merge -> click OK -> click Close


    To change the merge policy globally for all instruments:
    • Click Tools -> Options -> Market data
    • Set the Global merge policy to Do not merge - > click OK
    • Then reload the historical data by right-clicking the chart -> select Reload All Historical Data
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks changing the merge policy did it.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by wzgy0920, 04-20-2024, 06:09 PM
      2 responses
      26 views
      0 likes
      Last Post wzgy0920  
      Started by wzgy0920, 02-22-2024, 01:11 AM
      5 responses
      32 views
      0 likes
      Last Post wzgy0920  
      Started by wzgy0920, Yesterday, 09:53 PM
      2 responses
      49 views
      0 likes
      Last Post wzgy0920  
      Started by Kensonprib, 04-28-2021, 10:11 AM
      5 responses
      192 views
      0 likes
      Last Post Hasadafa  
      Started by GussJ, 03-04-2020, 03:11 PM
      11 responses
      3,234 views
      0 likes
      Last Post xiinteractive  
      Working...
      X