I have a strange situation. I am trying to use the managed approach if the trail is disabled in my strategy.
What i'm finding is that, when the first order kicks in, when trail is disabled, I see both my stop order as well as my target order. When the stop or target gets executed, the next order when the condition is right, it places the order without my stop and target order. Why is that happening? Also, sometimes I notice that it reverses my position.
Can you help me to as to what is incorrect in my OnExecutionUpdate and OnOrderUpdate.
Attached is a portion of my code. Before this, basically i check for a condition with regards to the bars and if the condition is met, then execute a long or short.
Comment