OPEN-SOURCE SCRIPT

Gold Signal System + Alerts

65
// GOLD SIGNAL SYSTEM + ALERTS
//version=5
indicator("Gold Signal System + Alerts", overlay=true)

// EMAs
ema50 = ta.ema(close, 50)
ema200 = ta.ema(close, 200)

// Conditions
buySignal = ta.crossover(ema50, ema200)
sellSignal = ta.crossunder(ema50, ema200)

// Plot
plot(ema50, color=color.yellow)
plot(ema200, color=color.blue)

// Signals
plotshape(buySignal, title="BUY", style=shape.labelup, color=color.new(color.green,0), text="BUY", size=size.small)
plotshape(sellSignal, title="SELL", style=shape.labeldown, color=color.new(color.red,0), text="SELL", size=size.small)

// Alerts
alertcondition(buySignal, title="Buy Signal", message="BUY signal on GOLD")
alertcondition(sellSignal, title="Sell Signal", message="SELL signal on GOLD")

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.