Simple indicator with two exponential moving averages and crossover alert.
Why didn't this exist already?
Why didn't this exist already?
//@version=2 study("WJA double EMA", overlay=true) slowperiod = input(50, title="Slow EMA period", minval=1, type=integer) fastperiod = input(20, title="Fast EMA period", minval=1, type=integer) slowema = ema(close, slowperiod) fastema = ema(close, fastperiod) plot(slowema, color=blue, linewidth=2, title="Slow EMA") plot(fastema, color=fuchsia, linewidth=2, title="Fast EMA") plot(cross(slowema,fastema) ? fastema : na, style=circles, linewidth=4, color=slowema>fastema ? red : green) alertcondition(cross(slowema,fastema), title="EMA cross", message="EMA cross")