Hma rsi

6
//version=5
indicator("HMA + RSI Buy/Sell Signal", overlay=true)

// Parameter
hma_period = 21
rsi_period = 14
rsi_oversold = 30
rsi_overbought = 70

// Hitung HMA
hma = ta.hma(close, hma_period)

// Hitung RSI
rsi = ta.rsi(close, rsi_period)

// Sinyal Buy (Green Line)
buy_signal = ta.crossover(rsi, rsi_oversold) and hma > hma[1]

// Sinyal Sell (Red Line)
sell_signal = ta.crossunder(rsi, rsi_overbought) and hma < hma[1]

// Gambar garis hijau untuk sinyal buy
plot(buy_signal ? low - 0.5 : na, style=plot.style_line

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.