Convert a tradingview indicator to MQL5

MQL5 Indicators

Specification

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; min-height: 14.0px}

Hello

I have a simple Tradingview indicator and the source code is available.
So what I need now is you to convert the tradingview  indicator to MT5  flawlessly.

Like always source code will be delivered at the end

This is the link to the source code .
The indicator have 10 differents moving average ['SMA', 'EMA', 'WMA', 'DEMA', 'TMA', 'VAR', 'WWMA', 'ZLEMA', 'TSF', 'HULL'], I only need the MT5 default MA

//@version=5
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © KivancOzbilgic

//created by: @Anil_Ozeksi
//developer: ANIL ÖZEKŞİ
//author: @kivancozbilgic

indicator('HIGH AND LOW Optimized Trend Tracker', 'HL OTT', overlay=true)
length = input.int(2, 'OTT Period', minval=1)
percent = input.float(0.6, 'OTT Optimization Coeff', step=0.1, minval=0)
hllength = input.int(10, 'Highest and Lowest Length', minval=1)
src = ta.highest(high, hllength)
srcl = ta.lowest(low, hllength)
highlighting = input(title='Highlighter On/Off ?', defval=true)
mav = input.string(title='Moving Average Type', defval='VAR', options=['SMA', 'EMA', 'WMA', 'DEMA', 'TMA', 'VAR', 'WWMA', 'ZLEMA', 'TSF', 'HULL'])
Var_Func(src, length) =>
    valpha = 2 / (length + 1)
    vud1 = src > src[1] ? src - src[1] : 0
    vdd1 = src < src[1] ? src[1] - src : 0
    vUD = math.sum(vud1, 9)
    vDD = math.sum(vdd1, 9)
    vCMO = nz((vUD - vDD) / (vUD + vDD))
    VAR = 0.0
    VAR := nz(valpha * math.abs(vCMO) * src) + (1 - valpha * math.abs(vCMO)) * nz(VAR[1])
    VAR
VAR = Var_Func(src, length)
DEMA = 2 * ta.ema(src, length) - ta.ema(ta.ema(src, length), length)
Wwma_Func(src, length) =>
    wwalpha = 1 / length
    WWMA = 0.0
    WWMA := wwalpha * src + (1 - wwalpha) * nz(WWMA[1])
    WWMA
WWMA = Wwma_Func(src, length)
Zlema_Func(src, length) =>
    zxLag = length / 2 == math.round(length / 2) ? length / 2 : (length - 1) / 2
    zxEMAData = src + src - src[zxLag]
    ZLEMA = ta.ema(zxEMAData, length)
    ZLEMA
ZLEMA = Zlema_Func(src, length)
Tsf_Func(src, length) =>
    lrc = ta.linreg(src, length, 0)
    lrc1 = ta.linreg(src, length, 1)
    lrs = lrc - lrc1
    TSF = ta.linreg(src, length, 0) + lrs
    TSF
TSF = Tsf_Func(src, length)
HMA = ta.wma(2 * ta.wma(src, length / 2) - ta.wma(src, length), math.round(math.sqrt(length)))
Var_Funcl(srcl, length) =>
    valphal = 2 / (length + 1)
    vud1l = srcl > srcl[1] ? srcl - srcl[1] : 0
    vdd1l = srcl < srcl[1] ? srcl[1] - srcl : 0
    vUDl = math.sum(vud1l, 9)
    vDDl = math.sum(vdd1l, 9)
    vCMOl = nz((vUDl - vDDl) / (vUDl + vDDl))
    VARl = 0.0
    VARl := nz(valphal * math.abs(vCMOl) * srcl) + (1 - valphal * math.abs(vCMOl)) * nz(VARl[1])
    VARl
VARl = Var_Funcl(srcl, length)
DEMAl = 2 * ta.ema(srcl, length) - ta.ema(ta.ema(srcl, length), length)
Wwma_Funcl(srcl, length) =>
    wwalphal = 1 / length
    WWMAl = 0.0
    WWMAl := wwalphal * srcl + (1 - wwalphal) * nz(WWMAl[1])
    WWMAl
WWMAl = Wwma_Funcl(srcl, length)
Zlema_Funcl(srcl, length) =>
    zxLagl = length / 2 == math.round(length / 2) ? length / 2 : (length - 1) / 2
    zxEMADatal = srcl + srcl - srcl[zxLagl]
    ZLEMAl = ta.ema(zxEMADatal, length)
    ZLEMAl
ZLEMAl = Zlema_Funcl(srcl, length)
Tsf_Funcl(srcl, length) =>
    lrcl = ta.linreg(srcl, length, 0)
    lrc1l = ta.linreg(srcl, length, 1)
    lrsl = lrcl - lrc1l
    TSFl = ta.linreg(srcl, length, 0) + lrsl
    TSFl
TSFl = Tsf_Funcl(srcl, length)
HMAl = ta.wma(2 * ta.wma(srcl, length / 2) - ta.wma(srcl, length), math.round(math.sqrt(length)))

getMA(src, length) =>
    ma = 0.0
    if mav == 'SMA'
        ma := ta.sma(src, length)
        ma

    if mav == 'EMA'
        ma := ta.ema(src, length)
        ma

    if mav == 'WMA'
        ma := ta.wma(src, length)
        ma

    if mav == 'DEMA'
        ma := DEMA
        ma

    if mav == 'TMA'
        ma := ta.sma(ta.sma(src, math.ceil(length / 2)), math.floor(length / 2) + 1)
        ma

    if mav == 'VAR'
        ma := VAR
        ma

    if mav == 'WWMA'
        ma := WWMA
        ma

    if mav == 'ZLEMA'
        ma := ZLEMA
        ma

    if mav == 'TSF'
        ma := TSF
        ma

    if mav == 'HULL'
        ma := HMA
        ma
    ma


getMAl(srcl, length) =>
    mal = 0.0
    if mav == 'SMA'
        mal := ta.sma(srcl, length)
        mal

    if mav == 'EMA'
        mal := ta.ema(srcl, length)
        mal

    if mav == 'WMA'
        mal := ta.wma(srcl, length)
        mal

    if mav == 'DEMA'
        mal := DEMAl
        mal

    if mav == 'TMA'
        mal := ta.sma(ta.sma(srcl, math.ceil(length / 2)), math.floor(length / 2) + 1)
        mal

    if mav == 'VAR'
        mal := VARl
        mal

    if mav == 'WWMA'
        mal := WWMAl
        mal

    if mav == 'ZLEMA'
        mal := ZLEMAl
        mal

    if mav == 'TSF'
        mal := TSFl
        mal

    if mav == 'HULL'
        mal := HMAl
        mal
    mal

MAvg = getMA(src, length)
fark = MAvg * percent * 0.01
longStop = MAvg - fark
longStopPrev = nz(longStop[1], longStop)
longStop := MAvg > longStopPrev ? math.max(longStop, longStopPrev) : longStop
shortStop = MAvg + fark
shortStopPrev = nz(shortStop[1], shortStop)
shortStop := MAvg < shortStopPrev ? math.min(shortStop, shortStopPrev) : shortStop
dir = 1
dir := nz(dir[1], dir)
dir := dir == -1 and MAvg > shortStopPrev ? 1 : dir == 1 and MAvg < longStopPrev ? -1 : dir
MT = dir == 1 ? longStop : shortStop
HOTT = MAvg > MT ? MT * (200 + percent) / 200 : MT * (200 - percent) / 200
HOTTC = color.blue
MAvgl = getMAl(srcl, length)
farkl = MAvgl * percent * 0.01
longStopl = MAvgl - farkl
longStopPrevl = nz(longStopl[1], longStopl)
longStopl := MAvgl > longStopPrevl ? math.max(longStopl, longStopPrevl) : longStopl
shortStopl = MAvgl + farkl
shortStopPrevl = nz(shortStopl[1], shortStopl)
shortStopl := MAvgl < shortStopPrevl ? math.min(shortStopl, shortStopPrevl) : shortStopl
dirl = 1
dirl := nz(dirl[1], dirl)
dirl := dirl == -1 and MAvgl > shortStopPrevl ? 1 : dirl == 1 and MAvgl < longStopPrevl ? -1 : dirl
MTl = dirl == 1 ? longStopl : shortStopl
LOTT = MAvgl > MTl ? MTl * (200 + percent) / 200 : MTl * (200 - percent) / 200
LOTTC = color.red
HOTTLine = plot(nz(HOTT[2]), title='HOTT', color=color.new(HOTTC, 0), linewidth=2, style=plot.style_line)
LOTTLine = plot(nz(LOTT[2]), title='LOTT', color=color.new(LOTTC, 0), linewidth=2, style=plot.style_line)
FillColor = highlighting ? color.new(#9915FF, 80) : na
fill(HOTTLine, LOTTLine, title='Highligter', color=FillColor)
color1 = close > HOTT[2] ? #00FFFF : close < LOTT[2] ? #FF00FF : na
barcolor(color1)
alertcondition(ta.crossover(close, HOTT[2]), title='Price Crossover Alarm', message='PRICE OVER HOTT - BUY SIGNAL!')
alertcondition(ta.crossunder(close, LOTT[2]), title='Price Crossunder Alarm', message='PRICE UNDER LOTT - SELL SIGNAL!')

link: HIGH-and-LOW-Optimized-Trend-Tracker-HOTT-LOTT/

Responded

1
Developer 1
Rating
(251)
Projects
334
71%
Arbitration
12
42% / 25%
Overdue
12
4%
Working
Published: 18 codes
2
Developer 2
Rating
(320)
Projects
493
67%
Arbitration
5
40% / 0%
Overdue
4
1%
Working
Published: 8 codes
3
Developer 3
Rating
(149)
Projects
221
80%
Arbitration
18
33% / 44%
Overdue
10
5%
Working
Published: 24 articles, 1882 codes
4
Developer 4
Rating
(284)
Projects
458
39%
Arbitration
93
44% / 18%
Overdue
72
16%
Loaded
Published: 2 codes
5
Developer 5
Rating
(7)
Projects
8
50%
Arbitration
0
Overdue
0
Free
Published: 1 code
6
Developer 6
Rating
(571)
Projects
941
47%
Arbitration
303
59% / 25%
Overdue
124
13%
Working
Similar orders
to compile all the suitable markets for buy and place a buy for the shortest timeframe and place a sell for also a shortest timeframe it should work with all brokers and can automatically place a trade as long as its connected to the internet it should inform where the contracts are placed and for how long
I need an experienced Pine Script v5 developer to help finalize and package a custom strategy that has already been partially converted from TradeStation EasyLanguage. The core logic uses four key technical indicators: MACD crossover Chaikin Oscillator (volume-based) Directional Movement Index (DMI +/- crossover) Simple Moving Averages (SMA) Project Scope: 1. Fix and clean the current Pine Script code 2. Implement
1 indicator SATV Final Work a. Symbol Name b. If Last Candle is Blue Then scanner Box Colour is Blue If Last Candle is RED Then Scanner Box colour is RED c. Live Price d. IF price is cross strong Buy or strong sell showing only For Buy/Sell and Candle low / High showing price 2 Bhav Copy Input field for 1-12 month If I want 5 Month back open Bhav & 1 Year 3 Moving Average Average Line price If Live price below to
ATAS trading bot. 40 - 70 USD
Hello expert developer i am interested in an ATAS trading bot. i already know what I want it to do. What are your terms regarding confidentiality? After I have hired you for a project, does the final product remain solely mine, and will it not be replicated? I am open to any suggestions on how it can be improved. or any limitation you may notice i'll be looking forward to expert developer only to work with thanks
Hello, I'm currently seeking a skilled and reliable MQL4 developer to assist in modifying and enhancing my Expert Advisor, Reversal Master V10.1 , to its next version V12.1 FF . This update involves integrating several advanced third-party indicators and implementing new trading logic based on clearly defined conditions to improve performance and strategy precision. If you have experience in EA development and enjoy
Hello, I'm currently seeking a skilled and reliable MQL4 developer to assist in modifying and enhancing my Expert Advisor, Reversal Master V10.1 , to its next version V12.1 FF . This update involves integrating several advanced third-party indicators and implementing new trading logic based on clearly defined conditions to improve performance and strategy precision. If you have experience in EA development and enjoy
Project Description: I am looking for a highly skilled MQL5 developer to create a robust solution for a persistent TLS handshake failure. My Expert Advisor (EA) needs to connect to a secure WebSocket server ( wss:// ) hosted on Railway.app or any other online websocket provider, but the connection consistently fails during the security negotiation phase. Ideal Candidate Skills: Deep expertise in MQL5 programming
i am looking for an indicator that gives buy sell signal by placing arrows on the chart, signals must not repaint or be placed with an offset, i want it to be accurate enough so i can trade from signal to signal and actually make profit, do any one have a strategy and skill to create such an indicator, and also it is to mql5, ( Important is, It must have No repainting and No offset ), if you know it is something you
hello dear developer I'm looking for a NinjaTrader developer to create a semi-automated trading strategy that enters trades based on visual text signals from my custom indicator. The strategy should handle automatic entries, allow manual management after entry, and include configurable settings like TP, SL, and trading time. If you're experienced with NinjaTrader and strategy development, feel free to reach out
I need a skilled Pine Script developer to finalize and fix a Pine Script v5 strategy that was converted from TradeStation EasyLanguage using AI. The script is mostly complete but has logic issues, missing buy/sell signals, and lacks proper exits and risk control. The project involves cleaning it up and building two working scripts: 1. A TradingView Strategy (backtest-ready, includes full entry/exit logic and risk

Project information

Budget
30+ USD
VAT (21%): 6.3 USD
Total: 36.3 USD
For the developer
27 USD
Deadline
from 1 to 4 day(s)