//version=5
indicator("Kombinasi Sinyal Beli dan Jual", overlay=true)

// Input Parameter
emaFastLength = input(9, title="Panjang EMA Cepat")
emaSlowLength = input(21, title="Panjang EMA Lambat")
rsiLength = input(14, title="Panjang RSI")
rsiOverbought = input(70, title="RSI Overbought Level")
rsiOversold = input(30, title="RSI Oversold Level")

// Kalkulasi Indikator
emaFast = ta.ema(close, emaFastLength)
emaSlow = ta.ema(close, emaSlowLength)
rsi = ta.rsi(close, rsiLength)

// Logika Beli dan Jual
buySignal = ta.crossover(emaFast, emaSlow) or (rsi < rsiOversold and ta.crossover(rsi, rsiOversold))
sellSignal = ta.crossunder(emaFast, emaSlow) or (rsi > rsiOverbought and ta.crossunder(rsi, rsiOverbought))

// Plot EMA
plot(emaFast, color=color.green, title="EMA Cepat")
plot(emaSlow, color=color.red, title="EMA Lambat")

// Tandai Sinyal
plotshape(series=buySignal, location=location.belowbar, color=color.new(color.green, 0), style=shape.labelup, title="Beli", text="Beli")
plotshape(series=sellSignal, location=location.abovebar, color=color.new(color.red, 0), style=shape.labeldown, title="Jual", text="Jual")
Harmonic PatternsTechnical IndicatorsTrend Analysis

Haftungsausschluss