Wait 1 Candle Block
-
Hi guys.
I am currently working with timeless candles (renkos, range bars, etc). A new candle is opened only when a certain amout of volume or pips is achieved, time is not a factor.
How do I tell my EA to wait 1 candle? I don't want it to close a trade on the same candle it was opened, even if exit conditions are met.
I am basically looking for a "Wait 1 Candle" type of block. Like this: Open trade -> Wait 1 Candle. Then my EA can continue to check exit conditions.
A little more explanaion: You might sugest me "Just use Candle ID 1 to check previous Candle". It's not what I am looking for, because my exit strategy should work on current Candle (ID 0), but that can't happen on the same candle the trade was opened.
Thank you for reading!
-
Nevermind, I figured it out.
When a trade is opened, I draw an arrow on current candle and use "Turn OFF Block" to turn my "Close Trades" block off.
Then I have a condition looking for arrows drawn on previous candle (Loop for objects by name). When the arrow is detected, i use "Turn ON Block" to turn on "Close Trades" block again.
-
simply set your conditions to candle one then have a once per bar block on top followed by your conditions .
It will pass once the first thing it does when a new bar is created and only once , simple is often the way to go