The problem I find is that I am not sure how to provide the order to close the position based on the futures expiration date. There seems to be some explanation here (NinjaTrader 8) but it looks like it has to be done manually.
More importantly, I am not even sure how to backtest the strategy. I was able to see that you can create a full history of the front contracts with the Contracts Month section (NinjaTrader 8), but I can't figure out how I can deploy the rollover strategy with this continuous historic information. That is to say, if I am short and the expiration date is coming on my current front futures contract, I need to buy to close the short and at the same time go short a contract that is not even yet part of the price series. This might be solved by downloading all the different futures separately, but not sure how to achieve this.
Is there a function that triggers a buy/sale on futures based on contract expiration date that can be backtested?
Thanks

Comment