Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Running live strategy via continuous symbols

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

    Running live strategy via continuous symbols

    Reading the NT documentation, there doesn't seem to be way to automatically rollover an existing position in a brokerage account.

    I am planning to run a strategy on daily resolution with an average holding period of 3-10 days.

    From reading the forums, there can be two solutions to handle rollover:

    1. Option A

    Suppose I am long ES 06-18 in my IB account, and it is time to roll-it over to ES 09-18, I do the following steps:

    (i) a manual rollover in my IB account from ES 06-18 to ES 09-18.

    (ii) I stop the strategy currently running on ES 06-18 (say on the friday close)

    (iii) I update the NT database under "Rollover Futures Instrument" from ES 06-18 to ES 09-18 (say on the weekend)

    (iv) I re-start the strategy to run again on ES 09-18 (say on sunday evening)

    2. Option B

    Suppose I don't want to bother with the manual rollover of positions in my IB account like in Option A.

    Here is a potential Option B is trying to avoid the manual rollover in the IB (or brokerage) account. Wanted to check if this is feasible?

    Not sure if this is feasible, but potentially I run a live strategy (say the account is linked to a live IB account) on a continuous contract say ES ##-## from Kinetick (or @ES#C in the case of IQFeed), and the strategy also reads another database or a file, that contains contracts and dates for which they are valid such as:

    ES 12-18, 20180907, 20181206
    ES 09-18, 20180607, 20180906
    ES 06-18, 20180308, 20180606
    ES 03-18, 20171207, 20180307
    ...
    ...

    Then the strategy code

    (i) runs on the continuous contract, but the actual orders to IB are generated using ES 09-18 or ES 06-18 or similar specifications (not sure if this is possible)

    (ii) I also write a rollover logic in the strategy itself, such that on the rollover date, the strategy also sends an order on two different maturities (or a spread) to do a rollover - one long and one short.

    Would this be viable?

    (a) Is it possible to run a live strategy on generic contract like ES ##-## from Kinetick (or @ES#C from IQ Feed)

    (b) If yes, would it be possible to access within the strategy code, which particular expiry (like ES 09-18, or ES 06-19) does that ES ##-## access point in time?

    (c) Also, would anyone know where can I see the current rollover policy used to back-adjust contracts like ES 09-18?

    #2
    Hello uday,

    Thanks for your post!

    It is possible to run a strategy against a continuous contract, and it is possible to add additional data series to a strategy so you can trade on separate/multiple instruments. One limitation that you may encounter with Option B could involve adding your specific contract months to your strategy since it is advised to hard code the name of the instrument into the AddDataSeries() call and to avoid "dynamically" loading symbols that depend on user defined input or symbols based on the primary data series.

    NinjaTrader will not automatically rollover contracts but this can be done from the Tools > Database Management window when a new contract month is open. The default merge policy is Merge Back Adjusted which will show the front contract month on top of each previous contract month. This can be set in the Tools > Options > Market Data > Global Merge Policy.

    I've included some publicly available documentation on Multi Series NinjaScripts and NinjaTrader's merge policy. The Multi Time Frame and Instruments document provides a complete guide for creating and using a multi series NinjaScript.

    Multi Time Frame and Instruments (Important Read!) - https://ninjatrader.com/support/help...nstruments.htm

    Merge Policy - https://ninjatrader.com/support/help...rge_policy.htm

    Please let us know if you have any additional questions.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    116 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    61 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    40 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    43 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    82 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X