I need to test a futures calendar spread not as main strategy but as a hedge instead of stop loss, the idea is to enter long on the current month contract and create sell stop lower with known risk, if it goes wrong and again me, I will have two contract, long on the current contract and short for the next month contract, the loss is freezed until it goes higher on my short leg and i can close my short re-arm the loss protection.
I created a strategy (for backtesting first) that have a core entry/exit (main strategy) and I have few question about implementing in the script (not builder) the strategy logic:
- for backtesting purpose, is it more simple to test using next month contract or using exactly the same instrument, I understand the FIFO requirement forbid to have opposit direction in the same instrument but it seems to be possible using two simulation accounts?
- in simulation, Can I use unmanaged mode to enter in both directions ?
- if I use a real world option (calendar spread as it is permitted) could you give some examples to:
In a continuous data stream displayed by Ninjatrader, get data from current/next months in the history data to programmatically be able to "jump" over expiration
A simple way to get/display next moth data in the same chart and manipulate it (get info, enter long/short)
know in advance expiration date for both contracts and how to roll them (close 1/2 moths and reopen them on the months 2/3)
Thanks in advance
Comment