I have reviewed the Advanced Order Handling section on this issue and have inserted the recommended code into the OnStateChange section of my strategy as follows:
else if (State == State.Realtime)
{
if (entryOrder_1 != null)
{
entryOrder_1 = GetRealtimeOrder(entryOrder_1);
}
}
Then in a Strategy Analyzer, I use dates that exclude the current date, thinking that will prevent some code logic regarding submitting live orders bc the present moment is being excluded from the backtester.
But, I continue to see this alert.
1. Why are order object issues related to live orders being triggered in a backtester? Shouldn't this piece of code only be relevant in live trading? (Isn't that the whole point of the State.Realtime conditional statement?)
2. What am I doing wrong here? I need the error to not trigger so that I can see results in the Strategy Analyzer window for troubleshooting.
Thanks for any help,
Tim
Comment