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 magnatauren, 08-15-2020, 02:12 PM
            5 responses
            206 views
            0 likes
            Last Post RaddiFX
            by RaddiFX
             
            Started by rene69851, 05-02-2024, 03:25 PM
            1 response
            20 views
            0 likes
            Last Post rene69851  
            Started by ETFVoyageur, Yesterday, 07:05 PM
            5 responses
            45 views
            0 likes
            Last Post ETFVoyageur  
            Started by jpeep, 08-16-2020, 08:31 AM
            13 responses
            487 views
            0 likes
            Last Post notenufftime  
            Started by realblubb, 04-28-2024, 09:28 AM
            2 responses
            32 views
            0 likes
            Last Post realblubb  
            Working...
            X