Updating loop criteria as the loop happens
-
Hi Guys
So basic idea is I have a set of three conditions applied to candles 0, 1, and 2. If the conditions fail I want the conditions to run again but "shifted" one back (ie use candles 1, 2 and 3) and so on until all conditions pass. I really have no clue where to start on this one so would appreciate any suggestions.
-
Also interested but really have no idea
-
This might be a starting point (not tested)

If the 3 conditions are not met at the same time, false output of block 4 passes and the Candle IDs are incresed by one. The conditions Will be evaluated again for the next tick or bar but with the increased candle IDs.
-
Thanks that does work. Just one question. In the below example the loop works perfectly and keeps drawing lines lets say 10 days back. When I add the condition for a bull/bear day(using either condition blocks or bull blocks) it stops working and only passes block 26 going forward. Not sure why?

-
Do you reset Candle ID to 0 before the loop starts?