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 NullPointStrategies, Today, 05:17 AM
    0 responses
    50 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    126 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    69 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X