Pine Script (TradingView)
This is a TradingView Pine Script example for this indicator. Paste it into the TradingView Pine Editor, add it to your chart, and adjust inputs for your market and timeframe.
//@version=6
indicator("Exponential Moving Average (EMA)", overlay=true)
fastLen = input.int(12, "Fast EMA")
slowLen = input.int(26, "Slow EMA")
fast = ta.ema(close, fastLen)
slow = ta.ema(close, slowLen)
bullish = ta.crossover(fast, slow)
bearish = ta.crossunder(fast, slow)
plotshape(bullish, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small, title="Buy")
plotshape(bearish, style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small, title="Sell")
plot(fast, "EMA Fast", color=color.aqua)
plot(slow, "EMA Slow", color=color.orange)