Not exactly sure what you mean by ‘catch’?
We do not know that a run of red bars has come to an end until we have a set of dots that is not a run of red dots and not a run of green dots but a bunch of ‘indecision’ mixed dots.
If you just want to know at the close of a bar that it has been a run of 8 red dots then this should simply do that:
if down = 5 and dcount = 8 then
The next set could be a 9th set of red dots and the original code was about spotting the end of runs and not just about counting them!
Thank you Vonasi. Catch ≈ trigger
Of course
I will try that in combination with other expressions
Thanks for your patience!