Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Continuous Strategy - Roll-over position to next contract

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

    Continuous Strategy - Roll-over position to next contract

    Hello experts!

    I have a strategy and I would like to make a test to add an automatic "rollover position" in a futures contract without re-configuring the Strategy parameters by adding these conditions:

    Example E-Mini 03-24 to 06-24 - I have the strategy running on the ES 03-24
    - 2 days before the 03-24 Contract expiration I set the Strategy to close the current position on the 03-24 and (Re) Open it in the 06-24;
    - Automatically update the Instrument in my strategy to now track the 06-24 instead of 03-24

    How can it be achieved via code? Is there any example I can follow?

    Thank you in advance.

    #2
    Hello gmeirelles,

    Thanks for your post.

    There are no supported NinjaScript methods or properties for rolling over the contract expiration date of an instrument that a strategy is running on.

    This forum thread will be open for other community members to share their insights on unsupported code to accomplish this.
    <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

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    263 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    168 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    170 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    257 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    209 views
    0 likes
    Last Post CarlTrading  
    Working...
    X