OPEN-SOURCE SCRIPT

EMA

//version=5
indicator("Shiba Inu EMA Crossover Alerts", overlay=true)

// Input Parameters
shortLength = input(9, title="Short EMA Length")
longLength = input(21, title="Long EMA Length")

// EMA Calculations
shortEMA = ta.ema(close, shortLength)
longEMA = ta.ema(close, longLength)

// Crossover Conditions
bullishCross = ta.crossover(shortEMA, longEMA)
bearishCross = ta.crossunder(shortEMA, longEMA)

// Plot EMAs
plot(shortEMA, color=color.blue, title="Short EMA", linewidth=2)
plot(longEMA, color=color.red, title="Long EMA", linewidth=2)

// Buy and Sell Signals
plotshape(series=bullishCross, location=location.belowbar, color=color.green, style=shape.labelup, title="Buy Signal")
plotshape(series=bearishCross, location=location.abovebar, color=color.red, style=shape.labeldown, title="Sell Signal")

// Alerts
alertcondition(bullishCross, title="Buy Alert", message="Shiba Inu Buy Signal: Short EMA crossed above Long EMA!")
alertcondition(bearishCross, title="Sell Alert", message="Shiba Inu Sell Signal: Short EMA crossed below Long EMA!")

Declinazione di responsabilità