Re: TradingView Indicators to MT4 Indicators

711
Cagliostro wrote: Sat Mar 07, 2026 1:45 am Here you go! The original code has an error (wrong normalization), it's been fixed. I am curious about how you use it vs other MAs.

MT4
image_2026-03-06_154122648.png

ATR_Stepped_PDFMA.mq4


MT5
image_2026-03-06_154349766.png
(MT5 is .ex5 as includes proprietary code for colors and resource optimization)
ATR_Stepped_PDFMA.ex5

+C+

Bro please add alert if price bar closed above or below the Step Line Horizontally and if possible please add 2 types of alert 1st time once the price touched and the 2nd time price closed above or below Thank-you
If you are not willing to take risk the unusual, you will have to settle for the ordinary.
Don't wait for extraordinary opportunities. Seize common occasions and make them great. Weak men wait for opportunities; strong men make them

Re: TradingView Indicators to MT4 Indicators

712
Adaptive Kalman filter - Trend Strength Oscillator (Zeiierman)

https://tradingview.com/script/PDi6enZR ... Zeiierman/ 

I hope this indicator will be converted into an MQ4 file and made available to everyone.

In summary, this indicator is a filter that filters out ranges and minor trends and extracts only the essential trends. This indicator is excellent at balancing the contradictory concepts of responsiveness and smoothness.

I think this indicator is most effective when aiming for a trend-following pullback when the oscillator is overbought and above 30 (or oversold and above -30).

I spent a lot of time searching for the Holy Grail, but in my opinion, this is the best indicator in PineScript.

The proficiency of Zeierman, the creator of this indicator, is evident from the case of the previously converted Relative Trend Index.

post1295529479.html#p1295529479

In my opinion, this indicator is more useful than Zeierman's Relative Trend Index.

I'm a big fan of Zeierman and I'm impressed with his quantitative approach to financial markets. He has also open-sourced some other useful indicators that I encourage you to check out.

Code: Select all

// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/

// © Zeiierman {
//@version=5
indicator("Adaptive Kalman filter - Trend Strength Oscillator (Zeiierman)", shorttitle = "Kalman Trend Strength Oscillator (Zeiierman)", overlay=false, precision = 0)
//~~}

// ~~ Tooltips {
string t1 = "Process Noise 1: This is the primary noise factor for the Kalman filter process. A higher value increases the filter’s responsiveness to price changes, but may result in less smooth output. Adjust this based on market volatility and the desired balance between smoothness and responsiveness."
string t2 = "Process Noise 2: This is the secondary noise factor for the Kalman filter process. It works in conjunction with Process Noise 1. Increasing this value also makes the filter more responsive but may introduce more noise. Fine-tune this alongside Process Noise 1 for optimal filtering."
string t3 = "Measurement Noise: This value defines the amount of noise in the price data, impacting how much the filter trusts the current price series. Higher values will make the filter rely more on past data, reducing responsiveness. Use this to control the trade-off between smoothness and responsiveness in trending or noisy markets."
string t4 = "Osc Smoothness: Controls the level of smoothing applied to the trend strength oscillator. Higher values result in a smoother oscillator but may cause delays. Lower values make the oscillator more reactive to trend changes, which can be useful for capturing quick reversals or volatility."
string t5 = "Kalman Filter Model: Choose between standard, volume-adjusted, and Parkinson-adjusted Kalman filter models. Volume-adjusted uses trading volume to adapt noise, while Parkinson-adjusted considers price range volatility. Each model impacts how the Kalman filter adjusts to market conditions."
string t6 = "Sigma Lookback: Defines the number of bars used to calculate the standard deviation for confidence bands in the Kalman filter. Higher values use more historical data, which can stabilize the filter in trending markets. Lower values make it more responsive to recent changes."
string t7 = "Trend Lookback: Sets the period over which the trend strength is calculated. Shorter periods make the indicator more sensitive to recent trends, while longer periods smooth the trend, emphasizing longer-term movement."
string t8 = "Strength Smoothness: Defines the level of smoothing applied to the calculated trend strength. Higher values create a more gradual trend strength curve, suitable for identifying persistent trends. Lower values make it more responsive, highlighting shorter-term fluctuations."
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

// ~~ Parameters {
//@enum     Defines Kalman filter extension models
enum kf_model
    standard = "Standard"
    volume_adjusted = "Volume adjusted"
    parkinson_adjusted = "Parkinson adjusted"
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

// ~~ Settings {
process_noise_1   = 0.01//input.float(0.01, "Process Noise 1", minval=0.0, maxval=10000, step=0.01, tooltip=t1, group='General settings')
process_noise_2   = 0.01//input.float(0.01, "Process Noise 2", minval=0.0, maxval=10000, step=0.01, tooltip=t2, group='General settings')
measurement_noise = input.float(500.0, "Measurement Noise", minval=0.0, maxval=10000, step=2.0, tooltip=t3, group='General settings')
R1                = input.int(10, title="Osc Smoothness", minval=2, tooltip=t4, group='General settings')
src               = close//input.source(close, "Input Source", tooltip='Primary input to filter', group='General settings')
selected_kf_model = input.enum(kf_model.standard, "Kalman Filter Model", tooltip=t5, group='Kalman Model Settings')
N                 = 500//input.int(500, "Sigma Lookback", minval=2, step=1, tooltip=t6, group='Additional Settings')
N2                = input.int(10, "Trend Lookback", minval=2, step=1, tooltip=t7, group='Trend Settings')
R2                = input.int(10, title="Strength Smoothness", minval=2, tooltip=t8, group='Trend Settings')
pos_col           = input.color(color.lime, title="Trend", inline="style", group='Style Settings')
neu_col           = input.color(color.blue, title="", inline="style", group='Style Settings')
neg_col           = input.color(color.red, title="", inline="style", group='Style Settings')
ob_col            = input.color(color.green, title="OBOS", inline="style1", group='Style Settings')
os_col            = input.color(color.red, title="", inline="style1", group='Style Settings')
bg_col            = input.color(color.rgb(87, 130, 194, 90), title="BG", inline="style2", group='Style Settings')

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

// ~~ Indicators {
var float filtered_src   = na
var float trend_strength = na
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

// ~~  Support variables {
var Y_diff     = array.new<float>()
var osc_buffer = array.new<float>()
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

// ~~  Initialize all KF matrices and vectors {
var F = matrix.new<float>(2, 2, 0.0)
F.set(0, 0, 1.0)
F.set(0, 1, 1.0)
F.set(1, 0, 1.0)

var P = matrix.new<float>(2, 2, 0.0)
matrix.set(P, 0, 0, 1.0)
matrix.set(P, 1, 1, 1.0)

var Q = matrix.new<float>(2, 2, 0.0)
matrix.set(Q, 0, 0, process_noise_1)
matrix.set(Q, 0, 1, process_noise_1 * process_noise_2)
matrix.set(Q, 1, 0, process_noise_2 * process_noise_1)
matrix.set(Q, 1, 1, process_noise_2)

var R = matrix.new<float>(1, 1, measurement_noise)
var H = matrix.new<float>(1, 2, 0.0)
matrix.set(H, 0, 0, 1.0)

var I = matrix.new<float>(2, 2, 0.0)
matrix.set(I, 0, 0, 1.0)
matrix.set(I, 1, 1, 1.0)

var X = array.from(0.0, 0.0)
if barstate.isfirst
    X := array.from(src, src)

if barstate.isconfirmed
    x1 = matrix.get(F, 0, 0) * array.get(X, 0) + matrix.get(F, 0, 1) * array.get(X, 1)
    x2 = matrix.get(F, 1, 1) * array.get(X, 1)
    X := array.from(x1, x2)
    P := F.mult(P.mult(F.transpose())).sum(Q)
    
    array.push(Y_diff, src - array.get(X, 0))

    R_adjusted = R.copy()
    if selected_kf_model != kf_model.standard and bar_index > 2
        if selected_kf_model == kf_model.volume_adjusted
            matrix.set(R_adjusted, 0, 0, matrix.get(R, 0, 0) * volume[1] / math.min(volume[1], volume))
        else if selected_kf_model == kf_model.parkinson_adjusted
            current_range = high - low
            previous_range = high[1] - low[1]
            range_ratio = current_range / math.max(previous_range, syminfo.mintick) 
            parkinson_scaled = 1 + range_ratio
            matrix.set(R_adjusted, 0, 0, matrix.get(R, 0, 0) * parkinson_scaled)

    S = H.mult(P.mult(H.transpose())).sum(R_adjusted)
    K = P.mult(H.transpose().mult(S.inv()))
    innovation = src - array.get(H.mult(X), 0)
    diff = K.mult(innovation)
    X := array.from(array.get(X, 0) + matrix.get(diff, 0, 0), array.get(X, 1) + matrix.get(diff, 1, 0))
    P := I.sum(K.mult(H).mult(-1)).mult(P)

    estimate      = array.get(X, 0)
    oscillator    = array.get(X, 1)
    filtered_src := estimate

    array.push(osc_buffer, oscillator)

    if array.size(Y_diff) >= N
        array.shift(Y_diff)

    if array.size(osc_buffer) >= N2
        A = osc_buffer.abs().max()
        trend_strength := ta.wma((oscillator / A * 100 ),R2)
        array.shift(osc_buffer)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

// ~~  Gradient Coloring Logic {
var int num_segments = 10
segment_width        = 100 / num_segments
filled_segments      = math.floor(math.abs(trend_strength) / segment_width)
osc_color            = neu_col

if not na(trend_strength)
    for i = 0 to num_segments - 1
        if i < filled_segments
            osc_color := color.new(trend_strength > 0 ? pos_col : neg_col, 80 - i * 10)
        else
            break
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

// ~~  Plots {
oscPlot   = plot(ta.wma(trend_strength,R1), color=osc_color, linewidth=3, title="Kalman Trend Strength Oscillator")
kalmanPlot= plot(filtered_src, color=osc_color, linewidth = 2, title="Adaptive Kalman Filter", force_overlay = true)
UpperBand = hline(70, title="70")
midline   = hline(0, title="0")
LowerBand = hline(-70, title="-70")

fill(UpperBand, LowerBand, color=bg_col, title="Background Fill")
midLinePlot = plot(0, color = na, editable = false, display = display.none)
fill(oscPlot, midLinePlot, 80, 30, top_color = color.new(ob_col, 0), bottom_color = color.new(ob_col, 100),  title = "Upper Gradient Fill")
fill(oscPlot, midLinePlot, -30,  -80,  top_color = color.new(os_col, 100), bottom_color = color.new(os_col, 0),  title = "Lower Gradient Fill")
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

// ~~  Table for Trend Strength {
if barstate.islast
    trend_strength_current = math.round(trend_strength)
    var table trend_table  = table.new(position.bottom_center, num_segments + 1, 1, border_color=chart.fg_color, border_width=1, frame_color=chart.fg_color, frame_width=1)
    for i = 0 to num_segments - 1
        table_segment_color = i < filled_segments ? color.new(trend_strength > 0 ? pos_col : neg_col, 70 - i * 10) : color.new(chart.fg_color, 100)
        table.cell(trend_table, i, 0, "", bgcolor=table_segment_color, width=1, height=2)
    table.cell(trend_table, num_segments, 0, str.tostring(trend_strength_current) + " %", text_color=chart.fg_color, bgcolor=na)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
These users thanked the author SonOfTheLivermore for the post (total 2):
Krunal Gajjar, RodrigoRT7

Re: TradingView Indicators to MT4 Indicators

713
Do you want the oscillator or the overlay on the main chart? In MT4/5 you cannot have both in a single code.
SonOfTheLivermore wrote: Sat Mar 14, 2026 4:02 am Adaptive Kalman filter - Trend Strength Oscillator (Zeiierman)

https://tradingview.com/script/PDi6enZR ... Zeiierman/ 

I hope this indicator will be converted into an MQ4 file and made available to everyone.

In summary, this indicator is a filter that filters out ranges and minor trends and extracts only the essential trends. This indicator is excellent at balancing the contradictory concepts of responsiveness and smoothness.

I think this indicator is most effective when aiming for a trend-following pullback when the oscillator is overbought and above 30 (or oversold and above -30).

I spent a lot of time searching for the Holy Grail, but in my opinion, this is the best indicator in PineScript.

The proficiency of Zeierman, the creator of this indicator, is evident from the case of the previously converted Relative Trend Index.

post1295529479.html#p1295529479

In my opinion, this indicator is more useful than Zeierman's Relative Trend Index.

I'm a big fan of Zeierman and I'm impressed with his quantitative approach to financial markets. He has also open-sourced some other useful indicators that I encourage you to check out.

Code: Select all

// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/

// © Zeiierman {
//@version=5
indicator("Adaptive Kalman filter - Trend Strength Oscillator (Zeiierman)", shorttitle = "Kalman Trend Strength Oscillator (Zeiierman)", overlay=false, precision = 0)
//~~}

// ~~ Tooltips {
string t1 = "Process Noise 1: This is the primary noise factor for the Kalman filter process. A higher value increases the filter’s responsiveness to price changes, but may result in less smooth output. Adjust this based on market volatility and the desired balance between smoothness and responsiveness."
string t2 = "Process Noise 2: This is the secondary noise factor for the Kalman filter process. It works in conjunction with Process Noise 1. Increasing this value also makes the filter more responsive but may introduce more noise. Fine-tune this alongside Process Noise 1 for optimal filtering."
string t3 = "Measurement Noise: This value defines the amount of noise in the price data, impacting how much the filter trusts the current price series. Higher values will make the filter rely more on past data, reducing responsiveness. Use this to control the trade-off between smoothness and responsiveness in trending or noisy markets."
string t4 = "Osc Smoothness: Controls the level of smoothing applied to the trend strength oscillator. Higher values result in a smoother oscillator but may cause delays. Lower values make the oscillator more reactive to trend changes, which can be useful for capturing quick reversals or volatility."
string t5 = "Kalman Filter Model: Choose between standard, volume-adjusted, and Parkinson-adjusted Kalman filter models. Volume-adjusted uses trading volume to adapt noise, while Parkinson-adjusted considers price range volatility. Each model impacts how the Kalman filter adjusts to market conditions."
string t6 = "Sigma Lookback: Defines the number of bars used to calculate the standard deviation for confidence bands in the Kalman filter. Higher values use more historical data, which can stabilize the filter in trending markets. Lower values make it more responsive to recent changes."
string t7 = "Trend Lookback: Sets the period over which the trend strength is calculated. Shorter periods make the indicator more sensitive to recent trends, while longer periods smooth the trend, emphasizing longer-term movement."
string t8 = "Strength Smoothness: Defines the level of smoothing applied to the calculated trend strength. Higher values create a more gradual trend strength curve, suitable for identifying persistent trends. Lower values make it more responsive, highlighting shorter-term fluctuations."
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

// ~~ Parameters {
//@enum     Defines Kalman filter extension models
enum kf_model
    standard = "Standard"
    volume_adjusted = "Volume adjusted"
    parkinson_adjusted = "Parkinson adjusted"
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

// ~~ Settings {
process_noise_1   = 0.01//input.float(0.01, "Process Noise 1", minval=0.0, maxval=10000, step=0.01, tooltip=t1, group='General settings')
process_noise_2   = 0.01//input.float(0.01, "Process Noise 2", minval=0.0, maxval=10000, step=0.01, tooltip=t2, group='General settings')
measurement_noise = input.float(500.0, "Measurement Noise", minval=0.0, maxval=10000, step=2.0, tooltip=t3, group='General settings')
R1                = input.int(10, title="Osc Smoothness", minval=2, tooltip=t4, group='General settings')
src               = close//input.source(close, "Input Source", tooltip='Primary input to filter', group='General settings')
selected_kf_model = input.enum(kf_model.standard, "Kalman Filter Model", tooltip=t5, group='Kalman Model Settings')
N                 = 500//input.int(500, "Sigma Lookback", minval=2, step=1, tooltip=t6, group='Additional Settings')
N2                = input.int(10, "Trend Lookback", minval=2, step=1, tooltip=t7, group='Trend Settings')
R2                = input.int(10, title="Strength Smoothness", minval=2, tooltip=t8, group='Trend Settings')
pos_col           = input.color(color.lime, title="Trend", inline="style", group='Style Settings')
neu_col           = input.color(color.blue, title="", inline="style", group='Style Settings')
neg_col           = input.color(color.red, title="", inline="style", group='Style Settings')
ob_col            = input.color(color.green, title="OBOS", inline="style1", group='Style Settings')
os_col            = input.color(color.red, title="", inline="style1", group='Style Settings')
bg_col            = input.color(color.rgb(87, 130, 194, 90), title="BG", inline="style2", group='Style Settings')

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

// ~~ Indicators {
var float filtered_src   = na
var float trend_strength = na
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

// ~~  Support variables {
var Y_diff     = array.new<float>()
var osc_buffer = array.new<float>()
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

// ~~  Initialize all KF matrices and vectors {
var F = matrix.new<float>(2, 2, 0.0)
F.set(0, 0, 1.0)
F.set(0, 1, 1.0)
F.set(1, 0, 1.0)

var P = matrix.new<float>(2, 2, 0.0)
matrix.set(P, 0, 0, 1.0)
matrix.set(P, 1, 1, 1.0)

var Q = matrix.new<float>(2, 2, 0.0)
matrix.set(Q, 0, 0, process_noise_1)
matrix.set(Q, 0, 1, process_noise_1 * process_noise_2)
matrix.set(Q, 1, 0, process_noise_2 * process_noise_1)
matrix.set(Q, 1, 1, process_noise_2)

var R = matrix.new<float>(1, 1, measurement_noise)
var H = matrix.new<float>(1, 2, 0.0)
matrix.set(H, 0, 0, 1.0)

var I = matrix.new<float>(2, 2, 0.0)
matrix.set(I, 0, 0, 1.0)
matrix.set(I, 1, 1, 1.0)

var X = array.from(0.0, 0.0)
if barstate.isfirst
    X := array.from(src, src)

if barstate.isconfirmed
    x1 = matrix.get(F, 0, 0) * array.get(X, 0) + matrix.get(F, 0, 1) * array.get(X, 1)
    x2 = matrix.get(F, 1, 1) * array.get(X, 1)
    X := array.from(x1, x2)
    P := F.mult(P.mult(F.transpose())).sum(Q)
    
    array.push(Y_diff, src - array.get(X, 0))

    R_adjusted = R.copy()
    if selected_kf_model != kf_model.standard and bar_index > 2
        if selected_kf_model == kf_model.volume_adjusted
            matrix.set(R_adjusted, 0, 0, matrix.get(R, 0, 0) * volume[1] / math.min(volume[1], volume))
        else if selected_kf_model == kf_model.parkinson_adjusted
            current_range = high - low
            previous_range = high[1] - low[1]
            range_ratio = current_range / math.max(previous_range, syminfo.mintick) 
            parkinson_scaled = 1 + range_ratio
            matrix.set(R_adjusted, 0, 0, matrix.get(R, 0, 0) * parkinson_scaled)

    S = H.mult(P.mult(H.transpose())).sum(R_adjusted)
    K = P.mult(H.transpose().mult(S.inv()))
    innovation = src - array.get(H.mult(X), 0)
    diff = K.mult(innovation)
    X := array.from(array.get(X, 0) + matrix.get(diff, 0, 0), array.get(X, 1) + matrix.get(diff, 1, 0))
    P := I.sum(K.mult(H).mult(-1)).mult(P)

    estimate      = array.get(X, 0)
    oscillator    = array.get(X, 1)
    filtered_src := estimate

    array.push(osc_buffer, oscillator)

    if array.size(Y_diff) >= N
        array.shift(Y_diff)

    if array.size(osc_buffer) >= N2
        A = osc_buffer.abs().max()
        trend_strength := ta.wma((oscillator / A * 100 ),R2)
        array.shift(osc_buffer)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

// ~~  Gradient Coloring Logic {
var int num_segments = 10
segment_width        = 100 / num_segments
filled_segments      = math.floor(math.abs(trend_strength) / segment_width)
osc_color            = neu_col

if not na(trend_strength)
    for i = 0 to num_segments - 1
        if i < filled_segments
            osc_color := color.new(trend_strength > 0 ? pos_col : neg_col, 80 - i * 10)
        else
            break
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

// ~~  Plots {
oscPlot   = plot(ta.wma(trend_strength,R1), color=osc_color, linewidth=3, title="Kalman Trend Strength Oscillator")
kalmanPlot= plot(filtered_src, color=osc_color, linewidth = 2, title="Adaptive Kalman Filter", force_overlay = true)
UpperBand = hline(70, title="70")
midline   = hline(0, title="0")
LowerBand = hline(-70, title="-70")

fill(UpperBand, LowerBand, color=bg_col, title="Background Fill")
midLinePlot = plot(0, color = na, editable = false, display = display.none)
fill(oscPlot, midLinePlot, 80, 30, top_color = color.new(ob_col, 0), bottom_color = color.new(ob_col, 100),  title = "Upper Gradient Fill")
fill(oscPlot, midLinePlot, -30,  -80,  top_color = color.new(os_col, 100), bottom_color = color.new(os_col, 0),  title = "Lower Gradient Fill")
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

// ~~  Table for Trend Strength {
if barstate.islast
    trend_strength_current = math.round(trend_strength)
    var table trend_table  = table.new(position.bottom_center, num_segments + 1, 1, border_color=chart.fg_color, border_width=1, frame_color=chart.fg_color, frame_width=1)
    for i = 0 to num_segments - 1
        table_segment_color = i < filled_segments ? color.new(trend_strength > 0 ? pos_col : neg_col, 70 - i * 10) : color.new(chart.fg_color, 100)
        table.cell(trend_table, i, 0, "", bgcolor=table_segment_color, width=1, height=2)
    table.cell(trend_table, num_segments, 0, str.tostring(trend_strength_current) + " %", text_color=chart.fg_color, bgcolor=na)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
These users thanked the author Cagliostro for the post:
SonOfTheLivermore
"I conjure from shadows and shape fortunes from the unseen. The treasure lies hidden in plain sight, beneath the sunlight." - Cagliostro

Re: TradingView Indicators to MT4 Indicators

714
Cagliostro wrote: Sat Mar 14, 2026 8:59 pm Do you want the oscillator or the overlay on the main chart? In MT4/5 you cannot have both in a single code.
Thank you for your reply.

I think an oscillator would be better.

This is because it's necessary to specifically measure the strength of the trend (from 100 to -100).

It would probably be impossible to precisely measure the strength of a trend (from 100 to -100) using an overlay on the main chart.

Re: TradingView Indicators to MT4 Indicators

715
Adaptive Kalman Filter Overlay

Here you go - I added also the only useful feature from the oscillator, the strength panel.


A note: the original code has mistakes in both the math and logic, but after testing the correct formula I did not correct it. It's a lucky error that improves the smoothness of the indicator so I kept it.

I will convert it to MT5 (with and without errors) to benchmark it vs the strongest trend indicators I have (meridian, kalman trend and ATR stepped PDFMA), let's see how it behaves.

Enjoy
+C+
"I conjure from shadows and shape fortunes from the unseen. The treasure lies hidden in plain sight, beneath the sunlight." - Cagliostro

Re: TradingView Indicators to MT4 Indicators

716
Dear Coders.
Need your Help convert this TV Script indicator to MT4 please... 🙏

There is the Swing High and Swing Low based Volume Profile with build Zag Zag of BigBeluga concept's.




This Script indicator is Now featured in Editors' picks of TradingViewers.


Swing Profile [BigBeluga]


Swing Profile [BigBeluga] is a dynamic swing-based volume profiling tool that builds a complete volume profile for each completed market swing.
Instead of using fixed sessions or time ranges, the indicator anchors its profile strictly between confirmed swing highs and swing lows, allowing traders to analyze where volume accumulated inside each directional leg.

The profile updates in real time while a swing is still forming and finalizes once the swing direction flips, giving both historical and live insight into volume behavior.



Code: Select all

// This work is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International  
// https://creativecommons.org/licenses/by-nc-sa/4.0/
// © BigBeluga

//@version=6
indicator("Swing Profile [BigBeluga]", overlay = true, max_labels_count = 500, max_boxes_count = 500, calc_bars_count = 2000, max_bars_back = 5000)


// INPUTS ---------------------------------------------------------------------

swingLen = input.int(50, "Swing Length", minval = 10)

swingColorUp = input.color(color.lime, "▲", inline = "colors")
swingColorDown = input.color(color.orange, "▼", inline = "colors")

showProfile = input.bool(true, "Profile", group = "Swing Volume Profile")
showHeatMap = input.bool(false, "HeatMap", group = "Swing Volume Profile")

showZigZag = input.bool(true, "ZigZag", inline = "Zz")
zigZagStyleInput = input.string("Dotted", "", ["Dotted", "Dashed", "Solid"], inline = "Zz")

showPOC = input.bool(true, "PoC", "", inline = "Poc", group = "Point of Control")
pocWidthInput = input.int(2, "", inline = "Poc", group = "Point of Control")
pocColor = input.color(color.red, "", inline = "Poc", group = "Point of Control")

transparentNA = color.new(color.black, 100)

string dataSizeInput = input.string("Small", title = "Data Size", options = ["Tiny", "Small", "Normal", "Large", "Huge"])

// Size switcher for labels
getLabelSize() =>
    switch dataSizeInput
        "Small"  => size.small
        "Normal" => size.normal
        "Large"  => size.large
        "Huge"   => size.huge
        => size.tiny

getZigZagLineStyle() =>
    switch zigZagStyleInput
        "Dotted" => line.style_dotted
        "Dashed" => line.style_dashed
        "Solid"  => line.style_solid


// Persistent storage containers
var polyline profilePoly = na
var dataLabel = label(na)
var pocLineHandle = line(na)
var profileBoxes = array.new<box>()

// Structs for swing points
type SwingData
    float price
    int index

var highSwing = SwingData.new(na, na)
var lowSwing  = SwingData.new(na, na)

// Direction flag: true = down move, false = up move
var isDownMove = false

// CALCULATIONS ---------------------------------------------------------------

// Detect swing highs and lows
highestSwingHigh = ta.highest(swingLen)
lowestSwingLow   = ta.lowest(swingLen)

if high == highestSwingHigh
    isDownMove := true
if low == lowestSwingLow
    isDownMove := false

// Store completed swing high
if high[1] == highestSwingHigh[1] and high < highestSwingHigh
    highSwing.index := bar_index[1]
    highSwing.price := high[1]

// Store completed swing low
if low[1] == lowestSwingLow[1] and low > lowestSwingLow
    lowSwing.index := bar_index[1]
    lowSwing.price := low[1]

// Default bin size based on ATR
priceBinSize = ta.atr(200) * 0.5

// HISTORICAL SWING LEG -------------------------------------------------------

// When direction flips we finalize previous swing leg and build full profile
if isDownMove != isDownMove[1]

    // Clear previous drawings
    profilePoly.delete()
    dataLabel.delete()
    for b in profileBoxes
        b.delete()
    profileBoxes.clear()

    swingMainColor = isDownMove ? swingColorDown : swingColorUp

    // Draw zigzag connector
    if showZigZag
        line.new(highSwing.index, highSwing.price, lowSwing.index, lowSwing.price, color = swingMainColor, style = getZigZagLineStyle())

    // Determine swing boundaries
    swingBottom = math.min(highSwing.price, lowSwing.price)
    swingTop    = math.max(highSwing.price, lowSwing.price)

    // Number of volume bins
    binCount = int(math.abs(highSwing.price - lowSwing.price) / priceBinSize)
    binStep  = math.abs(highSwing.price - lowSwing.price) / binCount

    lastSwingIndex = math.max(highSwing.index, lowSwing.index)
    prevSwingIndex = math.min(highSwing.index, lowSwing.index)

    // Arrays for volume accumulation
    volumeBins = array.new<float>(binCount, 0.)
    profilePoints = array.new<chart.point>()
    buyVolumeBins = array.new<float>(binCount, 0.)
    sellVolumeBins = array.new<float>(binCount, 0.)

    barOffset = bar_index - lastSwingIndex

    // Accumulate volume per price bin
    for i = barOffset to (lastSwingIndex - prevSwingIndex) + barOffset

        candleClose = close[i]
        candleOpen  = open[i]
        candleVol   = volume[i]

        for k = 0 to binCount - 1
            binMidPrice = swingBottom + (k * binStep) + (binStep / 2)

            if math.abs(binMidPrice - candleClose) < binStep

                volumeBins.set(k, volumeBins.get(k) + candleVol)

                if candleClose > candleOpen
                    buyVolumeBins.set(k, buyVolumeBins.get(k) + candleVol)
                else
                    sellVolumeBins.set(k, sellVolumeBins.get(k) + candleVol)

    // Draw boxes and build profile outline
    for k = 0 to binCount - 1

        binLow  = swingBottom + (k * binStep)
        binHigh = binLow + binStep

        volumeRatio = volumeBins.get(k) / volumeBins.max()
        profileWidth = int(volumeRatio * ((lastSwingIndex - prevSwingIndex) / 2))

        // Draw POC line
        if volumeRatio == 1 and showPOC
            line.new(showProfile ? prevSwingIndex + profileWidth : prevSwingIndex, math.avg(binLow, binHigh), lastSwingIndex, math.avg(binLow, binHigh), color = pocColor, width = pocWidthInput)

        // Create volume box
        box.new(
            showProfile ? prevSwingIndex + profileWidth : prevSwingIndex,
            binHigh,
            showHeatMap ? lastSwingIndex : prevSwingIndex,
            binLow,
            transparentNA,
            0,
            bgcolor = showProfile or showHeatMap ? color.from_gradient(volumeRatio, 0, 1, color.new(swingMainColor, 90), color.new(volumeRatio == 1 and showPOC ? pocColor : swingMainColor, 50)) : transparentNA,
            text = showHeatMap ? "" : volumeRatio == 1 ? str.tostring(volumeBins.max(), format.volume) : ""
        )

        // Build polygon outline
        if k == 0
            profilePoints.push(chart.point.from_index(prevSwingIndex, binLow))
        profilePoints.push(chart.point.from_index(prevSwingIndex + profileWidth, binLow))
        profilePoints.push(chart.point.from_index(prevSwingIndex + profileWidth, binHigh))
        if k == binCount - 1
            profilePoints.push(chart.point.from_index(prevSwingIndex, binHigh))

    // Draw outer polyline
    if showProfile
        polyline.new(profilePoints, false, true, line_color = showHeatMap ? color.new(swingMainColor, 50) : swingMainColor)

    // Summary label for historical swing
    swingArrowText = isDownMove ? "▼" : "▲"

    swingTooltip =
          "Total Volume: " + str.tostring(volumeBins.sum(), format.volume)
         + "\nBuy Volume: " + str.tostring(buyVolumeBins.sum(), format.volume)
         + "\nSell Volume: " + str.tostring(sellVolumeBins.sum(), format.volume)
         + "\nDelta Volume: " + str.tostring((buyVolumeBins.sum() - sellVolumeBins.sum()) / volumeBins.sum() * 100, format.percent)

    label.new(prevSwingIndex, isDownMove ? swingTop : swingBottom, swingArrowText,
         style = isDownMove ? label.style_label_down : label.style_label_up,
         color = transparentNA,
         textcolor = swingMainColor,
         size = getLabelSize(),
         tooltip = swingTooltip)


// REAL-TIME SWING LEG --------------------------------------------------------

// Real-time profile rebuilding while swing is still forming
if not isDownMove

    // Clear boxes on every update
    for b in profileBoxes
        b.delete()
    profileBoxes.clear()

    if barstate.islast

        swingMainColor = chart.fg_color

        // Remove previous zigzag preview line
        line.delete(line.new(highSwing.index, highSwing.price, lowSwing.index, lowSwing.price, color = swingMainColor, style = line.style_dashed)[1])

        swingBottom = math.min(highSwing.price, lowSwing.price)
        swingTop    = math.max(highSwing.price, lowSwing.price)

        binCount = int(math.abs(highSwing.price - lowSwing.price) / priceBinSize)
        binStep  = math.abs(highSwing.price - lowSwing.price) / binCount

        lastSwingIndex = math.max(highSwing.index, lowSwing.index)
        prevSwingIndex = math.min(highSwing.index, lowSwing.index)

        volumeBins = array.new<float>(binCount, 0.)
        profilePoints = array.new<chart.point>()
        buyVolumeBins = array.new<float>(binCount, 0.)
        sellVolumeBins = array.new<float>(binCount, 0.)

        barOffset = bar_index - lastSwingIndex

        // Accumulate volume in real time
        for i = barOffset to (lastSwingIndex - prevSwingIndex) + barOffset

            candleClose = close[i]
            candleOpen  = open[i]
            candleVol   = volume[i]

            for k = 0 to binCount - 1
                binMidPrice = swingBottom + (k * binStep) + (binStep / 2)

                if math.abs(binMidPrice - candleClose) < binStep

                    volumeBins.set(k, volumeBins.get(k) + candleVol)
                    if candleClose > candleOpen
                        buyVolumeBins.set(k, buyVolumeBins.get(k) + candleVol)
                    else
                        sellVolumeBins.set(k, sellVolumeBins.get(k) + candleVol)

        // Draw real-time boxes
        for k = 0 to binCount - 1

            binLow  = swingBottom + (k * binStep)
            binHigh = binLow + binStep

            volumeRatio = volumeBins.get(k) / volumeBins.max()
            profileWidth = int(volumeRatio * ((lastSwingIndex - prevSwingIndex) / 2))

            if volumeRatio == 1 and showPOC
                pocLineHandle := line.new(showProfile ? prevSwingIndex + profileWidth : prevSwingIndex, math.avg(binLow, binHigh), lastSwingIndex, math.avg(binLow, binHigh), color = pocColor, width = pocWidthInput)
                line.delete(pocLineHandle[1])

            profileBoxes.push(box.new(
                 showProfile ? prevSwingIndex + profileWidth : prevSwingIndex,
                 binHigh,
                 showHeatMap ? lastSwingIndex : prevSwingIndex,
                 binLow,
                 transparentNA,
                 0,
                 bgcolor = showProfile or showHeatMap ? color.from_gradient(volumeRatio, 0, 1, color.new(swingMainColor, 90), color.new(volumeRatio == 1 and showPOC ? pocColor : swingMainColor, 50)) : transparentNA,
                 text = showHeatMap ? "" : volumeRatio == 1 ? str.tostring(volumeBins.max(), format.volume) : ""
            ))

            if k == 0
                profilePoints.push(chart.point.from_index(prevSwingIndex, binLow))
            profilePoints.push(chart.point.from_index(prevSwingIndex + profileWidth, binLow))
            profilePoints.push(chart.point.from_index(prevSwingIndex + profileWidth, binHigh))
            if k == binCount - 1
                profilePoints.push(chart.point.from_index(prevSwingIndex, binHigh))

        // Update polyline in real time
        if showProfile
            polyline.delete(profilePoly[1])
            profilePoly := polyline.new(profilePoints, false, true, line_color = showHeatMap ? color.new(swingMainColor, 50) : swingMainColor)

        // Label with summary data
        swingTooltip = "T - Total Volume\nB - Buy Volume\nS - Sell Volume\nD - Delta Volume"

        swingDataText =
              "T: " + str.tostring(volumeBins.sum(), format.volume)
             + "\nB: " + str.tostring(buyVolumeBins.sum(), format.volume)
             + "\nS: " + str.tostring(sellVolumeBins.sum(), format.volume)
             + "\nD: " + str.tostring((buyVolumeBins.sum() - sellVolumeBins.sum()) / volumeBins.sum() * 100, format.percent)

        dataLabel := label.new(prevSwingIndex, not isDownMove ? swingTop : swingBottom, swingDataText,
             style = not isDownMove ? label.style_label_down : label.style_label_up,
             color = transparentNA,
             textcolor = swingMainColor,
             size = getLabelSize(),
             tooltip = swingTooltip,
             textalign = text.align_left)

        label.delete(dataLabel[1])


// MIRROR OF ABOVE FOR isDownMove == true ------------------------------------------

// Mirror logic for bullish direction
else

    for b in profileBoxes
        b.delete()
    profileBoxes.clear()

    if barstate.islast

        swingMainColor = chart.fg_color

        line.delete(line.new(highSwing.index, highSwing.price, lowSwing.index, lowSwing.price, color = swingMainColor, style = line.style_dashed)[1])

        swingBottom = math.min(highSwing.price, lowSwing.price)
        swingTop    = math.max(highSwing.price, lowSwing.price)

        binCount = int(math.abs(highSwing.price - lowSwing.price) / priceBinSize)
        binStep  = math.abs(highSwing.price - lowSwing.price) / binCount

        lastSwingIndex = math.max(highSwing.index, lowSwing.index)
        prevSwingIndex = math.min(highSwing.index, lowSwing.index)

        volumeBins = array.new<float>(binCount, 0.)
        profilePoints = array.new<chart.point>()
        buyVolumeBins = array.new<float>(binCount, 0.)
        sellVolumeBins = array.new<float>(binCount, 0.)

        barOffset = bar_index - lastSwingIndex

        for i = barOffset to (lastSwingIndex - prevSwingIndex) + barOffset

            candleClose = close[i]
            candleOpen  = open[i]
            candleVol   = volume[i]

            for k = 0 to binCount - 1

                binMidPrice = swingBottom + (k * binStep) + (binStep / 2)

                if math.abs(binMidPrice - candleClose) < binStep

                    volumeBins.set(k, volumeBins.get(k) + candleVol)
                    if candleClose > candleOpen
                        buyVolumeBins.set(k, buyVolumeBins.get(k) + candleVol)
                    else
                        sellVolumeBins.set(k, sellVolumeBins.get(k) + candleVol)

        for k = 0 to binCount - 1

            binLow  = swingBottom + (k * binStep)
            binHigh = binLow + binStep

            volumeRatio = volumeBins.get(k) / volumeBins.max()
            profileWidth = int(volumeRatio * ((lastSwingIndex - prevSwingIndex) / 2))

            if volumeRatio == 1 and showPOC
                pocLineHandle := line.new(showProfile ? prevSwingIndex + profileWidth : prevSwingIndex, math.avg(binLow, binHigh), lastSwingIndex, math.avg(binLow, binHigh), color = pocColor, width = pocWidthInput)
                line.delete(pocLineHandle[1])

            profileBoxes.push(box.new(
                 showProfile ? prevSwingIndex + profileWidth : prevSwingIndex,
                 binHigh,
                 showHeatMap ? lastSwingIndex : prevSwingIndex,
                 binLow,
                 transparentNA,
                 0,
                 bgcolor = showProfile or showHeatMap ? color.from_gradient(volumeRatio, 0, 1, color.new(swingMainColor, 90), color.new(volumeRatio == 1 and showPOC ? pocColor : swingMainColor, 50)) : transparentNA,
                 text = showHeatMap ? "" : volumeRatio == 1 ? str.tostring(volumeBins.max(), format.volume) : ""
             ))

            if k == 0
                profilePoints.push(chart.point.from_index(prevSwingIndex, binLow))
            profilePoints.push(chart.point.from_index(prevSwingIndex + profileWidth, binLow))
            profilePoints.push(chart.point.from_index(prevSwingIndex + profileWidth, binHigh))
            if k == binCount - 1
                profilePoints.push(chart.point.from_index(prevSwingIndex, binHigh))

        if showProfile
            polyline.delete(profilePoly[1])
            profilePoly := polyline.new(profilePoints, false, true, line_color = showHeatMap ? color.new(swingMainColor, 50) : swingMainColor)

        swingTooltip = "T - Total Volume\nB - Buy Volume\nS - Sell Volume\nD - Delta Volume"

        swingDataText =
              "T: " + str.tostring(volumeBins.sum(), format.volume)
             + "\nB: " + str.tostring(buyVolumeBins.sum(), format.volume)
             + "\nS: " + str.tostring(sellVolumeBins.sum(), format.volume)
             + "\nD: " + str.tostring((buyVolumeBins.sum() - sellVolumeBins.sum()) / volumeBins.sum() * 100, format.percent)

        dataLabel := label.new(prevSwingIndex, not isDownMove ? swingTop : swingBottom, swingDataText,
             style = not isDownMove ? label.style_label_down : label.style_label_up,
             color = transparentNA,
             textcolor = swingMainColor,
             size = getLabelSize(),
             tooltip = swingTooltip,
             textalign = text.align_left)

        label.delete(dataLabel[1])




// Smoothing MA inputs
GRP = "Moving Average"
maTypeInput = input.string("None", "Type", options = ["None", "SMA", "EMA", "SMMA (RMA)", "WMA", "VWMA"], group = GRP, display = display.none)
maLengthInput = input.int(25, "Length", group = GRP, display = display.none, active = maTypeInput != "None")
src = input(close, title="Source", group = GRP, active = maTypeInput != "None")


// Smoothing MA Calculation
ma(source, length, MAtype) =>
    switch MAtype
        "SMA"                   => ta.sma(source, length)
        "EMA"                   => ta.ema(source, length)
        "SMMA (RMA)"            => ta.rma(source, length)
        "WMA"                   => ta.wma(source, length)
        "VWMA"                  => ta.vwma(source, length)

plot(ma(src, maLengthInput, maTypeInput), color=color.yellow, title="MA")

INFO in :
https://www.tradingview.com/script/gFlv ... BigBeluga/
Always looking the GREAT, never left GOOD Point...

Re: TradingView Indicators to MT4 Indicators

717
This is great

Did you really do that in just a few hours?

You have amazing skills.

Thank you very much.

I will enjoy this work of art.
Cagliostro wrote: Sun Mar 15, 2026 4:39 am Here you go - I added also the only useful feature from the oscillator, the strength panel.


image_2026-03-14_183308307.png


A note: the original code has mistakes in both the math and logic, but after testing the correct formula I did not correct it. It's a lucky error that improves the smoothness of the indicator so I kept it.

I will convert it to MT5 (with and without errors) to benchmark it vs the strongest trend indicators I have (meridian, kalman trend and ATR stepped PDFMA), let's see how it behaves.

Enjoy
+C+
These users thanked the author SonOfTheLivermore for the post (total 4):
Cagliostro, BeatlemaniaSA, specialkey, RodrigoRT7

Re: TradingView Indicators to MT4 Indicators

718
SonOfTheLivermore wrote: Sun Mar 15, 2026 9:52 am This is great

Did you really do that in just a few hours?

You have amazing skills.

Thank you very much.

I will enjoy this work of art.
Thanks. The funny story is that the mistakes made in the indicator, and am sure that the original coder did not realize it, just made this strange code perform better than 99% of all other trend following indicators I've ever tried.

I will finish the tests when have time, am sure the story will be interesting for everyone.
These users thanked the author Cagliostro for the post (total 5):
SonOfTheLivermore, Lucas, WN25, BeatlemaniaSA, specialkey
"I conjure from shadows and shape fortunes from the unseen. The treasure lies hidden in plain sight, beneath the sunlight." - Cagliostro

Re: TradingView Indicators to MT4 Indicators

719
Cagliostro wrote: Sun Mar 15, 2026 11:05 am Thanks. The funny story is that the mistakes made in the indicator, and am sure that the original coder did not realize it, just made this strange code perform better than 99% of all other trend following indicators I've ever tried.

I will finish the tests when have time, am sure the story will be interesting for everyone.
“better than 99% of all other trend following indicators I've ever tried”
I visited your lab.
If even you, who can develop numerous excellent indicators, have to rate this indicator as the best trend indicator, then who exactly is Zeiierman?

I know of other excellent indicators on Trading View.
I'll introduce it soon.
I would appreciate it if you could help me with the conversion again at that time.

P.S.
Here's me enjoying the indicator you converted for me.
I used it to define the trend.
Munehisa Honma, a speculator from 300 years ago who developed candlestick charts and the Heikinashi indicator, is also the originator of Price Action analysis. His speculative theory can be coded as shown in the image. You will surely find hints to master speculation.
This is a small token of my gratitude.
These users thanked the author SonOfTheLivermore for the post:
Cagliostro

Re: TradingView Indicators to MT4 Indicators

720
Cagliostro wrote: Sun Mar 15, 2026 4:39 am Adaptive Kalman Filter Overlay

Enjoy
+C+
Hi Cagliostro,

I know you don't really do MT4 coding as you are focusing on your mega MT5 suite of indicators, but is there any chance to update this version so that we can adjust the colours, size, and type of the lines? You've hard-coded the lines, so I'm kinda stuck with the defaults.

Always appreciative of the amazing coding you do.

Kind regards,
Beatle 🪲
These users thanked the author BeatlemaniaSA for the post:
SonOfTheLivermore
Millionaire Maker - “Amateurs chase. Professionals wait. Legends wait with a plan.”

BEATS V5 - "Enjoy The Quiet Between Trades”
Improve Your Trading Psychology - No fear, no doubt
Ultimate Risk Management - Maximize Your Trades
Supply and Demand Course - Learn Supply and Demand
Believe That You Can - Believe That You Can