DevLucem

Divergence

Library "Divergence"
Calculates a divergence between 2 series

bullish(_src, _low, depth) Calculates bullish divergence
  Parameters:
    _src: Main series
    _low: Comparison series (`low` is used if no argument is supplied)
    depth: Fractal Depth (`2` is used if no argument is supplied)
  Returns: 2 boolean values for regular and hidden divergence

bearish(_src, _high, depth) Calculates bearish divergence
  Parameters:
    _src: Main series
    _high: Comparison series (`high` is used if no argument is supplied)
    depth: Fractal Depth (`2` is used if no argument is supplied)
  Returns: 2 boolean values for regular and hidden divergence

I created this library to plug and play divergences in any code.
You can create a divergence indicator from any series you like.
Fractals are used to pinpoint the edge of the series. The higher the depth, the slower the divergence updates get.

My Plain Stochastic Divergence uses the same calculation. Watch it in action.

🤖🤖🤖🤖🤖🤖🤖🤖🤖🤖
Automate TradingView Alerts
tradingview.to/anywhere
🥰😍😍🥰😍😍🥰😍😍🥰
Libreria Pine

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 utilizzare questa libreria in privato o all'interno di altre pubblicazioni open-source, ma il riutilizzo del codice è subordinato al rispetto del Regolamento.

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 questa libreria?

Copia il testo ed incollalo nel tuo script.