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 cmtjoancolmenero, Yesterday, 03:58 PM
      3 responses
      23 views
      0 likes
      Last Post cmtjoancolmenero  
      Started by Brevo, Today, 01:45 AM
      1 response
      14 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by rjbtrade1, 11-30-2023, 04:38 PM
      2 responses
      72 views
      0 likes
      Last Post DavidHP
      by DavidHP
       
      Started by suroot, 04-10-2017, 02:18 AM
      5 responses
      3,021 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by Stanfillirenfro, Today, 07:23 AM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Working...
      X