OPEN-SOURCE SCRIPT

RSI Divergence

68
//version=5
indicator("RSI Divergence", overlay=false)

// Paramètres
length = input.int(14, title="RSI Length")
src = close

// Calcul du RSI avec SMA
rsiSMA = ta.rsi(src, length)
rsiSMA_smoothed = ta.sma(rsiSMA, length)

// Calcul du RSI avec WMA
rsiWMA = ta.rsi(src, length)
rsiWMA_smoothed = ta.wma(rsiWMA, length)

// Différence entre les deux RSI
rsiDiff = rsiSMA_smoothed - rsiWMA_smoothed

// Tracer la différence
plot(rsiDiff, title="RSI Divergence", color=color.blue)

// Tracer une ligne à zéro pour référence
hline(0, "Zero Line", color=color.gray)

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.