OPEN-SOURCE SCRIPT

RSI Divergence

72
//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)

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.