I have a bug in my code where a position is getting closed and I cannot work out why, I’ve commented out all the places where the position is closed explicitly by the code and it makes no difference, so I assume it has something to do with a pending order.
Is this the way to clear pending stop and target orders?
Those instructions disable SL and TP, as there’s no need to disable pending orders because they expire every candle and you simply stop placing them if you don’t want them.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok