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 pechtri, 06-22-2023, 02:31 AM
      10 responses
      124 views
      0 likes
      Last Post Leeroy_Jenkins  
      Started by judysamnt7, 03-13-2023, 09:11 AM
      4 responses
      59 views
      0 likes
      Last Post DynamicTest  
      Started by ScottWalsh, Yesterday, 06:52 PM
      4 responses
      36 views
      0 likes
      Last Post ScottWalsh  
      Started by olisav57, Yesterday, 07:39 PM
      0 responses
      7 views
      0 likes
      Last Post olisav57  
      Started by trilliantrader, Yesterday, 03:01 PM
      2 responses
      22 views
      0 likes
      Last Post helpwanted  
      Working...
      X