From 1f8630862c6ae6fa33f24eaf9f5b52e3e81899f6 Mon Sep 17 00:00:00 2001 From: mindesbunister Date: Fri, 2 Jan 2026 19:29:36 +0100 Subject: [PATCH] fix: Filter plotshape signals by direction mode (visual bug fix) --- workflows/trading/moneyline_v11_2_strategy.pinescript | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/workflows/trading/moneyline_v11_2_strategy.pinescript b/workflows/trading/moneyline_v11_2_strategy.pinescript index 921830a..6b80f26 100644 --- a/workflows/trading/moneyline_v11_2_strategy.pinescript +++ b/workflows/trading/moneyline_v11_2_strategy.pinescript @@ -200,8 +200,12 @@ downTrend = trend == -1 ? supertrend : na plot(upTrend, "Up Trend", color=color.new(color.green, 0), style=plot.style_linebr, linewidth=2) plot(downTrend, "Down Trend", color=color.new(color.red, 0), style=plot.style_linebr, linewidth=2) -plotshape(finalLongSignal, title="Buy", location=location.belowbar, color=color.lime, style=shape.triangleup, size=size.small) -plotshape(finalShortSignal, title="Sell", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small) +// Only show signals that match direction mode +showLongSignal = finalLongSignal and allowLong +showShortSignal = finalShortSignal and allowShort + +plotshape(showLongSignal, title="Buy", location=location.belowbar, color=color.lime, style=shape.triangleup, size=size.small) +plotshape(showShortSignal, title="Sell", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small) // ============================================================================= // DEBUG TABLE