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

strategy to trade future contracts

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

    strategy to trade future contracts

    Hello,

    I'm working on a strategy to trade future contracts and I come up the following related questions.

    1. is it possible to trade a single future contract continuously?
    For example, to trade FDX, when current month expires, it closes the position of current month, and roll the position to next month. It seems to me that the contract month has to be part of the instrument name in NJ.

    2. how the gap of price is adjusted between two contracts, e.g. how the price is adjusted when roll a contract from one month to another

    3. How do I set up back testing to test this strategy.

    thanks a lot.
    Brent

    #2
    Brent, trading a single rolling contract continuously would not be possible unfortunately. For back-testing where are native continuous contract available for some providers (accessed by the ##-## expiry). If that's not used NT can also create a continuous contract itself by merging the past expiry data into the current front month - if you want the gap back adjustment to happen or not could be set as option.

    BertrandNinjaTrader Customer Service

    Comment


      #3
      Is it possible to change instrument on the fly?

      on the rollover date, I'm considering to close the position of an old contract month, and establish a position for the new contract month automatically.

      Thanks

      Comment


        #4
        Originally posted by brent_ View Post
        Is it possible to change instrument on the fly?

        on the rollover date, I'm considering to close the position of an old contract month, and establish a position for the new contract month automatically.

        Thanks
        This would unfortunately not be possible - you would need to start a new strategy instance on the new expiry for rollover, if the script would then still be in a position coming from historical data the needed order to sync up your account in the new contract month could be generated by NT automatically (SyncAccountPosition)
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by terofs, Yesterday, 04:18 PM
        1 response
        21 views
        0 likes
        Last Post terofs
        by terofs
         
        Started by CommonWhale, Today, 09:55 AM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by Gerik, Today, 09:40 AM
        2 responses
        7 views
        0 likes
        Last Post Gerik
        by Gerik
         
        Started by RookieTrader, Today, 09:37 AM
        2 responses
        13 views
        0 likes
        Last Post RookieTrader  
        Started by alifarahani, Today, 09:40 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X