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 michelz, 02-18-2025, 08:30 AM
    39 responses
    1,118 views
    0 likes
    Last Post MiCe1999  
    Started by lacharp, 03-31-2025, 10:10 PM
    6 responses
    43 views
    0 likes
    Last Post richlink  
    Started by raysinred, Today, 10:32 AM
    0 responses
    8 views
    0 likes
    Last Post raysinred  
    Started by Majestic Rock Forum, 04-14-2025, 12:13 PM
    6 responses
    52 views
    0 likes
    Last Post Roonie23  
    Started by nagesh789, Today, 10:09 AM
    0 responses
    6 views
    0 likes
    Last Post nagesh789  
    Working...
    X