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

Change Merge Policy from an Indicator (Spread Indicator)

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

    Change Merge Policy from an Indicator (Spread Indicator)

    Hi, I am using @kdoren 's and @Ninjatrader_AdamP 's Spread indicator I downloaded from this site and for it to work properly it needs to have "Do Not Merge" set as the Merge Policy.

    Is there a way of changing the Merge Policy from the indicator script?
    Please advise.

    #2
    Hello carlosavellan,

    Thank you for your inquiry.

    There is no way to change the Merge Policy in NinjaScript. You would have to change NinjaTrader’s merge policy either globally (affects all instruments) or to one specific instrument only.

    To change the global merge policy, you would have to click Tools -> Options… in the Control Center. You’ll then go to the Data tab. Under the “Historical chart data” category, there will be a section titled “Merge policy”. This is where you will select “DoNotMerge”, in your case. You’ll then press OK.

    To set the merge policy of a specific instrument only, you would have to click Tools -> Instrument Manager… in the Control Center. Search for your instrument and then select it and press Edit. Under the “Merge policy”, you’ll select “DoNotMerge”.

    To learn more about merge policies, take a look at the NinjaTrader help guide at this link under the “Understanding merge policies” section: http://www.ninjatrader.com/support/h...rical_data.htm

    Please, let us know if we may be of further assistance!
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      Thanks. I guess this is a shortcoming of NT but still one of the best platforms.

      Comment


        #4
        Hello,
        If I understand correctely this does mean that it is impossible to build two Charts of one Futures market at the same time whereby one Chart shows a single contract and the other one shows the continues contract?

        Would'nd it make sence to link the ##-## symbols to the merge policy defined in the instrument settings and leave the single expiration months as non-merged contract?

        Many thanks,
        Joerg

        Comment


          #5
          Hello Joerg,

          Thank you for your post.

          Continuous (##-##) contracts come from the data provider as is, meaning merge policies do not apply to this contract in NinjaTrader as the contract has already been merged and adjusted by the data provider.

          Contract months directly referenced (09-17 for example) will come from the provider as raw data with no merging or adjustments. The NinjaTrader platform offers the option to use a Merge Policy in order to merge prior contracts and back adjust them if needed.

          Please let me know if you have any questions.

          Comment


            #6
            Hello Patrick,

            thanks for your reply. If the ##-## symbols are feeded by some data providers and NT has the capability to generate merged and non-merged contracts (as described below by NinjaTrader_ZacharyG),maybe an option could be added to the data series menu which selects between both versions?

            If so it would be possible to see both charts at the same time which currently is not due to the linkage to the instrument (or the global setting). In order to avoid confusions the merged contract could get a prefix for example.

            Many thanks,
            Joerg

            PS. I just have seen another treat which discussed the same issued. There seems to be a feature request but the ID has not been mentioned.
            Last edited by Joerg; 09-09-2017, 09:30 AM.

            Comment


              #7
              Hello Joerg,

              Thank you for your response.

              Technically this is possible already in NinjaTrader. If you export the historical data it will be in it's raw form (unmerged and unadjusted) therfore you can change the file name to a new instrument name and then re-import (after creating that instrument in NinjaTrader).

              You can then set individual Merge Policy settings in the Instrument Manager for the new instrument and the original futures instrument.

              For information on the Instrument Manager and creating/editing instruments please visit the following link: http://ninjatrader.com/support/helpG...nt_manager.htm

              For information on exporting and importing historical data through the Historical Data Manager please visit the following link: http://ninjatrader.com/support/helpG...ta_manager.htm

              Please let me know if you have any questions.

              Comment


                #8
                Hello Patrick,

                many thanks for your fast reply. Yes, this should be a possible workaround.

                But anyway it means a lot of manual work especially since I store several futures markets in my database. Whether I use the original contract or the custom contract as the merged one I need to export and import all historical data separately.

                Since NT has the capability to build charts in both ways it would be great to include this option in the data series window which probably will be helpful for many traders as well.

                Many thanks.
                Joerg
                Last edited by Joerg; 09-04-2017, 04:06 PM.

                Comment


                  #9
                  Hello Joerg,

                  Thank you for your patience.

                  The internal tracking ID for this request is SFT-974.

                  Please let me know if you have any questions.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by algospoke, Yesterday, 06:40 PM
                  1 response
                  14 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Started by quantismo, Yesterday, 05:13 PM
                  1 response
                  13 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by The_Sec, 04-16-2024, 02:29 PM
                  3 responses
                  16 views
                  0 likes
                  Last Post NinjaTrader_ChristopherS  
                  Started by hurleydood, 09-12-2019, 10:45 AM
                  15 responses
                  1,099 views
                  0 likes
                  Last Post Leeroy_Jenkins  
                  Started by danieldunn2024, Today, 03:06 AM
                  1 response
                  5 views
                  0 likes
                  Last Post NinjaTrader_Erick  
                  Working...
                  X