From 977f53dc75874ce5ac135a9f1beb7afd8780be5e Mon Sep 17 00:00:00 2001 From: mindesbunister Date: Fri, 17 Oct 2025 11:31:25 +0200 Subject: [PATCH] v4+: add persistent Flip Level line with optional auto-coloring and price tracking --- Bullmania_Money_Line_v4_plus.pine | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Bullmania_Money_Line_v4_plus.pine b/Bullmania_Money_Line_v4_plus.pine index a76a018..6b0d723 100644 --- a/Bullmania_Money_Line_v4_plus.pine +++ b/Bullmania_Money_Line_v4_plus.pine @@ -1,5 +1,5 @@ //@version=6 -indicator("Bullmania Money Line v4+ (optional filters)", overlay=true) +indicator("Bullmania Money Line v4+ multi time frame profiles (optional filters)", overlay=true) // ============================= // Base inputs (match v4 defaults) @@ -49,6 +49,10 @@ showCircles = input.bool(true, "Show flip circles (v4 style)") showFill = input.bool(true, "Shade price-to-line area") gateCircles = input.bool(false, "Gate flip circles with filters") showGatedMarkers = input.bool(true, "Show gated markers (triangles)") +// Flip level line (persistent) visuals +showFlipLevelLine = input.bool(true, "Show Flip Level line") +flipLineAutoColor = input.bool(true, "Flip line color by trend") +flipLineCustomCol = input.color(color.new(color.silver, 0), "Flip line custom color") // ============================= // Per-timeframe profiles (optional) @@ -345,6 +349,12 @@ signalsOk = adxOk and mtfOk and inSession and cooldownOk and trendMAOk and chopO upTrend = trend == 1 ? supertrend : na downTrend = trend == -1 ? supertrend : na +// Persistent Flip Level (holds value from last flip until next) +var float flipLevel = na +flipLevel := (flipUp or flipDn) ? supertrend : nz(flipLevel[1]) +flipLineColor = flipLineAutoColor ? (trend == 1 ? color.new(color.green, 0) : color.new(color.red, 0)) : flipLineCustomCol +plot(showFlipLevelLine ? flipLevel : na, title="Flip Level", color=flipLineColor, linewidth=2, trackprice=true) + 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)