NexusFi: Find Your Edge


Home Menu

 





Real-time/Market replay auto contract rollover strategy


Discussion in NinjaTrader

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




 
Search this Thread

Real-time/Market replay auto contract rollover strategy

  #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?
MC PL editor upgrade
MultiCharts
Better Renko Gaps
The Elite Circle
What broker to use for trading palladium futures
Commodities
Cheap historycal L1 data for stocks
Stocks and ETFs
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 




Last Updated on October 29, 2014


© 2024 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 - Privacy Policy - Downloads - Top
no new posts