нужно добавить что-то вроде паттерна для линии bosHigh. Когда линия bosHigh делает 4 движения вниз (вниз, остановка - вниз, остановка - вниз, остановка - вниз, остановка) Нужно выделить цветом и толщиной такие "Ступеньки" Например, жёлтый цвет, толщина 3

//@version=5
indicator(title='MFX', shorttitle='MFX', overlay=true)

// === Входные параметры ===
// BOS
//lineWidth = input.int(title="Line Width BOS", defval=2, minval=-10, maxval=10)
//lineColor = input.color(title="Line Color BOS", defval=color.blue)

// Параметры для дополнительных BOS линий
bosPeriod2 = input.int(title="BOS Period 2", defval=8, minval=1)
bosPeriod3 = input.int(title="BOS Period 3", defval=200, minval=1)
bosPeriod4 = input.int(title="BOS Period 4", defval=1200, minval=1)

// Параметр сглаживания
smoothingPeriod = input.int(title="Smoothing Period", defval=1, minval=1)

// Мувинги
ma1Period = input.int(title="MA1 Period", defval=10, minval=1)
ma2Period = input.int(title="MA2 Period", defval=50, minval=1)
ma3Period = input.int(title="MA3 Period", defval=200, minval=1)
ma4Period = input.int(title="MA4 Period", defval=20, minval=1)
ma5Period = input.int(title="MA5 Period", defval=100, minval=1)
ma6Period = input.int(title="MA6 Period", defval=1200, minval=1)

ma1Enabled = input.bool(title="Enable MA1", defval=true)
ma2Enabled = input.bool(title="Enable MA2", defval=true)
ma3Enabled = input.bool(title="Enable MA3", defval=true)
ma4Enabled = input.bool(title="Enable MA4", defval=true)
ma5Enabled = input.bool(title="Enable MA5", defval=true)
ma6Enabled = input.bool(title="Enable MA6", defval=true)

maType = input.string(title="MA Type", defval="EMA", options=["SMA", "EMA", "WMA", "VWMA"])

ma1Color = input.color(title="MA1 Color", defval=color.new(#FFC0CB, 30)) // Пастельный розовый
ma2Color = input.color(title="MA2 Color", defval=color.new(#AFEEEE, 30)) // Пастельный голубой
ma3Color = input.color(title="MA3 Color", defval=color.rgb(178, 24, 44, 30)) // Пастельный зеленый
ma4Color = input.color(title="MA4 Color", defval=color.new(#FF6347, 30)) // Пастельный томат
ma5Color = input.color(title="MA5 Color", defval=color.new(#8A2BE2, 30)) // Пастельный синий
ma6Color = input.color(title="MA6 Color", defval=color.new(#32CD32, 30)) // Пастельный лайм

// === Вычисление мувингов ===
calculateMA(period) =>
    switch maType
        "SMA" => ta.sma(close, period)
        "EMA" => ta.ema(close, period)
        "WMA" => ta.wma(close, period)
        "VWMA" => ta.vwma(close, period)
        => ta.ema(close, period) // EMA по умолчанию

ma1 = calculateMA(ma1Period)
ma2 = calculateMA(ma2Period)
ma3 = calculateMA(ma3Period)
ma4 = calculateMA(ma4Period)
ma5 = calculateMA(ma5Period)
ma6 = calculateMA(ma6Period)

// === Отображение мувингов ===
plot(ma1Enabled ? ma1 : na, color=ma1Color, linewidth=2, title="MA1")
plot(ma2Enabled ? ma2 : na, color=ma2Color, linewidth=2, title="MA2")
plot(ma3Enabled ? ma3 : na, color=ma3Color, linewidth=2, title="MA3")
plot(ma4Enabled ? ma4 : na, color=ma4Color, linewidth=2, title="MA4")
plot(ma5Enabled ? ma5 : na, color=ma5Color, linewidth=2, title="MA5")
plot(ma6Enabled ? ma6 : na, color=ma6Color, linewidth=2, title="MA6")

// Функция для расчета BOS
calculateBOS(period) =>
    var float bosHigh = na
    var float bosLow = na
    if na(bosHigh)
        bosHigh := high
    if na(bosLow)
        bosLow := low
    currentLow = ta.lowest(low, period)
    currentHigh = ta.highest(high, period)
    if close > bosHigh
        bosHigh := high
        bosLow := currentLow
    if close < bosLow
        bosLow := low
        bosHigh := currentHigh
    [bosHigh, bosLow]

// Вычисление BOS для разных периодов
[bosHigh2, bosLow2] = calculateBOS(bosPeriod2)
[bosHigh3, bosLow3] = calculateBOS(bosPeriod3)
[bosHigh4, bosLow4] = calculateBOS(bosPeriod4)

// Сглаживание линий с помощью SMA
smoothedBosHigh2 = ta.sma(bosHigh2, smoothingPeriod)
smoothedBosLow2 = ta.sma(bosLow2, smoothingPeriod)
smoothedBosHigh3 = ta.sma(bosHigh3, smoothingPeriod)
smoothedBosLow3 = ta.sma(bosLow3, smoothingPeriod)
smoothedBosHigh4 = ta.sma(bosHigh4, smoothingPeriod)
smoothedBosLow4 = ta.sma(bosLow4, smoothingPeriod)

// Plotting smoothed BOS lines
plot(title='BosHigh2', series=smoothedBosHigh2, color=#2962ff, linewidth=2, offset=0, style=plot.style_stepline)
plot(title='BosLow2', series=smoothedBosLow2, color=#2962ff, linewidth=2, offset=0, style=plot.style_stepline)
plot(title='BosHigh3', series=smoothedBosHigh3, color=#ffffff, linewidth=3, offset=0, style=plot.style_stepline)
plot(title='BosLow3', series=smoothedBosLow3, color=#ffffff, linewidth=3, offset=0, style=plot.style_stepline)
plot(title='BosHigh4', series=smoothedBosHigh4, color=#b2182c, linewidth=4, offset=0, style=plot.style_stepline)
plot(title='BosLow4', series=smoothedBosLow4, color=#b2182c, linewidth=4, offset=0, style=plot.style_stepline)