Clearing pending orders

Forums ProRealTime English forum ProOrder support Clearing pending orders

Viewing 4 posts - 1 through 4 (of 4 total)
  • #234681

    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?

    set stop price 0
    set target price 0

    #234687

    Surely above code IS the reason your trades are getting closed?

     

    #234694

    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.

     

     

    4 users thanked author for this post.
    #234765

    I found the cause of my bug it was not related to the stop and target orders.

    1 user thanked author for this post.
Viewing 4 posts - 1 through 4 (of 4 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login