PROTECTED SOURCE SCRIPT
Aggiornato Stochastic RSI with Divergences

This indicator is Stochastic RSI using code loops* rather than pivot low/high functions.
The pivot low/high function provided by Pine Script requires a set number of bars to pass prior to locating a swing low/high.
This can mean large moves have occurred prior to a swing low having passed if the lookback range was set to five bars (5).
5 bars on a 2 hour chart is a long time and large moves may be missed.
As I don't use these functions, there is no requirement for a set number of bars to have passed prior to swing low/high positions to be identified.
This means it doesn't rely on a set number of bars to pass prior to finding a new pivot point.
* Code loops are a function which will check conditions in a range until a defined condition is met.
In this case a pivot low is a bar with no lower bars within 3 bars either side of the current checked bar.
Additional:
Lines will redraw and delete previous divergences to remove clutter on the indicator.
A table cells for alternate timeframe Stochastic RSI values so you don't need to swap between charts constantly.
How it works:
The first lookback finds an initial low/high within a small range of the current bar. (default of 10)
This low/high must be the lowest/highest point within 3 bars either side.
The second low/high must be over 5 bars prior to the recent low and a max range of previous lookback. (default of 30)
This low/high must be the lowest/highest point within 3 bars either side.
If a divergence is found, it will draw the divergence on the indicator and delete the prior line drawn.
Personal note:
Personally coded functions for my personal use, though others may find use with it.
The pivot low/high function provided by Pine Script requires a set number of bars to pass prior to locating a swing low/high.
This can mean large moves have occurred prior to a swing low having passed if the lookback range was set to five bars (5).
5 bars on a 2 hour chart is a long time and large moves may be missed.
As I don't use these functions, there is no requirement for a set number of bars to have passed prior to swing low/high positions to be identified.
This means it doesn't rely on a set number of bars to pass prior to finding a new pivot point.
* Code loops are a function which will check conditions in a range until a defined condition is met.
In this case a pivot low is a bar with no lower bars within 3 bars either side of the current checked bar.
Additional:
Lines will redraw and delete previous divergences to remove clutter on the indicator.
A table cells for alternate timeframe Stochastic RSI values so you don't need to swap between charts constantly.
How it works:
The first lookback finds an initial low/high within a small range of the current bar. (default of 10)
This low/high must be the lowest/highest point within 3 bars either side.
The second low/high must be over 5 bars prior to the recent low and a max range of previous lookback. (default of 30)
This low/high must be the lowest/highest point within 3 bars either side.
If a divergence is found, it will draw the divergence on the indicator and delete the prior line drawn.
Personal note:
Personally coded functions for my personal use, though others may find use with it.
Note di rilascio
UpdateNote di rilascio
Incorrect update fixNote di rilascio
Alerts for DivergencesScript protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarlo liberamente e senza alcuna limitazione – per saperne di più clicca qui.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarlo liberamente e senza alcuna limitazione – per saperne di più clicca qui.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.