SMA SIGNALS
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © AbrahamAlgo

//@version=5
indicator("SMA Signals",overlay = true,timeframe = "")
sma1_input = input(20,"SMA 1")
sma2_input = input(40,"SMA 2")
sma1= ta.sma(close,sma1_input)
sma2= ta.sma(close,sma2_input)
long = ta.crossunder(sma2, sma1)
short = ta.crossover(sma2, sma1)
plotshape(long , title = "long1" , text = 'LONG',  style = shape.labelup,   location = location.belowbar, color= color.rgb(0, 102, 3), textcolor = color.white, size = size.tiny)
plotshape(short , title = "short1" , text = 'SHORT', style = shape.labeldown, location = location.abovebar, color= color.rgb(150, 0, 0),   textcolor = color.white, size = size.tiny)
alertcondition(long,title = "LONG", message = "OPEN LONG")
alertcondition(short,title = "SHORT", message = "OPEN SHORT")
// plot(sma1,color = color.rgb(82, 206, 255))
// plot(sma2,color = color.rgb(94, 82, 255))


