OPEN-SOURCE SCRIPT
Diupdate

TA Trading Signal Bot

90
//version=5
indicator(title="TA Trading Signal Bot", overlay=true)

// Input settings
lengthEMA = input(20, title="EMA Length")
lengthRSI = input(14, title="RSI Length")
overbought = input(70, title="RSI Overbought Level")
oversold = input(30, title="RSI Oversold Level")

// Indicators
ema = ta.ema(close, lengthEMA)
rsi = ta.rsi(close, lengthRSI)
macdline = ta.ema(close, 12) - ta.ema(close, 26)
signalline = ta.ema(macdline, 9)

// Buy/Sell Conditions
crossoverRSI = ta.crossover(rsi, oversold)
crossoverMACD = ta.crossover(macdline, signalline)
buySignal = crossoverRSI and close > ema and crossoverMACD

// Plot Buy Signal
plotshape(series=buySignal, location=location.belowbar, color=color.green, style=shape.labelup, title="BUY Signal")
Catatan Rilis
//version=5
indicator(title="TA Trading Signal Bot", overlay=true)

// Input settings
lengthEMA = input(20, title="EMA Length")
lengthRSI = input(14, title="RSI Length")
overbought = input(70, title="RSI Overbought Level")
oversold = input(30, title="RSI Oversold Level")

// Indicators
ema = ta.ema(close, lengthEMA)
rsi = ta.rsi(close, lengthRSI)
macdline = ta.ema(close, 12) - ta.ema(close, 26)
signalline = ta.ema(macdline, 9)

// Buy/Sell Conditions
buySignal = ta.crossover(rsi, oversold) and close > ema and ta.crossover(macdline, signalline)
sellSignal = ta.crossunder(rsi, overbought) and close < ema

// Plot Buy & Sell Signals
plotshape(series=buySignal, location=location.belowbar, color=color.green, style=shape.labelup, title="BUY Signal")
plotshape(series=sellSignal, location=location.abovebar, color=color.red, style=shape.labeldown, title="SELL Signal")

Pernyataan Penyangkalan

Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.