I would like to create a data series that simply logs the number of cumulative up (or down) days for an indicator. For example, if at eod today the lower Bollinger Band has closed lower each day for the past 4 days the series will show "-4" ; and, of cource, it would have shown -3,-2,-1 reading backwards from today; if tomorrow it closes up, the dataseries will say "+1" and so on
( the duration series could be used for other indicators too eg Rsi)
If there is something like this aready avalialable, or if somebody has created code for the idea please could you point me in its direction. ( I can't work out how to insert an "if" statement in creating a data series) Thank You
Size:
Color:
See CumUp, CumDown.
Size:
Color:
??
In CumUp, to "test whether a specific number of consecutive bars have elapsed where prices are greater than their value a certain number of bars ago" the indicator asks for that specific number. The duration series I am looking for is open ended in that it seeks to count how many bars of cumup have ocurred - which may be 1 or any number greater than 1 - (rather than a specified number). How could Cumup be used for this purpose?
Size:
Color:
Something like this?
CODE:
Please log in to see this code.
Size:
Color:
Brilliant, Thank you v m
a little different from what I had in mind ( . . . . .but maybe even more interesting)
Size:
Color:
You're welcome.
Size:
Color: