Convert tradingview indicator Gaussian Filter [BigBeluga] into mq4

MQL4 지표 전환

명시

I want tradingview indicator Gaussian Filter [BigBeluga] convert into mq4


I had also attached coding in text file


coding is as under

//@version=5

indicator("Gaussian Filter [BigBeluga]", overlay = true, max_labels_count = 500)



// INPUTS ========================================================================================================{


// Gaussian Filter Inputs

group1 = "Gaussian Filter"

//@variable Length of the Gaussian filter

int   length      = input(50,  "Length", group = group1)

//@variable Sigma value for Gaussian filter smoothing

int   sigma       = input(10, "Sigma",  group = group1, tooltip = "Sigma defines the amount of smoothing")


// Additional Features Inputs

group2 = "Additional Features"

//@variable Toggle for displaying levels

bool  levels      = input(true, "Show Levels", inline = "1", group = group2)

//@variable Toggle for coloring candles

bool  candles_c   = input(false, "Candles Color", group = group2)


// Color Inputs

group3 = "Colors"

//@variable Color for uptrend

color colUp       = input(#18e7a2, "Up Trend Color", group = group3)

//@variable Color for downtrend

color colDn       = input(#fc7c13, "Down Trend Color", group = group3)

//@variable Color for trend change

color change_col  = color.gray


// Variables for tracking trend and price

var   trend       = bool(na)             // Current trend direction (up or down)

var   price       = float(na)           // Last price level for labeling

var   value       = array.new<float>() // Array to store filter values


// Variables for labeling and plotting

var   point       = float(na)     // Current point for level plotting

var   index_dn    = 0            // Index for downtrend labels

var   index_up    = 0           // Index for uptrend labels

var   color       = color(na)  // Current trend color

var   color_level = color(na)

label lbl         = label(na)

var   percent_change = 0.


// Define a type for the Gaussian Filter parameters

//@type Defines the structure for Gaussian Filter parameters

type GaussianFilterParams

    int length

    int sigma


// Create an instance of GaussianFilterParams

GaussianFilterParams filterParams = GaussianFilterParams.new(length, sigma)


// }

// CALCULATIONS ============================================================================================{


// ATR (Average True Range) for level calculation

float atr   = ta.atr(200)


//@function Draws a label on the chart with the specified text, color, index, and price.

//@param txt_ (string) The text to display.

//@param color_ (color) Color of the text.

//@param index_ (int) Index position for the label.

//@param value_ (float) The value used for positioning the label.

//@param price_ (float) Price level to display.

//@param size (size) Size of the label, default is size.normal.

//@returns (label) The label.

method draw_label(string txt_, color_, index_, value_, price_, size = size.normal)=>

    label.new(chart.point.from_index(index_, value_),

                 text         = txt_ + "\n" + price_,

                 style        = label.style_label_left,

                 color        = color(na), 

                 textcolor    = color_, 

                 size         = size,

                 tooltip      = "Trend " + txt_ + " Level", 

                 force_overlay = true)


//@function GaussianFilter is used for smoothing, reducing noise, and computing derivatives of data.

//@param src (float) The source data (e.g., close price) to be smoothed.

//@param params (GaussianFilterParams) Gaussian filter parameters that include length and sigma.

//@returns (float) The smoothed value from the Gaussian filter.

gaussian_filter(float src, params) =>

    var float[] weights = array.new_float(params.length)  // Array to store Gaussian weights

    total = 0.0

    pi = math.pi

    for i = 0 to params.length - 1

        weight = math.exp(-0.5 * math.pow((i - params.length / 2) / params.sigma, 2.0))

                                         / math.sqrt(params.sigma * 2.0 * pi)

        weights.set(i, weight)

        total := total + weight


    for i = 0 to params.length - 1

        weights.set(i, weights.get(i) / total)


    sum = 0.0

    for i = 0 to params.length - 1

        sum := sum + src[i] * weights.get(i)

    sum


// Calculate the smoothed Gaussian value

smoothed     = gaussian_filter(close, filterParams)


// Detect trend changes based on crossover conditions

condition_up = ta.rising(smoothed, 4)

condition_dn = ta.falling(smoothed, 4)


// Set the trend direction and color based on the detected conditions

switch 

    condition_up => trend := true,  color := colUp

    condition_dn => trend := false, color := colDn


// }

// PLOT============================================================================================================{


// Determine the candle color based on trend change if enabled

col_trend_ch = (hl2 > smoothed and not trend ? change_col : hl2 < smoothed and trend ? change_col : color)


// Plot the Gaussian Filter line

// Gaussian Filter line

p1 = plot(   

          series     = smoothed, 

          color      = col_trend_ch, 

          title      = "Gaussian Filter",

          linewidth  = 1

          )


// Plot the price line (hidden by default)

// Hidden price line

p2 = plot(

          series    = ta.sma(hl2, 5), 

          title     = "Price", 

          display   = display.none,

          editable  = false

          )


// Fill the area between the Gaussian Filter and price lines

// Fills the area between the Gaussian Filter and price lines

fill(p1, p2, ta.sma(hl2, 5), smoothed, na, color.new(col_trend_ch, 95))

fill(p1, p2, ta.sma(hl2, 5), smoothed, na, color.new(col_trend_ch, 95))


// Enter/Exit labels

if levels

    //@check Checks for trend change and plots "Enter" or "Exit" labels

    if condition_up and ta.change(trend)

        point       := smoothed - atr

        price       := math.round(close, 2)

        color_level := colUp


        if not na(point)

            "Exit".draw_label(color.new(colDn, 40), index_dn, point[1],

                                  str.tostring(price) + "\n" + str.tostring(percent_change, format.percent), size.small)


    if condition_dn and ta.change(trend)

        point       := smoothed + atr

        price       := math.round(close, 2)

        color_level := colDn


        if not na(point)

            "Enter".draw_label(color.new(colUp, 40), index_up, point[1], 

                                  str.tostring(price) + "\n" + str.tostring(percent_change, format.percent), size.small)


    // Delete previous labels when trend changes

    if not trend and not na(point)

        lbl         := na

        index_dn    := bar_index

        lbl         := "Exit".draw_label(colDn, index_dn, point, str.tostring(percent_change, format.percent))

        label.delete(lbl[1])


    if trend and not na(point)

        index_up    := bar_index

        lbl         := na

        lbl         := "Enter".draw_label(colUp, index_up, point, str.tostring(percent_change, format.percent))

        label.delete(lbl[1])


    percent_change := (close/price-1) * 100



// Signals

// Plot markers on the chart for trend change signals

plotchar(condition_up and ta.change(trend) ? smoothed : na, "Filter Up", "⦿", 

         location      = location.absolute,

         size          = size.tiny, 

         color         = colUp,

         force_overlay = true)


plotchar(condition_dn and ta.change(trend) ? smoothed : na, "Filter Dn", "⦿", 

         location      = location.absolute, 

         size          = size.tiny, 

         color         = colDn, 

         force_overlay = true)


// Enter and Exit Levels

plot(levels ? (ta.change(point) or na(point) ? na : point) : na,

             style     = plot.style_linebr, 

             color     = bar_index % 3 == 0 ? color_level : na,

             linewidth = 1,

             editable  = false) 



// Color Candles

coolor_candles = candles_c ? col_trend_ch : color(na)

plotcandle(open, high, low, close, 

             color = coolor_candles,

              wickcolor = coolor_candles,

               bordercolor = coolor_candles,

                  editable   = false)


// }


응답함

1
개발자 1
등급
프로젝트
0
0%
중재
1
0% / 0%
기한 초과
0
무료
2
개발자 2
등급
(7)
프로젝트
6
17%
중재
3
0% / 0%
기한 초과
0
로드됨
3
개발자 3
등급
(551)
프로젝트
830
73%
중재
15
53% / 13%
기한 초과
193
23%
작업중
4
개발자 4
등급
(263)
프로젝트
433
38%
중재
88
43% / 18%
기한 초과
73
17%
바쁜
5
개발자 5
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
6
개발자 6
등급
(52)
프로젝트
97
24%
중재
12
17% / 17%
기한 초과
12
12%
작업중
비슷한 주문
Hello team, i would love someone good at preparing marketing videos to create a video for my MT5 Indictor. I dont want it to be long but should be precise and eye catching with sound alerts when popups happen and background music. I believe you know what you do. If you can do this, please come forth we discuss
Foreign exchange like example some countries buy goods in other countries in all to buy them they need to obtain local currency first, just like us going to holidays the differences they will exchange in huge amount. When companies exchange this huge amount they will actually move the price because the demand of the currency that they need its increases when the demand increases the price increases with all the
hello great developer I hope this message finds you well. I am looking for a developer to assist with a modification on my mt4. Could you please let me know if this is something you can help with, along with an estimate of the time and resources required? I’d be happy to provide more details if needed
Create a ZigZag indicator, which is constructed based on extreme values determined using oscillators. It can use any classical normalized oscillator, which has overbought and oversold zones. The algorithm should first be executed with the WPR indicator, then similarly add the possibility to draw a zigzag using the following indicators: CCI Chaikin RSI Stochastic Oscillator Algorithm and Terms The first stage is the
MAKATA DI MESH 50+ USD
Create a ZigZag indicator, which is constructed based on extreme values determined using oscillators. It can use any classical normalized oscillator, which has overbought and oversold zones. The algorithm should first be executed with the WPR indicator, then similarly add the possibility to draw a zigzag using the following indicators: CCI Chaikin RSI Stochastic Oscillator Algorithm and Terms The first stage is the
Inputs Number of bars to the left of fractal Number of bars to the right of fractal Number of bars we look back from the current bar (e.g., 30) Number of most recent up (or down) fractals we consider (e.g., 3) within the look-back period (from input 3) to form a valid level Option to either consider last consecutive fractals OR simply all fractals meeting criteria (within the look-back period for both) Fractals'
Are you a skilled MQL5 programmer with a passion for optimizing trading EAs and Indicators? We are seeking a talented individual to join our team as an MQL5 EA Performance Enhancement Specialist. In this role, you will take on the exciting challenge of modifying and improving an existing MQL5 trading indicator to achieve optimal performance, speed, and accuracy
The strategy “Inside the system” is based on news trading. As a rule, traders who choose news trading, try to price in all the releases of statistical data as well as meetings and speeches. As a result, they receive insignificant profit. What is more, fresh news leads to higher market volatility, spreads become bigger, and traders find it really difficult to open or close positions. Of course, such an approach may
Good day. I need AI to back date each US MARKET OPEN on the 1min & 5min chart to indicate the possibilites of a buy/sell upon market open. The trade will only placed on market open, this will be done manually. This is only for the first 5 min of US market open. The indicator just needs to provide information as to whether its a buy or sell
Helo Great Developer I coded my strategy on tradingview I would like to convert it to mql5 because with pine connect I can't do it Basically, I started with an indicator called mtf crytpo sea. look in tradingview a little how it works my problem is that I have no parameter for the batch according to my risk

프로젝트 정보

예산
40 - 60 USD
기한
에서 1  4 일

고객

(1)
넣은 주문2
중재 수0