order validity – signal to be valid 4 following bars

Forums ProRealTime English forum ProOrder support order validity – signal to be valid 4 following bars

Viewing 5 posts - 1 through 5 (of 5 total)
  • #64677

    Hi,

    can someone help how to code how many bars an order is valid?

    For example buy setup:

    I get the buy signal on current bar, and I want the signal to be valid 4 following bars, and if the buying condition is not met, delete the order.

    Thank you!

    George

    #64682

    You can test if your signal was true in the last X bars:

    (let’s say your signal condition is a variable named “signal”):

    If “signal” was true at least 1 time during the last 4 bars, then the condition is still true.

    #64684

    Thank you Nicolas, sorry it is my English. I did not mean that.

    Try to clarify:

    I get a buy signal on current bar, let’s say the signal is high (0) › high (1)

    I do not want to buy at market, but at limit price, lets say “buy 1 contract at low(1) + range(1)• 0,7 stop”.

    And I want the order to be valid 4 bars after the entry signal if the price comes lower. If not, after monitoring 4 bars, delete the order.

    Thanks again!

    #64686
    Leo
    #64697

    Thanks Leo, I think a understand

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

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