Short Description:

This script displays Buy and Sell arrows based on MACD line crossovers, helping traders spot entry and exit points with clarity. Ideal for trend-following strategies on any timeframe.



There are 2 script , copy and paste it and ready to use.
//@version=5
indicator("MACD Crossover Arrows", overlay=true)
// =========================
//
Indicator by Shield
//
Forum: https://forexindicatorzone.com/
//
Telegram: https://t.me/Mt4indicatorsByshield
// =========================
[macdLine, signalLine, hist] = ta.macd(close, 12, 26, 9)
bullCross = ta.crossover(macdLine, signalLine)
bearCross = ta.crossunder(macdLine, signalLine)
plotshape(bullCross, title="Buy Arrow", location=location.belowbar, style=shape.labelup, color=color.green, size=size.small, text="Buy", textcolor=color.white, offset=-1)
plotshape(bearCross, title="Sell Arrow", location=location.abovebar, style=shape.labeldown, color=color.red, size=size.small, text="Sell", textcolor=color.white, offset=-1)
indicator("MACD Crossover Arrows", overlay=true)
// =========================
//

//

//

// =========================
[macdLine, signalLine, hist] = ta.macd(close, 12, 26, 9)
bullCross = ta.crossover(macdLine, signalLine)
bearCross = ta.crossunder(macdLine, signalLine)
plotshape(bullCross, title="Buy Arrow", location=location.belowbar, style=shape.labelup, color=color.green, size=size.small, text="Buy", textcolor=color.white, offset=-1)
plotshape(bearCross, title="Sell Arrow", location=location.abovebar, style=shape.labeldown, color=color.red, size=size.small, text="Sell", textcolor=color.white, offset=-1)
//@version=5
indicator("MACD Subwindow (with Histogram)", overlay=false)
fastLen = input.int(12, title="Fast EMA")
slowLen = input.int(26, title="Slow EMA")
signalLen = input.int(9, title="Signal Smoothing")
[macdLine, signalLine, hist] = ta.macd(close, fastLen, slowLen, signalLen)
plot(macdLine, title="MACD Line", color=color.green, linewidth=2)
plot(signalLine, title="Signal Line", color=color.orange, linewidth=2)
plot(hist, title="Histogram", style=plot.style_columns, color=hist >= 0 ? color.lime : color.red)
indicator("MACD Subwindow (with Histogram)", overlay=false)
fastLen = input.int(12, title="Fast EMA")
slowLen = input.int(26, title="Slow EMA")
signalLen = input.int(9, title="Signal Smoothing")
[macdLine, signalLine, hist] = ta.macd(close, fastLen, slowLen, signalLen)
plot(macdLine, title="MACD Line", color=color.green, linewidth=2)
plot(signalLine, title="Signal Line", color=color.orange, linewidth=2)
plot(hist, title="Histogram", style=plot.style_columns, color=hist >= 0 ? color.lime : color.red)