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 Auto-roll Futures Contract

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

    Strategy Auto-roll Futures Contract

    Is there a way for my strategy to programmatically roll forward to the next futures contract? I'd like to run strategies on 30+ futures instruments. What is the process of handling contract expiration? I'm fairly new to futures (coming from forex) and I'm looking for the steps on automating my strategies through expiration. Here is my current understanding:


    1. Open futures chart, configure and enable strategy
    2. Nearing expiration date, flatten strategy positions, and disable strategy
    3. Repeat step 1 for the new contract date

    Is this the correct workflow for running strategies on futures? If so, there is a major issue with deploying 10 strategies across 30+ futures instruments. Essentially that would mean automation is not possible. Can you please confirm or correct this? Is there any other solutions that I can look at to achieve what I'm trying to do here?


    #2
    Hello jflaggs,

    Thanks for your post.

    No, contact expiration dates cannot be rolled over programmatically.

    You could manually rollover the expiration dates of the contracts by going to Tools > Database Management.

    See this help guide page for more information: https://ninjatrader.com/support/help...operations.htm

    The charts you have open will then rollover to the new contract expiry and you will see the strategy 'Instrument' column in the Strategies tab of the Control Center reflect the new expiry of that instrument.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Just to clarify, if I use the Database Management tab to rollover contracts, will my strategies automatically be applied to the new instrument? Is this Database Management step the only action I need to take or will I need to take the steps I initially noted to reconfigure and enable all strategies on the new instrument?

      Comment


        #4
        Hello jflaggs,

        Thanks for your notes.

        Yes, once your rollover instruments in the Database Management window, the strategies Instrument tab of the Strategies tab of the Control Center will reflect the rolled-over instrument expiry meaning the strategy is added to that contract expiry.

        Check the Strategies tab of the Control Center after rolling over an instrument to confirm the strategy is set to the correct contact expiry.
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment


          #5
          Great, thanks Brandon!

          Comment


            #6
            I saw your post while searching for similar info, and I thought I'd share what I've found to help automate futures strategies.

            You're on the right track, but there's a way to make it easier. Instead of manually handling contract expirations and reconfiguring strategies, you could try using algorithmic trading software. As an option you can try MoonTrader. This software can take care of everything for you based on the rules you set up, ensuring your strategies roll over to new contracts seamlessly.

            This can save you a lot of time and effort, especially if you're dealing with multiple strategies across many futures instruments.
            Last edited by alvinabish; 07-23-2024, 01:18 AM.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by YoungCinco24, Today, 09:43 PM
            0 responses
            8 views
            0 likes
            Last Post YoungCinco24  
            Started by Apm123, Today, 08:21 PM
            0 responses
            6 views
            0 likes
            Last Post Apm123
            by Apm123
             
            Started by tony_28217, 09-07-2024, 01:21 AM
            2 responses
            28 views
            0 likes
            Last Post tony_28217  
            Started by Rudmax, 07-02-2024, 05:40 AM
            64 responses
            1,117 views
            1 like
            Last Post backtester831  
            Started by DayTradingDEMON, Today, 08:23 AM
            2 responses
            27 views
            0 likes
            Last Post DayTradingDEMON  
            Working...
            X