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
- check if c1 and c2 happen on a candle. for example, if c1 and c2 then…
- if step one is confirmed then for the next 20 candles look for c3.
- 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
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?
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
that worked. thanks. really appreciate it