|
Hi Peek,
I would suggest to do the following:
1) create 3 insruments for each symbol your system trades, for example: - COFFEE (that always contains data of the "active" ticker) - COFFEE_New (used by the roll strategy, contains data of the "next" future, to which you need to roll your position) - COFFEE_Old (used by the roll strategy, contains data of the "current" future, from which you need to roll your position)
2) create 2 strategies: - your main trading strategy, subscribe COFFEE. Note, that this strategy doesn't know actually that it trades some contract that needs to be rolled. - roll strategy, subscribe COFFEE_New and COFFEE_Old, put some code that "enables" this strategy when you need to roll your position.
3) create a script that fills all 3 instruments with data correspondingly.
Regards, Sergey.
|