OPEN-SOURCE SCRIPT
Moving Average Exponential

//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")
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")
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。