This is Jim responding on behalf of Chelsea who is out of the office at this time.
Your print "Print(Time[0] + " Condition true");" will be seen when the order submission method is reached. This can confirm that the strategy has reached this part of the code.
You may test the strategy in the Playback Connection to attempt to reproduce an occurrence that happened when the strategy was processing realtime data.
If you test in Playback and see that the order method was reached but the order did not submit, set TraceOrders to true and then repeat your test to see the TraceOrders feedback for why the order would have been ignored. TraceOrders is set in State.SetDefaults in OnStateChange and the strategy will need to be removed and re-added to take in changes made in State.SetDefaults.
The TraceOrders feedback will tell you why the order got ignored.
Please also consider testing with Order Fill Resolution set to High with a single tick data series. With historical processing, it is possible where an Exit and a Set method fill on the same bar which would put you in a reverse position. Further entries would be ignored because we would already have exceeded the allowed number of EntriesPerDirection. Using High Order Fill resolution will have orders filled with intrabar granularity and can reduce the chances of 2 orders getting filled on the same bar.
We look forward to assisting.
Comment