OPEN-SOURCE SCRIPT

RSI EMA Candle Size Strategy

111
//version=5
strategy("RSI EMA Candle Size Strategy", overlay=true)

// Indikator teknikal
emaFast = ta.ema(close, 10)
emaSlow = ta.ema(close, 50)
rsiValue = ta.rsi(close, 14)
candleSize = math.abs(close - open)

// Kondisi Buy
buyCondition = rsiValue < 51 and emaFast < emaSlow and candleSize < 0.00025
if buyCondition
strategy.entry("BUY", strategy.long)
alert("BUY", alert.freq_once_per_bar_close)

// Kondisi Sell
sellCondition = rsiValue > 49 and emaFast > emaSlow and candleSize < 0.00025
if sellCondition
strategy.entry("SELL", strategy.short)
alert("SELL", alert.freq_once_per_bar_close)

// Plot
plot(emaFast, title="EMA 10", color=color.orange)
plot(emaSlow, title="EMA 50", color=color.blue)

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.