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.
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue