I want to trail stop price during the strategy. so i used ExitLongStopMarket function to set stop price.
It worked fine but in OnOrderUpdate(), i check Close[0] and under specific conditions, i trail the stop price. one of my conditions in "When Target Price Touched". it means when Close[0]==TargetPrice i call ExitLongStopMarket with a new price but an error rises:
'Order already has this stop price/limit price/quantity.
So what should i do when Target price touched?
Comment