An idea I had today morning so I had to write. It seems to detect trends well. It has three phases like a semaphor, painting the chart bars of green, yellow or red.
=== Bar Color Meaning ===
Yellow: don't care
I think it can be useful!
Pinescript requires many of its built-in functions to use a simple int as their period length, which entails the period length cannot vary during the script's execution. These functions allow using a series int or series float for their period length, which means it can vary on each bar.
The functions shared in this script include:
Rolling sum: ...
IDEA is to easily spot the length of a calm periods based on OBV.
Some says that after a longer OBV-calm (but not supercalm) period up or down rallies are somewhat more likely)
METHOD: variance of OBV
ADVISE: cannot be used on its own, just with others (RSI, CCI, Coppock, MACD etc.)
Period shall be adjusted to the market.
PERSONAL: I also use it to evaluate...