diff --git a/Bullmania_Money_Line_v4_plus.pine b/Bullmania_Money_Line_v4_plus.pine index 6b0d723..68f93c2 100644 --- a/Bullmania_Money_Line_v4_plus.pine +++ b/Bullmania_Money_Line_v4_plus.pine @@ -53,6 +53,7 @@ showGatedMarkers = input.bool(true, "Show gated markers (triangles)") 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") +showFlipLevelValue = input.bool(true, "Show Flip Level value label") // ============================= // Per-timeframe profiles (optional) @@ -355,6 +356,15 @@ 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) +// Optional always-visible value label at current bar +var label flipValLbl = na +if showFlipLevelValue and not na(flipLevel) + if not na(flipValLbl) + label.delete(flipValLbl) + flipLblCol = flipLineAutoColor ? (trend == 1 ? color.new(color.green, 0) : color.new(color.red, 0)) : flipLineCustomCol + flipValLbl := label.new(bar_index, flipLevel, text="Flip Level: " + str.tostring(flipLevel, format.mintick), + style=label.style_label_left, color=flipLblCol, textcolor=color.white, yloc=yloc.price, size=size.tiny) + 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)