The above alert script did not copy/paste properly and is getting an error, to avoid clutter, just replace the bottom section @ //Strategy
//Strategy
gc = c > o ? 1 : 0
rc = c < o ? 1 : 0
long = crossover(tema[2], sma[2]) and gc[1] == 1 and gc == 1 and rsi > sn
short = crossunder(tema[2], sma[2]) and rc[1] == 1 and rc == 1 and rsi < ln
plot(long, "long", color=green)
plot(short, "short", color=red)