OPEN-SOURCE SCRIPT

Moving Average Exponential

50
//version=5
indicator("ETH Scalping Strategy", overlay=true)

// Define the short-term and medium-term EMAs
ema9 = ta.ema(close, 9)
ema21 = ta.ema(close, 21)

// Define RSI
rsi = ta.rsi(close, 14)

// Define Buy and Sell conditions
buyCondition = ta.crossover(ema9, ema21) and rsi > 50
sellCondition = ta.crossunder(ema9, ema21) and rsi < 50

// Plot the EMAs on the chart
plot(ema9, color=color.green, title="EMA 9", linewidth=2)
plot(ema21, color=color.red, title="EMA 21", linewidth=2)

// Plot buy/sell signals as arrows on the chart
plotshape(series=buyCondition, location=location.belowbar, color=color.green, style=shape.labelup, title="Buy Signal", text="BUY")
plotshape(series=sellCondition, location=location.abovebar, color=color.red, style=shape.labeldown, title="Sell Signal", text="SELL")

// Generate alerts based on buy/sell conditions
alertcondition(buyCondition, title="Buy Signal", message="ETH Buy Signal: EMA9 crossed above EMA21 and RSI > 50")
alertcondition(sellCondition, title="Sell Signal", message="ETH Sell Signal: EMA9 crossed below EMA21 and RSI < 50")

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.