This script analyses divergences for 11 predefined indicators and then draws column on the graph. Red columns for negatif divergence (means prices may go down or trend reversal), Lime columns for positive divergences (means prices may go up or trend reversal)
The script uses and on each bar it checks divergence between last and current High/Low and if it finds any divergence then immediately draws column. There is no Latency/Lag.
There are predefined 11 indicators in the script, which are , , Histogram, , , Momentum, OBV, Diosc, VWMACD, CMF and .
Smaller Period check smaller areas and if you use smaller numbers it would be more sensitive and may give alerts very often. So you should set it accordingly.
There is "Check Cut-Through in indicators" option, I recomment you to enable it. it checks that there is cut-through in indicators or not, if no cut-through then it's shown as valid divergence.
You should see following one as well if you haven't yet:
I'm trying to build a multi time frame support and resistance indicator, as well as maybe trendlines.
Not sure of the path to take, I have a fair experience in coding, but not so familiar with PineScript yet.
I am learning a lot reading yours !
Anyhow, thank you and best of success !