I am trying to diagnose the cause of a strategy malfunction and would like clarification of my understanding.
Please refer to the attached code for OnExecution().
The log and trace files indicate that the first "if" block should have been executed, but it was not (because no stop loss or profit target orders were placed and other actions were not made). However, the print statement below it printed the correct output for the order that should have caused execution of the "if" block. Logically, I think this is not possible. Are there any circumstances that could cause this?
Please note that two of us were using the same strategy code at the same time, but one malfunctioned as above and one worked correctly. I am beginning to suspect some corruption of the program, but I do not know what could cause it.
I have struggled with this for days, so any advice would be appreciated.
Cheers
Tony
Comment