Help with creating condition after an event

Forums ProRealTime English forum ProBuilder support Help with creating condition after an event

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

    Hi Everyone,

     

    can some one please help me with the below?

    So i have 3 conditions coded. Lets say c1, c2, c3

    What i want to code

    1. check if c1 and c2 happen on a candle. for example, if c1 and c2 then…
    2. if step one is confirmed then for the next 20 candles look for c3.
    3. when step 2 happens, go long on the next bar

    for example, on current bar (lets call it )bar[0], c1 and c2 are met and then on 5th bar after bar[0] if c3 happens then open of 6th bar strategy should go long

    Would someone please help

    #83356

    When C1 snd C2 are met, the following 20 bars shall they still be true to allow C3 to be also true?

    What should happen if, after 20 bars, C3 has never been true, but C1 and C3 still are? Shall another 20 bars be tallied?

    #83357

    Unfoortunately, c1 and c2 show up on bar[0] and not continue till bar 20.

    and if c3 is not happened till 20 bars then all goes back to zero

     

    if that makes sense

    #83358

    Try this (not tested):

     

    2 users thanked author for this post.
    #83359

    that worked. thanks. really appreciate it

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