[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

counting # bars since



PureBytes Links

Trading Reference Links

lets say you have a formula that returns a value of "1" if true, "0" if
false.  for this example lets say you are testing for an inside bar.  so if
we have an inside bar, our formula gives us a "1."

QUESTION:

if i want to count the number of bars since an inside bar, is there a
counter formula?  here are the results id like to see.


BAR    INSIDE    COUNT

1      Y         1
2      N         2
3      N         3 
4      N         4
5      N         5 
6      N         6
7      Y         1
8      N         2
9      N         3
10     N         4
11     Y         1 
12     N         2

THANKS!