BINANCE:MANTAUSDT   MANTA / TetherUS
//@version=4
study("Indikator Beli/Jual Akurat", shorttitle="IBJA", overlay=true)

// Parameter RSI dan Bollinger Bands
rsiPeriode = input(14, title="Periode RSI")
rsiOverbought = input(70, title="RSI Overbought")
rsiOversold = input(30, title="RSI Oversold")
lengthBB = input(20, title="Panjang Bollinger Bands")
multBB = input(2, title="Multiplier Bollinger Bands")
price = close

// Menghitung RSI dan Bollinger Bands
rsi = rsi(price, rsiPeriode)
upperBB, middleBB, lowerBB = bollingerbands(price, lengthBB, multBB)

// Kondisi untuk sinyal beli dan jual
buySignal = crossover(rsi, rsiOversold) and crossover(price, lowerBB)
sellSignal = crossunder(rsi, rsiOverbought) and crossunder(price, upperBB)

// Plot sinyal pada grafik
plotshape(series=buySignal, title="Sinyal Beli", location=location.belowbar, color=color.green, style=shape.triangleup, text="Beli")
plotshape(series=sellSignal, title="Sinyal Jual", location=location.abovebar, color=color.red, style=shape.triangledown, text="Jual")

// Menampilkan RSI dan Bollinger Bands pada grafik
hline(rsiOverbought, "Overbought", color=color.red)
hline(rsiOversold, "Oversold", color=color.green)
plot(rsi, "RSI", color=color.blue)
plot(upperBB, "Upper BB", color=color.red)
plot(lowerBB, "Lower BB", color=color.green)

// Alert
alertcondition(buySignal, title="Beli Alert", message="Sinyal beli terdeteksi!")
alertcondition(sellSignal, title="Jual Alert", message="Sinyal jual terdeteksi!")
Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.