Pine Script (TradingView)
Este es un ejemplo de Pine Script de TradingView para este indicador. Pegalo en el Editor Pine de TradingView, agregalo al grafico y ajusta los parametros para tu mercado y temporalidad.
//@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)