Good afternoon my friend, this worked, however in the case you showed me it counts 120 candles from when the expert was started, I would like to count 120 candles in the past, that is, always updating the current candle and eliminating the last one, keeping So the record always records the last 120 candles, I found a related structure on a forum that would be the same as what I need, but I don't have access to the parameters, it would be something like this

Posts made by LucasTavares120
-
RE: count how many bullish or bearish candlesposted in Questions & Answers
-
count how many bullish or bearish candlesposted in Questions & Answers
Hey guys, how are you? I've been trying for a few days to make a candle counter, it would be something simple, I want to count the last 120 candles, I want to know how many of them were high and how many were low, I just can't do this past verification loop, I can put together the rest of the structure , does anyone know how I can do this loop?
The idea would be to then do a percentage to see how many of the 120% are high and how many are low, but I know how to do that part, I really can't do this past check.