1 tes

9
//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

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。