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

Using Continuous Contract Data in Strategy

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

    Using Continuous Contract Data in Strategy

    I have a strategy backtested using the continuous contract for the CL. In live trading however, whenever we have rollover to a new front month my indicators are thrown off due to change in previous day's data from the new front month data. I want to confirm NT functions for this. Can I edit the symbol map for the continuous contract to the new front month and run the strategy off the continuous contract ##-## instead of the actual front month contract, so that way my indicators will be compiled correctly?

    #2
    Hello Dancorcal,

    Executing trades on continuous contracts ##-## is not supported. What you could do is use a multiseries strategy. You could use the continuous contract to generate the signals and execute on a separate instrument.

    Another alternative is merging multiple contracts. Merging of multiple contracts is improved with Version 7.

    New Continuous/Merged Futures Contracts
    The concept of continuous contracts are implemented in a manner that allows you to continue to work with the front month for trading (ES 09-09 is the current front month as of this writing) and define a rollover date, June 11, 2009 is the contract boundary between June and September contracts. Rollover dates for the most popular futures contracts will be managed by NinjaTrader server and automatically uploaded to you. You can of course overwrite this. You then set up a "Merge policy" globally which can be overridden at the instrument level. As you request a historical chart, if the days to load crossed over the rollover boundary, NinjaTrader will transparently request the prior month(s) historical data and merge it into one Data Series based on the selected merge policy. This entire process is of course transparent to the user and ensure that a complete chart is received and that you know which contract you are actually executing trades against.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      I understand you can't execute trades on a continuous contract. But if you change the symbol mapping of the continuous contract to point to the front month contract, will that not work?

      Comment


        #4
        Hi Dancorcal,

        No, this will not work. The expiry you choose will either be a continuous contract (##-##) or a specific month/year. There's no way for this field to take two values at once.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Is there any example code?

          Comment


            #6
            Hello socoso,

            Yes, we have an example of a Multi-Series Strategy that you may view by going to the Tools -> Edit NinjaScript -> Strategies and double click on the SampleMultiInstrument.

            Let us know if we can be of further assistance.
            JCNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by OllieFeraher, Today, 11:14 AM
            0 responses
            1 view
            0 likes
            Last Post OllieFeraher  
            Started by aman jain, 10-01-2020, 09:25 PM
            3 responses
            292 views
            0 likes
            Last Post Legiboka  
            Started by quicksandatl, Today, 11:11 AM
            0 responses
            3 views
            0 likes
            Last Post quicksandatl  
            Started by reynoldsn, Today, 07:23 AM
            5 responses
            12 views
            1 like
            Last Post NinjaTrader_Gaby  
            Started by pecunianonolet, 11-28-2016, 03:34 AM
            6 responses
            4,514 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X