EltAlt

Price Divergence Indicator

This Price Divergence Indicator indicator modifies the standard Divergence Indicator to look for price divergences between the current chart and any other selected TradingView chart.

The thesis that this indicator is built upon:
Prices on assets or indices that are normally correlated move in lock step. Where there are deviations between the confirmed highs or lows of two assets or indices it is likely that they will "catch up" in the near future.

By default it will load the price data for the SPX and look for price divergences on the current chart timeframe. Any TradingView Symbol can be selected as the 'Comparison Source' and any timeframe. Some of the options I've been trying out include:
SPX vs NDQ
XAO vs SPX
UK100 vs NDQM
MSFT vs NDQM
GOOG vs NDQM
AMZN vs MSFT
BTC vs ETH
BTC vs NDQ
BTC vs DXY
I've found looking for divergences on a longer timeframe can be useful and don't expect any meaningful results if you set it to shorter than chart timeframes.

Alerts can be created based on any of the divergences and the 'Backtest Buy Signal' can be used to send notification to a backtester (bull = 2, hidden bull = 1, neutral = 0, hidden bear = -1, bear = -2), this is plotted to display.none, so enable it in Settings - Style and disable all other plots to see it.

Divergences are measured between the CONFIRMED peaks of the two charts. The confirmation timeframe is set using 'Pivot Lookback Right'. The lower the lookback the quicker the signal and the more likely it is to not have hit an actual peak, a higher lookback will give a much more dependable signal but the move may be finished by the time the alert actually fires. The "Plot When Alerts Fire" option should give you an idea (top and bottom triangles) of what to expect, but you should watch bar replays to understand how your setting will impact when alerts are created and potential false positives.
Script open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

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.

Vuoi usare questo script sui tuoi grafici?