I edited some code that we got from ChatGPT that plots standard levels as a percent of a chosen block size when working with the Chart Bubbles, I discovered that it switches the plots at the 75% and 25% levels. Can't figure it out.
Code:
declare upper;
# ---------- Inputs
input block_Size = 100; # e.g., 50 or 100 for NQ/MNQ, 20 or 40 for ES/MES
input blocks_from_center = 5; # 0..10 blocks above/below
input anchorMode = {AutoNearestRound, ManualTop, default SessionOpen};
input manualTop = 24600.0;
# RTH window for SessionOpen anchor
input rthStartTime = 0930;
input rthEndTime = 1600;
# Show/hide levels
#input show110 = yes;
input show_100_level = yes;
input show_75_level = yes;
input show_50_level = yes;
input show_33_level = yes;
input show_25_level = yes;
# Widths (1..5 typical)
def w100 = 1;
def w075 = 1;
def w050 = 1;
def w033 = 1;
def w025 = 1;
# Per-level line styles
input style100 = {default DASH, SOLID, DOT};
input style075 = {default DASH, SOLID, DOT};
input style050 = {default DASH, SOLID, DOT};
input style033 = {default DASH, SOLID, DOT};
input style025 = {default DASH, SOLID, DOT};
# Global style override (style only; thickness via w###)
def forceSolid = no;
# Auto anchor lock (prevents vertical pickets when using Auto)
def holdAutoAnchor = yes;
# ---------- Colors
DefineGlobalColor("100", createColor(255, 64, 64));
DefineGlobalColor("075", Color.YELLOW);
DefineGlobalColor("050", Color.RED);
DefineGlobalColor("033", Color.CYAN);
DefineGlobalColor("025", Color.YELLOW);
DefineGlobalColor("BW", Color.WHITE);
# ---------- Helper: level price within a block
script lvlPrice {
input top = 0.0; # TOP of block
input blockSz = 100.0;
input k = 0; # block offset (+1 up / -1 down)
input pctDown = 0.0; # 0=top, 1=bottom, negative=above top
plot p = top + (k * blockSz) - (pctDown * blockSz);
}
def BES = Max(0, Min(10, blocks_from_center));
# ---------- Percents
def P25 = 0.25;
def P33 = 0.33;
def P50 = 0.50;
def P75 = 0.75;
def P100 = 1.00;
# Align “33% up from bottom” => 1 - P33 down from top
def P33_fromTop = P100 - P33;
# ---------- Session-open detector (RTH)
def inRTH = SecondsFromTime(rthStartTime) >= 0 and SecondsTillTime(rthEndTime) > 0;
def newRTH = inRTH and !inRTH[1];
def rthOpen = CompoundValue(1, if newRTH then open else rthOpen[1], open);
# ---------- Anchor selection (TOP of block) + daily lock for Auto
def nearestTop = Round(close / block_Size, 0) * block_Size;
def sessionTop = Round(rthOpen / block_Size, 0) * block_Size;
def isNewDay = GetYYYYMMDD() != GetYYYYMMDD()[1];
def autoTopLocked = CompoundValue(1, if isNewDay then nearestTop else autoTopLocked[1], nearestTop);
def topAnchor =
if anchorMode == anchorMode.ManualTop then manualTop
else if anchorMode == anchorMode.SessionOpen then sessionTop
else if holdAutoAnchor then autoTopLocked
else nearestTop;
# ---------- style helper (inline usage only)
# (Nothing to declare—styles chosen per-plot below.)
# =========================
# ====== PLOTS −3..+3 =====
# =========================
# ---- k = -10
plot m10_100 = if BES >= 10 and show_100_level then lvlPrice(topAnchor, block_Size, -10, 0) else Double.NaN;
m10_100.SetDefaultColor(GlobalColor("100")); m10_100.SetLineWeight(w100);
m10_100.SetStyle(if forceSolid then Curve.FIRM else if style100 == style100.DASH then Curve.SHORT_DASH else if style100 == style100.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m10_075 = if BES >= 10 and show_75_level then lvlPrice(topAnchor, block_Size, -10, P75) else Double.NaN;
m10_075.SetDefaultColor(GlobalColor("075")); m10_075.SetLineWeight(w075);
m10_075.SetStyle(if forceSolid then Curve.FIRM else if style075 == style075.DASH then Curve.SHORT_DASH else if style075 == style075.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m10_050 = if BES >= 10 and show_50_level then lvlPrice(topAnchor, block_Size, -10, P50) else Double.NaN;
m10_050.SetDefaultColor(GlobalColor("050")); m10_050.SetLineWeight(w050);
m10_050.SetStyle(if forceSolid then Curve.FIRM else if style050 == style050.DASH then Curve.SHORT_DASH else if style050 == style050.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m10_033 = if BES >= 10 and show_33_level then lvlPrice(topAnchor, block_Size, -10, P33_fromTop) else Double.NaN;
m10_033.SetDefaultColor(GlobalColor("033")); m10_033.SetLineWeight(w033);
m10_033.SetStyle(if forceSolid then Curve.FIRM else if style033 == style033.DASH then Curve.SHORT_DASH else if style033 == style033.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m10_025 = if BES >= 10 and show_25_level then lvlPrice(topAnchor, block_Size, -10, P25) else Double.NaN;
m10_025.SetDefaultColor(GlobalColor("025")); m10_025.SetLineWeight(w025);
m10_025.SetStyle(if forceSolid then Curve.FIRM else if style025 == style025.DASH then Curve.SHORT_DASH else if style025 == style025.DOT then Curve.LONG_DASH else Curve.FIRM);
# ---- k = -9
plot m9_100 = if BES >= 9 and show_100_level then lvlPrice(topAnchor, block_Size, -9, 0) else Double.NaN;
m9_100.SetDefaultColor(GlobalColor("100")); m9_100.SetLineWeight(w100);
m9_100.SetStyle(if forceSolid then Curve.FIRM else if style100 == style100.DASH then Curve.SHORT_DASH else if style100 == style100.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m9_075 = if BES >= 9 and show_75_level then lvlPrice(topAnchor, block_Size, -9, P75) else Double.NaN;
m9_075.SetDefaultColor(GlobalColor("075")); m9_075.SetLineWeight(w075);
m9_075.SetStyle(if forceSolid then Curve.FIRM else if style075 == style075.DASH then Curve.SHORT_DASH else if style075 == style075.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m9_050 = if BES >= 9 and show_50_level then lvlPrice(topAnchor, block_Size, -9, P50) else Double.NaN;
m9_050.SetDefaultColor(GlobalColor("050")); m9_050.SetLineWeight(w050);
m9_050.SetStyle(if forceSolid then Curve.FIRM else if style050 == style050.DASH then Curve.SHORT_DASH else if style050 == style050.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m9_033 = if BES >= 9 and show_33_level then lvlPrice(topAnchor, block_Size, -9, P33_fromTop) else Double.NaN;
m9_033.SetDefaultColor(GlobalColor("033")); m9_033.SetLineWeight(w033);
m9_033.SetStyle(if forceSolid then Curve.FIRM else if style033 == style033.DASH then Curve.SHORT_DASH else if style033 == style033.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m9_025 = if BES >= 9 and show_25_level then lvlPrice(topAnchor, block_Size, -9, P25) else Double.NaN;
m9_025.SetDefaultColor(GlobalColor("025")); m9_025.SetLineWeight(w025);
m9_025.SetStyle(if forceSolid then Curve.FIRM else if style025 == style025.DASH then Curve.SHORT_DASH else if style025 == style025.DOT then Curve.LONG_DASH else Curve.FIRM);
# ---- k = -8
plot m8_100 = if BES >= 8 and show_100_level then lvlPrice(topAnchor, block_Size, -8, 0) else Double.NaN;
m8_100.SetDefaultColor(GlobalColor("100")); m8_100.SetLineWeight(w100);
m8_100.SetStyle(if forceSolid then Curve.FIRM else if style100 == style100.DASH then Curve.SHORT_DASH else if style100 == style100.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m8_075 = if BES >= 8 and show_75_level then lvlPrice(topAnchor, block_Size, -8, P75) else Double.NaN;
m8_075.SetDefaultColor(GlobalColor("075")); m8_075.SetLineWeight(w075);
m8_075.SetStyle(if forceSolid then Curve.FIRM else if style075 == style075.DASH then Curve.SHORT_DASH else if style075 == style075.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m8_050 = if BES >= 8 and show_50_level then lvlPrice(topAnchor, block_Size, -8, P50) else Double.NaN;
m8_050.SetDefaultColor(GlobalColor("050")); m8_050.SetLineWeight(w050);
m8_050.SetStyle(if forceSolid then Curve.FIRM else if style050 == style050.DASH then Curve.SHORT_DASH else if style050 == style050.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m8_033 = if BES >= 8 and show_33_level then lvlPrice(topAnchor, block_Size, -8, P33_fromTop) else Double.NaN;
m8_033.SetDefaultColor(GlobalColor("033")); m8_033.SetLineWeight(w033);
m8_033.SetStyle(if forceSolid then Curve.FIRM else if style033 == style033.DASH then Curve.SHORT_DASH else if style033 == style033.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m8_025 = if BES >= 8 and show_25_level then lvlPrice(topAnchor, block_Size, -8, P25) else Double.NaN;
m8_025.SetDefaultColor(GlobalColor("025")); m8_025.SetLineWeight(w025);
m8_025.SetStyle(if forceSolid then Curve.FIRM else if style025 == style025.DASH then Curve.SHORT_DASH else if style025 == style025.DOT then Curve.LONG_DASH else Curve.FIRM);
# ---- k = -7
plot m7_100 = if BES >= 7 and show_100_level then lvlPrice(topAnchor, block_Size, -7, 0) else Double.NaN;
m7_100.SetDefaultColor(GlobalColor("100")); m7_100.SetLineWeight(w100);
m7_100.SetStyle(if forceSolid then Curve.FIRM else if style100 == style100.DASH then Curve.SHORT_DASH else if style100 == style100.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m7_075 = if BES >= 7 and show_75_level then lvlPrice(topAnchor, block_Size, -7, P75) else Double.NaN;
m7_075.SetDefaultColor(GlobalColor("075")); m7_075.SetLineWeight(w075);
m7_075.SetStyle(if forceSolid then Curve.FIRM else if style075 == style075.DASH then Curve.SHORT_DASH else if style075 == style075.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m7_050 = if BES >= 7 and show_50_level then lvlPrice(topAnchor, block_Size, -7, P50) else Double.NaN;
m7_050.SetDefaultColor(GlobalColor("050")); m7_050.SetLineWeight(w050);
m7_050.SetStyle(if forceSolid then Curve.FIRM else if style050 == style050.DASH then Curve.SHORT_DASH else if style050 == style050.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m7_033 = if BES >= 7 and show_33_level then lvlPrice(topAnchor, block_Size, -7, P33_fromTop) else Double.NaN;
m7_033.SetDefaultColor(GlobalColor("033")); m7_033.SetLineWeight(w033);
m7_033.SetStyle(if forceSolid then Curve.FIRM else if style033 == style033.DASH then Curve.SHORT_DASH else if style033 == style033.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m7_025 = if BES >= 7 and show_25_level then lvlPrice(topAnchor, block_Size, -7, P25) else Double.NaN;
m7_025.SetDefaultColor(GlobalColor("025")); m7_025.SetLineWeight(w025);
m7_025.SetStyle(if forceSolid then Curve.FIRM else if style025 == style025.DASH then Curve.SHORT_DASH else if style025 == style025.DOT then Curve.LONG_DASH else Curve.FIRM);
# ---- k = -6
plot m6_100 = if BES >= 6 and show_100_level then lvlPrice(topAnchor, block_Size, -6, 0) else Double.NaN;
m6_100.SetDefaultColor(GlobalColor("100")); m6_100.SetLineWeight(w100);
m6_100.SetStyle(if forceSolid then Curve.FIRM else if style100 == style100.DASH then Curve.SHORT_DASH else if style100 == style100.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m6_075 = if BES >= 6 and show_75_level then lvlPrice(topAnchor, block_Size, -6, P75) else Double.NaN;
m6_075.SetDefaultColor(GlobalColor("075")); m6_075.SetLineWeight(w075);
m6_075.SetStyle(if forceSolid then Curve.FIRM else if style075 == style075.DASH then Curve.SHORT_DASH else if style075 == style075.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m6_050 = if BES >= 6 and show_50_level then lvlPrice(topAnchor, block_Size, -6, P50) else Double.NaN;
m6_050.SetDefaultColor(GlobalColor("050")); m6_050.SetLineWeight(w050);
m6_050.SetStyle(if forceSolid then Curve.FIRM else if style050 == style050.DASH then Curve.SHORT_DASH else if style050 == style050.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m6_033 = if BES >= 6 and show_33_level then lvlPrice(topAnchor, block_Size, -6, P33_fromTop) else Double.NaN;
m6_033.SetDefaultColor(GlobalColor("033")); m6_033.SetLineWeight(w033);
m6_033.SetStyle(if forceSolid then Curve.FIRM else if style033 == style033.DASH then Curve.SHORT_DASH else if style033 == style033.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m6_025 = if BES >= 6 and show_25_level then lvlPrice(topAnchor, block_Size, -6, P25) else Double.NaN;
m6_025.SetDefaultColor(GlobalColor("025")); m6_025.SetLineWeight(w025);
m6_025.SetStyle(if forceSolid then Curve.FIRM else if style025 == style025.DASH then Curve.SHORT_DASH else if style025 == style025.DOT then Curve.LONG_DASH else Curve.FIRM);
# ---- k = -5
plot m5_100 = if BES >= 5 and show_100_level then lvlPrice(topAnchor, block_Size, -5, 0) else Double.NaN;
m5_100.SetDefaultColor(GlobalColor("100")); m5_100.SetLineWeight(w100);
m5_100.SetStyle(if forceSolid then Curve.FIRM else if style100 == style100.DASH then Curve.SHORT_DASH else if style100 == style100.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m5_075 = if BES >= 5 and show_75_level then lvlPrice(topAnchor, block_Size, -5, P75) else Double.NaN;
m5_075.SetDefaultColor(GlobalColor("075")); m5_075.SetLineWeight(w075);
m5_075.SetStyle(if forceSolid then Curve.FIRM else if style075 == style075.DASH then Curve.SHORT_DASH else if style075 == style075.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m5_050 = if BES >= 5 and show_50_level then lvlPrice(topAnchor, block_Size, -5, P50) else Double.NaN;
m5_050.SetDefaultColor(GlobalColor("050")); m5_050.SetLineWeight(w050);
m5_050.SetStyle(if forceSolid then Curve.FIRM else if style050 == style050.DASH then Curve.SHORT_DASH else if style050 == style050.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m5_033 = if BES >= 5 and show_33_level then lvlPrice(topAnchor, block_Size, -5, P33_fromTop) else Double.NaN;
m5_033.SetDefaultColor(GlobalColor("033")); m5_033.SetLineWeight(w033);
m5_033.SetStyle(if forceSolid then Curve.FIRM else if style033 == style033.DASH then Curve.SHORT_DASH else if style033 == style033.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m5_025 = if BES >= 5 and show_25_level then lvlPrice(topAnchor, block_Size, -5, P25) else Double.NaN;
m5_025.SetDefaultColor(GlobalColor("025")); m5_025.SetLineWeight(w025);
m5_025.SetStyle(if forceSolid then Curve.FIRM else if style025 == style025.DASH then Curve.SHORT_DASH else if style025 == style025.DOT then Curve.LONG_DASH else Curve.FIRM);
# ---- k = -4
plot m4_100 = if BES >= 4 and show_100_level then lvlPrice(topAnchor, block_Size, -4, 0) else Double.NaN;
m4_100.SetDefaultColor(GlobalColor("100")); m4_100.SetLineWeight(w100);
m4_100.SetStyle(if forceSolid then Curve.FIRM else if style100 == style100.DASH then Curve.SHORT_DASH else if style100 == style100.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m4_075 = if BES >= 4 and show_75_level then lvlPrice(topAnchor, block_Size, -4, P75) else Double.NaN;
m4_075.SetDefaultColor(GlobalColor("075")); m4_075.SetLineWeight(w075);
m4_075.SetStyle(if forceSolid then Curve.FIRM else if style075 == style075.DASH then Curve.SHORT_DASH else if style075 == style075.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m4_050 = if BES >= 4 and show_50_level then lvlPrice(topAnchor, block_Size, -4, P50) else Double.NaN;
m4_050.SetDefaultColor(GlobalColor("050")); m4_050.SetLineWeight(w050);
m4_050.SetStyle(if forceSolid then Curve.FIRM else if style050 == style050.DASH then Curve.SHORT_DASH else if style050 == style050.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m4_033 = if BES >= 4 and show_33_level then lvlPrice(topAnchor, block_Size, -4, P33_fromTop) else Double.NaN;
m4_033.SetDefaultColor(GlobalColor("033")); m4_033.SetLineWeight(w033);
m4_033.SetStyle(if forceSolid then Curve.FIRM else if style033 == style033.DASH then Curve.SHORT_DASH else if style033 == style033.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m4_025 = if BES >= 4 and show_25_level then lvlPrice(topAnchor, block_Size, -4, P25) else Double.NaN;
m4_025.SetDefaultColor(GlobalColor("025")); m4_025.SetLineWeight(w025);
m4_025.SetStyle(if forceSolid then Curve.FIRM else if style025 == style025.DASH then Curve.SHORT_DASH else if style025 == style025.DOT then Curve.LONG_DASH else Curve.FIRM);
# ---- k = -3
plot m3_100 = if BES >= 3 and show_100_level then lvlPrice(topAnchor, block_Size, -3, 0) else Double.NaN;
m3_100.SetDefaultColor(GlobalColor("100")); m3_100.SetLineWeight(w100);
m3_100.SetStyle(if forceSolid then Curve.FIRM else if style100 == style100.DASH then Curve.SHORT_DASH else if style100 == style100.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m3_075 = if BES >= 3 and show_75_level then lvlPrice(topAnchor, block_Size, -3, P75) else Double.NaN;
m3_075.SetDefaultColor(GlobalColor("075")); m3_075.SetLineWeight(w075);
m3_075.SetStyle(if forceSolid then Curve.FIRM else if style075 == style075.DASH then Curve.SHORT_DASH else if style075 == style075.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m3_050 = if BES >= 3 and show_50_level then lvlPrice(topAnchor, block_Size, -3, P50) else Double.NaN;
m3_050.SetDefaultColor(GlobalColor("050")); m3_050.SetLineWeight(w050);
m3_050.SetStyle(if forceSolid then Curve.FIRM else if style050 == style050.DASH then Curve.SHORT_DASH else if style050 == style050.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m3_033 = if BES >= 3 and show_33_level then lvlPrice(topAnchor, block_Size, -3, P33_fromTop) else Double.NaN;
m3_033.SetDefaultColor(GlobalColor("033")); m3_033.SetLineWeight(w033);
m3_033.SetStyle(if forceSolid then Curve.FIRM else if style033 == style033.DASH then Curve.SHORT_DASH else if style033 == style033.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m3_025 = if BES >= 3 and show_25_level then lvlPrice(topAnchor, block_Size, -3, P25) else Double.NaN;
m3_025.SetDefaultColor(GlobalColor("025")); m3_025.SetLineWeight(w025);
m3_025.SetStyle(if forceSolid then Curve.FIRM else if style025 == style025.DASH then Curve.SHORT_DASH else if style025 == style025.DOT then Curve.LONG_DASH else Curve.FIRM);
# ---- k = -2
plot m2_100 = if BES >= 2 and show_100_level then lvlPrice(topAnchor, block_Size, -2, 0) else Double.NaN;
m2_100.SetDefaultColor(GlobalColor("100")); m2_100.SetLineWeight(w100);
m2_100.SetStyle(if forceSolid then Curve.FIRM else if style100 == style100.DASH then Curve.SHORT_DASH else if style100 == style100.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m2_075 = if BES >= 2 and show_75_level then lvlPrice(topAnchor, block_Size, -2, P75) else Double.NaN;
m2_075.SetDefaultColor(GlobalColor("075")); m2_075.SetLineWeight(w075);
m2_075.SetStyle(if forceSolid then Curve.FIRM else if style075 == style075.DASH then Curve.SHORT_DASH else if style075 == style075.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m2_050 = if BES >= 2 and show_50_level then lvlPrice(topAnchor, block_Size, -2, P50) else Double.NaN;
m2_050.SetDefaultColor(GlobalColor("050")); m2_050.SetLineWeight(w050);
m2_050.SetStyle(if forceSolid then Curve.FIRM else if style050 == style050.DASH then Curve.SHORT_DASH else if style050 == style050.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m2_033 = if BES >= 2 and show_33_level then lvlPrice(topAnchor, block_Size, -2, P33_fromTop) else Double.NaN;
m2_033.SetDefaultColor(GlobalColor("033")); m2_033.SetLineWeight(w033);
m2_033.SetStyle(if forceSolid then Curve.FIRM else if style033 == style033.DASH then Curve.SHORT_DASH else if style033 == style033.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m2_025 = if BES >= 2 and show_25_level then lvlPrice(topAnchor, block_Size, -2, P25) else Double.NaN;
m2_025.SetDefaultColor(GlobalColor("025")); m2_025.SetLineWeight(w025);
m2_025.SetStyle(if forceSolid then Curve.FIRM else if style025 == style025.DASH then Curve.SHORT_DASH else if style025 == style025.DOT then Curve.LONG_DASH else Curve.FIRM);
# ---- k = -1
plot m1_100 = if BES >= 1 and show_100_level then lvlPrice(topAnchor, block_Size, -1, 0) else Double.NaN;
m1_100.SetDefaultColor(GlobalColor("100")); m1_100.SetLineWeight(w100);
m1_100.SetStyle(if forceSolid then Curve.FIRM else if style100 == style100.DASH then Curve.SHORT_DASH else if style100 == style100.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m1_075 = if BES >= 1 and show_75_level then lvlPrice(topAnchor, block_Size, -1, P75) else Double.NaN;
m1_075.SetDefaultColor(GlobalColor("075")); m1_075.SetLineWeight(w075);
m1_075.SetStyle(if forceSolid then Curve.FIRM else if style075 == style075.DASH then Curve.SHORT_DASH else if style075 == style075.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m1_050 = if BES >= 1 and show_50_level then lvlPrice(topAnchor, block_Size, -1, P50) else Double.NaN;
m1_050.SetDefaultColor(GlobalColor("050")); m1_050.SetLineWeight(w050);
m1_050.SetStyle(if forceSolid then Curve.FIRM else if style050 == style050.DASH then Curve.SHORT_DASH else if style050 == style050.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m1_033 = if BES >= 1 and show_33_level then lvlPrice(topAnchor, block_Size, -1, P33_fromTop) else Double.NaN;
m1_033.SetDefaultColor(GlobalColor("033")); m1_033.SetLineWeight(w033);
m1_033.SetStyle(if forceSolid then Curve.FIRM else if style033 == style033.DASH then Curve.SHORT_DASH else if style033 == style033.DOT then Curve.LONG_DASH else Curve.FIRM);
plot m1_025 = if BES >= 1 and show_25_level then lvlPrice(topAnchor, block_Size, -1, P25) else Double.NaN;
m1_025.SetDefaultColor(GlobalColor("025")); m1_025.SetLineWeight(w025);
m1_025.SetStyle(if forceSolid then Curve.FIRM else if style025 == style025.DASH then Curve.SHORT_DASH else if style025 == style025.DOT then Curve.LONG_DASH else Curve.FIRM);
# ---- k = 0 (center)
plot c_100 = if show_100_level then lvlPrice(topAnchor, block_Size, 0, 0) else Double.NaN;
c_100.SetDefaultColor(GlobalColor("100")); c_100.SetLineWeight(w100);
c_100.SetStyle(if forceSolid then Curve.FIRM else if style100 == style100.DASH then Curve.SHORT_DASH else if style100 == style100.DOT then Curve.LONG_DASH else Curve.FIRM);
plot c_075 = if show_75_level then lvlPrice(topAnchor, block_Size, 0, P75) else Double.NaN;
c_075.SetDefaultColor(GlobalColor("075")); c_075.SetLineWeight(w075);
c_075.SetStyle(if forceSolid then Curve.FIRM else if style075 == style075.DASH then Curve.SHORT_DASH else if style075 == style075.DOT then Curve.LONG_DASH else Curve.FIRM);
plot c_050 = if show_50_level then lvlPrice(topAnchor, block_Size, 0, P50) else Double.NaN;
c_050.SetDefaultColor(GlobalColor("050")); c_050.SetLineWeight(w050);
c_050.SetStyle(if forceSolid then Curve.FIRM else if style050 == style050.DASH then Curve.SHORT_DASH else if style050 == style050.DOT then Curve.LONG_DASH else Curve.FIRM);
plot c_033 = if show_33_level then lvlPrice(topAnchor, block_Size, 0, P33_fromTop) else Double.NaN;
c_033.SetDefaultColor(GlobalColor("033")); c_033.SetLineWeight(w033);
c_033.SetStyle(if forceSolid then Curve.FIRM else if style033 == style033.DASH then Curve.SHORT_DASH else if style033 == style033.DOT then Curve.LONG_DASH else Curve.FIRM);
plot c_025 = if show_25_level then lvlPrice(topAnchor, block_Size, 0, P25) else Double.NaN;
c_025.SetDefaultColor(GlobalColor("025")); c_025.SetLineWeight(w025);
c_025.SetStyle(if forceSolid then Curve.FIRM else if style025 == style025.DASH then Curve.SHORT_DASH else if style025 == style025.DOT then Curve.LONG_DASH else Curve.FIRM);
# ---- k = +1
plot p1_100 = if BES >= 1 and show_100_level then lvlPrice(topAnchor, block_Size, 1, 0) else Double.NaN;
p1_100.SetDefaultColor(GlobalColor("100")); p1_100.SetLineWeight(w100);
p1_100.SetStyle(if forceSolid then Curve.FIRM else if style100 == style100.DASH then Curve.SHORT_DASH else if style100 == style100.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p1_075 = if BES >= 1 and show_75_level then lvlPrice(topAnchor, block_Size, 1, P75) else Double.NaN;
p1_075.SetDefaultColor(GlobalColor("075")); p1_075.SetLineWeight(w075);
p1_075.SetStyle(if forceSolid then Curve.FIRM else if style075 == style075.DASH then Curve.SHORT_DASH else if style075 == style075.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p1_050 = if BES >= 1 and show_50_level then lvlPrice(topAnchor, block_Size, 1, P50) else Double.NaN;
p1_050.SetDefaultColor(GlobalColor("050")); p1_050.SetLineWeight(w050);
p1_050.SetStyle(if forceSolid then Curve.FIRM else if style050 == style050.DASH then Curve.SHORT_DASH else if style050 == style050.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p1_033 = if BES >= 1 and show_33_level then lvlPrice(topAnchor, block_Size, 1, P33_fromTop) else Double.NaN;
p1_033.SetDefaultColor(GlobalColor("033")); p1_033.SetLineWeight(w033);
p1_033.SetStyle(if forceSolid then Curve.FIRM else if style033 == style033.DASH then Curve.SHORT_DASH else if style033 == style033.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p1_025 = if BES >= 1 and show_25_level then lvlPrice(topAnchor, block_Size, 1, P25) else Double.NaN;
p1_025.SetDefaultColor(GlobalColor("025")); p1_025.SetLineWeight(w025);
p1_025.SetStyle(if forceSolid then Curve.FIRM else if style025 == style025.DASH then Curve.SHORT_DASH else if style025 == style025.DOT then Curve.LONG_DASH else Curve.FIRM);
# ---- k = +2
plot p2_100 = if BES >= 2 and show_100_level then lvlPrice(topAnchor, block_Size, 2, 0) else Double.NaN;
p2_100.SetDefaultColor(GlobalColor("100")); p2_100.SetLineWeight(w100);
p2_100.SetStyle(if forceSolid then Curve.FIRM else if style100 == style100.DASH then Curve.SHORT_DASH else if style100 == style100.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p2_075 = if BES >= 2 and show_75_level then lvlPrice(topAnchor, block_Size, 2, P75) else Double.NaN;
p2_075.SetDefaultColor(GlobalColor("075")); p2_075.SetLineWeight(w075);
p2_075.SetStyle(if forceSolid then Curve.FIRM else if style075 == style075.DASH then Curve.SHORT_DASH else if style075 == style075.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p2_050 = if BES >= 2 and show_50_level then lvlPrice(topAnchor, block_Size, 2, P50) else Double.NaN;
p2_050.SetDefaultColor(GlobalColor("050")); p2_050.SetLineWeight(w050);
p2_050.SetStyle(if forceSolid then Curve.FIRM else if style050 == style050.DASH then Curve.SHORT_DASH else if style050 == style050.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p2_033 = if BES >= 2 and show_33_level then lvlPrice(topAnchor, block_Size, 2, P33_fromTop) else Double.NaN;
p2_033.SetDefaultColor(GlobalColor("033")); p2_033.SetLineWeight(w033);
p2_033.SetStyle(if forceSolid then Curve.FIRM else if style033 == style033.DASH then Curve.SHORT_DASH else if style033 == style033.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p2_025 = if BES >= 2 and show_25_level then lvlPrice(topAnchor, block_Size, 2, P25) else Double.NaN;
p2_025.SetDefaultColor(GlobalColor("025")); p2_025.SetLineWeight(w025);
p2_025.SetStyle(if forceSolid then Curve.FIRM else if style025 == style025.DASH then Curve.SHORT_DASH else if style025 == style025.DOT then Curve.LONG_DASH else Curve.FIRM);
# ---- k = +3
plot p3_100 = if BES >= 3 and show_100_level then lvlPrice(topAnchor, block_Size, 3, 0) else Double.NaN;
p3_100.SetDefaultColor(GlobalColor("100")); p3_100.SetLineWeight(w100);
p3_100.SetStyle(if forceSolid then Curve.FIRM else if style100 == style100.DASH then Curve.SHORT_DASH else if style100 == style100.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p3_075 = if BES >= 3 and show_75_level then lvlPrice(topAnchor, block_Size, 3, P75) else Double.NaN;
p3_075.SetDefaultColor(GlobalColor("075")); p3_075.SetLineWeight(w075);
p3_075.SetStyle(if forceSolid then Curve.FIRM else if style075 == style075.DASH then Curve.SHORT_DASH else if style075 == style075.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p3_050 = if BES >= 3 and show_50_level then lvlPrice(topAnchor, block_Size, 3, P50) else Double.NaN;
p3_050.SetDefaultColor(GlobalColor("050")); p3_050.SetLineWeight(w050);
p3_050.SetStyle(if forceSolid then Curve.FIRM else if style050 == style050.DASH then Curve.SHORT_DASH else if style050 == style050.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p3_033 = if BES >= 3 and show_33_level then lvlPrice(topAnchor, block_Size, 3, P33_fromTop) else Double.NaN;
p3_033.SetDefaultColor(GlobalColor("033")); p3_033.SetLineWeight(w033);
p3_033.SetStyle(if forceSolid then Curve.FIRM else if style033 == style033.DASH then Curve.SHORT_DASH else if style033 == style033.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p3_025 = if BES >= 3 and show_25_level then lvlPrice(topAnchor, block_Size, 3, P25) else Double.NaN;
p3_025.SetDefaultColor(GlobalColor("025")); p3_025.SetLineWeight(w025);
p3_025.SetStyle(if forceSolid then Curve.FIRM else if style025 == style025.DASH then Curve.SHORT_DASH else if style025 == style025.DOT then Curve.LONG_DASH else Curve.FIRM);
# ---- k = +4
plot p4_100 = if BES >= 4 and show_100_level then lvlPrice(topAnchor, block_Size, 4, 0) else Double.NaN;
p4_100.SetDefaultColor(GlobalColor("100")); p4_100.SetLineWeight(w100);
p4_100.SetStyle(if forceSolid then Curve.FIRM else if style100 == style100.DASH then Curve.SHORT_DASH else if style100 == style100.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p4_075 = if BES >= 4 and show_75_level then lvlPrice(topAnchor, block_Size, 4, P75) else Double.NaN;
p4_075.SetDefaultColor(GlobalColor("075")); p4_075.SetLineWeight(w075);
p4_075.SetStyle(if forceSolid then Curve.FIRM else if style075 == style075.DASH then Curve.SHORT_DASH else if style075 == style075.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p4_050 = if BES >= 4 and show_50_level then lvlPrice(topAnchor, block_Size, 4, P50) else Double.NaN;
p4_050.SetDefaultColor(GlobalColor("050")); p4_050.SetLineWeight(w050);
p4_050.SetStyle(if forceSolid then Curve.FIRM else if style050 == style050.DASH then Curve.SHORT_DASH else if style050 == style050.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p4_033 = if BES >= 4 and show_33_level then lvlPrice(topAnchor, block_Size, 4, p33_fromTop) else Double.NaN;
p4_033.SetDefaultColor(GlobalColor("033")); p4_033.SetLineWeight(w033);
p4_033.SetStyle(if forceSolid then Curve.FIRM else if style033 == style033.DASH then Curve.SHORT_DASH else if style033 == style033.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p4_025 = if BES >= 4 and show_25_level then lvlPrice(topAnchor, block_Size, 4, P25) else Double.NaN;
p4_025.SetDefaultColor(GlobalColor("025")); p4_025.SetLineWeight(w025);
p4_025.SetStyle(if forceSolid then Curve.FIRM else if style025 == style025.DASH then Curve.SHORT_DASH else if style025 == style025.DOT then Curve.LONG_DASH else Curve.FIRM);
# ---- k = +5
plot p5_100 = if BES >= 5 and show_100_level then lvlPrice(topAnchor, block_Size, 5, 0) else Double.NaN;
p5_100.SetDefaultColor(GlobalColor("100")); p5_100.SetLineWeight(w100);
p5_100.SetStyle(if forceSolid then Curve.FIRM else if style100 == style100.DASH then Curve.SHORT_DASH else if style100 == style100.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p5_075 = if BES >= 5 and show_75_level then lvlPrice(topAnchor, block_Size, 5, P75) else Double.NaN;
p5_075.SetDefaultColor(GlobalColor("075")); p5_075.SetLineWeight(w075);
p5_075.SetStyle(if forceSolid then Curve.FIRM else if style075 == style075.DASH then Curve.SHORT_DASH else if style075 == style075.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p5_050 = if BES >= 5 and show_50_level then lvlPrice(topAnchor, block_Size, 5, P50) else Double.NaN;
p5_050.SetDefaultColor(GlobalColor("050")); p5_050.SetLineWeight(w050);
p5_050.SetStyle(if forceSolid then Curve.FIRM else if style050 == style050.DASH then Curve.SHORT_DASH else if style050 == style050.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p5_033 = if BES >= 5 and show_33_level then lvlPrice(topAnchor, block_Size, 5, p33_fromTop) else Double.NaN;
p5_033.SetDefaultColor(GlobalColor("033")); p5_033.SetLineWeight(w033);
p5_033.SetStyle(if forceSolid then Curve.FIRM else if style033 == style033.DASH then Curve.SHORT_DASH else if style033 == style033.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p5_025 = if BES >= 5 and show_25_level then lvlPrice(topAnchor, block_Size, 5, P25) else Double.NaN;
p5_025.SetDefaultColor(GlobalColor("025")); p5_025.SetLineWeight(w025);
p5_025.SetStyle(if forceSolid then Curve.FIRM else if style025 == style025.DASH then Curve.SHORT_DASH else if style025 == style025.DOT then Curve.LONG_DASH else Curve.FIRM);
# ---- k = +6
plot p6_100 = if BES >= 6 and show_100_level then lvlPrice(topAnchor, block_Size, 6, 0) else Double.NaN;
p6_100.SetDefaultColor(GlobalColor("100")); p6_100.SetLineWeight(w100);
p6_100.SetStyle(if forceSolid then Curve.FIRM else if style100 == style100.DASH then Curve.SHORT_DASH else if style100 == style100.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p6_075 = if BES >= 6 and show_75_level then lvlPrice(topAnchor, block_Size, 6, P75) else Double.NaN;
p6_075.SetDefaultColor(GlobalColor("075")); p6_075.SetLineWeight(w075);
p6_075.SetStyle(if forceSolid then Curve.FIRM else if style075 == style075.DASH then Curve.SHORT_DASH else if style075 == style075.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p6_050 = if BES >= 6 and show_50_level then lvlPrice(topAnchor, block_Size, 6, p50) else Double.NaN;
p6_050.SetDefaultColor(GlobalColor("050")); p6_050.SetLineWeight(w050);
p6_050.SetStyle(if forceSolid then Curve.FIRM else if style050 == style050.DASH then Curve.SHORT_DASH else if style050 == style050.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p6_033 = if BES >= 6 and show_33_level then lvlPrice(topAnchor, block_Size, 6, p33_fromTop) else Double.NaN;
p6_033.SetDefaultColor(GlobalColor("033")); p6_033.SetLineWeight(w033);
p6_033.SetStyle(if forceSolid then Curve.FIRM else if style033 == style033.DASH then Curve.SHORT_DASH else if style033 == style033.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p6_025 = if BES >= 6 and show_25_level then lvlPrice(topAnchor, block_Size, 6, P25) else Double.NaN;
p6_025.SetDefaultColor(GlobalColor("025")); p6_025.SetLineWeight(w025);
p6_025.SetStyle(if forceSolid then Curve.FIRM else if style025 == style025.DASH then Curve.SHORT_DASH else if style025 == style025.DOT then Curve.LONG_DASH else Curve.FIRM);
# ---- k = +7
plot p7_100 = if BES >= 7 and show_100_level then lvlPrice(topAnchor, block_Size, 7, 0) else Double.NaN;
p7_100.SetDefaultColor(GlobalColor("100")); p7_100.SetLineWeight(w100);
p7_100.SetStyle(if forceSolid then Curve.FIRM else if style100 == style100.DASH then Curve.SHORT_DASH else if style100 == style100.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p7_075 = if BES >= 7 and show_75_level then lvlPrice(topAnchor, block_Size, 7, P75) else Double.NaN;
p7_075.SetDefaultColor(GlobalColor("075")); p7_075.SetLineWeight(w075);
p7_075.SetStyle(if forceSolid then Curve.FIRM else if style075 == style075.DASH then Curve.SHORT_DASH else if style075 == style075.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p7_050 = if BES >= 7 and show_50_level then lvlPrice(topAnchor, block_Size, 7, p50) else Double.NaN;
p7_050.SetDefaultColor(GlobalColor("050")); p7_050.SetLineWeight(w050);
p7_050.SetStyle(if forceSolid then Curve.FIRM else if style050 == style050.DASH then Curve.SHORT_DASH else if style050 == style050.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p7_033 = if BES >= 7 and show_33_level then lvlPrice(topAnchor, block_Size, 7, p33_fromTop) else Double.NaN;
p7_033.SetDefaultColor(GlobalColor("033")); p7_033.SetLineWeight(w033);
p7_033.SetStyle(if forceSolid then Curve.FIRM else if style033 == style033.DASH then Curve.SHORT_DASH else if style033 == style033.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p7_025 = if BES >= 7 and show_25_level then lvlPrice(topAnchor, block_Size, 7, P25) else Double.NaN;
p7_025.SetDefaultColor(GlobalColor("025")); p7_025.SetLineWeight(w025);
p7_025.SetStyle(if forceSolid then Curve.FIRM else if style025 == style025.DASH then Curve.SHORT_DASH else if style025 == style025.DOT then Curve.LONG_DASH else Curve.FIRM);
# ---- k = +8
plot p8_100 = if BES >= 8 and show_100_level then lvlPrice(topAnchor, block_Size, 8, 0) else Double.NaN;
p8_100.SetDefaultColor(GlobalColor("100")); p8_100.SetLineWeight(w100);
p8_100.SetStyle(if forceSolid then Curve.FIRM else if style100 == style100.DASH then Curve.SHORT_DASH else if style100 == style100.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p8_075 = if BES >= 8 and show_75_level then lvlPrice(topAnchor, block_Size, 8, p75) else Double.NaN;
p8_075.SetDefaultColor(GlobalColor("075")); p8_075.SetLineWeight(w075);
p8_075.SetStyle(if forceSolid then Curve.FIRM else if style075 == style075.DASH then Curve.SHORT_DASH else if style075 == style075.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p8_050 = if BES >= 8 and show_50_level then lvlPrice(topAnchor, block_Size, 8, p50) else Double.NaN;
p8_050.SetDefaultColor(GlobalColor("050")); p8_050.SetLineWeight(w050);
p8_050.SetStyle(if forceSolid then Curve.FIRM else if style050 == style050.DASH then Curve.SHORT_DASH else if style050 == style050.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p8_033 = if BES >= 8 and show_33_level then lvlPrice(topAnchor, block_Size, 8, p33_fromTop) else Double.NaN;
p8_033.SetDefaultColor(GlobalColor("033")); p8_033.SetLineWeight(w033);
p8_033.SetStyle(if forceSolid then Curve.FIRM else if style033 == style033.DASH then Curve.SHORT_DASH else if style033 == style033.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p8_025 = if BES >= 8 and show_25_level then lvlPrice(topAnchor, block_Size, 8, P25) else Double.NaN;
p8_025.SetDefaultColor(GlobalColor("025")); p8_025.SetLineWeight(w025);
p8_025.SetStyle(if forceSolid then Curve.FIRM else if style025 == style025.DASH then Curve.SHORT_DASH else if style025 == style025.DOT then Curve.LONG_DASH else Curve.FIRM);
# ---- k = +9
plot p9_100 = if BES >= 9 and show_100_level then lvlPrice(topAnchor, block_Size, 9, 0) else Double.NaN;
p9_100.SetDefaultColor(GlobalColor("100")); p9_100.SetLineWeight(w100);
p9_100.SetStyle(if forceSolid then Curve.FIRM else if style100 == style100.DASH then Curve.SHORT_DASH else if style100 == style100.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p9_075 = if BES >= 9 and show_75_level then lvlPrice(topAnchor, block_Size, 9, p75) else Double.NaN;
p9_075.SetDefaultColor(GlobalColor("075")); p9_075.SetLineWeight(w075);
p9_075.SetStyle(if forceSolid then Curve.FIRM else if style075 == style075.DASH then Curve.SHORT_DASH else if style075 == style075.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p9_050 = if BES >= 9 and show_50_level then lvlPrice(topAnchor, block_Size, 9, p50) else Double.NaN;
p9_050.SetDefaultColor(GlobalColor("050")); p9_050.SetLineWeight(w050);
p9_050.SetStyle(if forceSolid then Curve.FIRM else if style050 == style050.DASH then Curve.SHORT_DASH else if style050 == style050.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p9_033 = if BES >= 9 and show_33_level then lvlPrice(topAnchor, block_Size, 9, p33_fromTop) else Double.NaN;
p9_033.SetDefaultColor(GlobalColor("033")); p9_033.SetLineWeight(w033);
p9_033.SetStyle(if forceSolid then Curve.FIRM else if style033 == style033.DASH then Curve.SHORT_DASH else if style033 == style033.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p9_025 = if BES >= 9 and show_25_level then lvlPrice(topAnchor, block_Size, 9, P25) else Double.NaN;
p9_025.SetDefaultColor(GlobalColor("025")); p9_025.SetLineWeight(w025);
p9_025.SetStyle(if forceSolid then Curve.FIRM else if style025 == style025.DASH then Curve.SHORT_DASH else if style025 == style025.DOT then Curve.LONG_DASH else Curve.FIRM);
# ---- k = +9
plot p10_100 = if BES >= 10 and show_100_level then lvlPrice(topAnchor, block_Size, 10, 0) else Double.NaN;
p10_100.SetDefaultColor(GlobalColor("100")); p10_100.SetLineWeight(w100);
p10_100.SetStyle(if forceSolid then Curve.FIRM else if style100 == style100.DASH then Curve.SHORT_DASH else if style100 == style100.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p10_075 = if BES >= 10 and show_75_level then lvlPrice(topAnchor, block_Size, 10, p75) else Double.NaN;
p10_075.SetDefaultColor(GlobalColor("075")); p10_075.SetLineWeight(w075);
p10_075.SetStyle(if forceSolid then Curve.FIRM else if style075 == style075.DASH then Curve.SHORT_DASH else if style075 == style075.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p10_050 = if BES >= 10 and show_50_level then lvlPrice(topAnchor, block_Size, 10, p100) else Double.NaN;
p10_050.SetDefaultColor(GlobalColor("050")); p10_050.SetLineWeight(w050);
p10_050.SetStyle(if forceSolid then Curve.FIRM else if style050 == style050.DASH then Curve.SHORT_DASH else if style050 == style050.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p10_033 = if BES >= 10 and show_33_level then lvlPrice(topAnchor, block_Size, 10, p33_fromTop) else Double.NaN;
p10_033.SetDefaultColor(GlobalColor("033")); p10_033.SetLineWeight(w033);
p10_033.SetStyle(if forceSolid then Curve.FIRM else if style033 == style033.DASH then Curve.SHORT_DASH else if style033 == style033.DOT then Curve.LONG_DASH else Curve.FIRM);
plot p10_025 = if BES >= 10 and show_25_level then lvlPrice(topAnchor, block_Size, 10, P25) else Double.NaN;
p10_025.SetDefaultColor(GlobalColor("025")); p10_025.SetLineWeight(w025);
p10_025.SetStyle(if forceSolid then Curve.FIRM else if style025 == style025.DASH then Curve.SHORT_DASH else if style025 == style025.DOT then Curve.LONG_DASH else Curve.FIRM);
# ---------- Labels (last bar)
input show_bubbles = yes;
input bubblemover = -5;
def mover = !IsNaN(close[bubblemover + 1]) and IsNaN(close[bubblemover]);
# Center
AddChartBubble(show_bubbles and mover , c_100, "100%", GlobalColor("BW"), yes);
AddChartBubble(show_bubbles and mover , c_075, “75%”, GlobalColor(“BW”), yes);
AddChartBubble(show_bubbles and mover , c_050, "50%", GlobalColor(“BW”), Yes);
AddChartBubble(show_bubbles and mover , c_033, "33%", GlobalColor(“BW”), Yes);
AddChartBubble(show_bubbles and mover , c_025, “25%”, GlobalColor(“BW”), Yes);