NexusFi: Find Your Edge


Home Menu

 





Real-time/Market replay auto contract rollover strategy


Discussion in NinjaTrader

Updated
    1. trending_up 2,016 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 1 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 
grankus's Avatar
 grankus 
Barcelona
 
Experience: Beginner
Platform: NinjaTrader 7
Trading: CL, TF
Posts: 8 since Aug 2012
Thanks Given: 5
Thanks Received: 0

Hello,

I just checked all Big Mike’s posts but I didn’t find anything that solved this issue, I think. Maybe because it’s a stupid question and it’s something so basic you can do easily with Ninjatrader 7 vanilla options.

The question is… anyone knows if there is a way to switch/rollover from one contract to the next one, based on its DailyVolume or its expiration date in a strategy, running on real-time or market replay?

I was wondering how I would do it:

1• I think that maybe could be possible getting the maximum DailyVolume of a contract list/array, that could be filled with a loop or using the Market Analyzer list… I’m not sure if this is possible or not.

2• The other way that I thought was using the expiration day of every contract as a trigger to change to the next contract, just retrieving the “Contract month” and the “Rollover date” in the Instrument Manager/Editor.

I programmed something “similar” with vba in the past in order to generate a continuous contract with the market replay data, comparing the same instrument “.ntm/.nt2” files in a day/folder and “getting rid” of the lighter ones, finally renaming the months. Example: “02-12”… to “##-##”.
I did it with an expiration date list either but that was a bit tricky and slower than the first option.
The point of this is that I think this project could not be so difficult because I’m not a programmer and I managed to create a Marker Replay Data manager based on the same principles.

Once I know which contract is the one with the higher DailyVolume, I would like to change to it automatically while the strategy is running. Ex: “CL 02-12” to “CL 03-12”. But again I don’t know how to do it

So far I change contracts manually using the Market Analyzer with a DailyVolume column that it’s linked to a chart which is running a strategy, but this method it’s a bit limited, especially if I have several strategies running at the same time.

Thank you very much!

Jairo.

PS: Sorry for the grammar I do my best!


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
US Prop Firms Race Inside the CFTC Perimeter -- Tradeify …
Funded Trading Evaluation Firms
April FOMC Minutes: Most Divided Fed Since 1992 -- Many …
Traders Hideout
After $87M Settles NO: Irans Nuclear Redline Sets Up the …
Prediction Markets & Event Contracts
Coinbase Launches Regulated Crypto Futures Across 26 Eur …
Cryptocurrency
BofA Projects $1.1 Trillion in Sports Event Contracts -- …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks




Last Updated on October 29, 2014


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts