Code help cancel order

Forums ProRealTime English forum ProOrder support Code help cancel order

Viewing 2 posts - 1 through 2 (of 2 total)
  • #90789

    Hello,

    i have written a strategy but I am having trouble with the code.

     

    I only want to take a entry after my conditions have been met on the current candle and not carry forward to the next candle.

    So  buy stop at the high of the previous candle high and if it does not enter on the current candle then to cancel the order even if the conditions are still met on the next candle.

    Thank you

    Ashley

    #90792

    Strategies are ALWAYS executed when a bar closes, just microseconds before the next one opens, so your current bars is the bar just closed and can ve referred by [0] or no brackets at all. To place a pending BUY order on the previous HIGH (that is the HIGH of the candle preceding the one just closed) you just have to write:

    Pending orders are always CANCELLED when each bar closes, if not triggered. So you just need not to place them again even if conditions are still met next bar.

     

     

Viewing 2 posts - 1 through 2 (of 2 total)

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