So there is a certain number of bars
I want to write a logical expression in such a format that if 3 bars are placed in the height of the first bar then do so-and-so.
The condition as we can see is fulfilled here there are 3 bars that are placed in the height of the 1st bar so I did not screw up. I need to count the number of elements that appear in this condition. You can do this in 2 ways to calculate the date of the first element (1st element under the number 1) and calculate the date of the last element (under the number 4) but how to do this I do not know. After calculating the dates, you can count the number of elements between them using the Bars function and, as I understand it, return the number. The second way is to count the number of elements using the ArrayRange array function, but in this case you need to declare an array and somehow pass the data from the condition to the array. Who can help you determine the dates or pass data from the condition to the array in order to eventually count the number of elements in the condition in order to use it later?