Unstable DU and DD

I’m looking at a watchlist with some major ETFs, and have noticed something odd that I can’t figure out. When adding a script column and using DU() or DD(), it will calculate correctly when first added. After about 10 seconds, it re-calculates and puts everything at either a 1 or 0. For the symbol XBI, for example, it will show a reading of 5 (correctly) and then after about 10 seconds, changes that to 1. I’ve tried forcing the time frame to “day”, etc, and nothing seems to work - it keeps changing the values to 1 or 0. Any ideas on why?

Hi Jason,

I think this is because you are using realtime data and it’s confusing the lookback counts. As a workaround use the following to count the number of consecutive days up, ie how long since a negative close:

TIMESINCESIGNAL(CHANGE()<0)

And days down:

TIMESINCESIGNAL(CHANGE()>0)

Let us know if you have issues.