fix: Filter plotshape signals by direction mode (visual bug fix)
This commit is contained in:
@@ -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(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)
|
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)
|
// Only show signals that match direction mode
|
||||||
plotshape(finalShortSignal, title="Sell", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
|
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
|
// DEBUG TABLE
|
||||||
|
|||||||
Reference in New Issue
Block a user