Convert the Pine Scriptto MQL4 Indicator

MQL4 Indicators Converting Forex

Job finished

Execution time 12 days
Feedback from customer
Very nice dev
Feedback from employee
It was good working with him, great ability for detatils

Specification

Please convert the Pine Script below into MQL4 Indicator:

//@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

strategy('Twin Optimized Trend Tracker', 'TOTT', overlay=true)
src = input(close, title='Source')
length = input.int(40, 'OTT Period', minval=1)
percent = input.float(1, 'Optimization Constant', step=0.1, minval=0)
coeff = input.float(0.001, 'Twin OTT Coefficient', step=0.001, minval=0)
showsupport = input(title='Show Support Line?', defval=true)
showsignalsk = input(title='Show Signals?', defval=true)
mav = input.string(title='Moving Average Type', defval='VAR', options=['SMA', 'EMA', 'WMA', 'TMA', 'VAR', 'WWMA', 'ZLEMA', 'TSF'])
highlighting = input(title='Highlighter On/Off ?', defval=true)
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)
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)
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 == '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
    ma

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
OTT = MAvg > MT ? MT * (200 + percent) / 200 : MT * (200 - percent) / 200
OTTup = OTT * (1 + coeff)
OTTdn = OTT * (1 - coeff)

PPLOT = plot(showsupport ? MAvg : na, color=color.new(#0585E1, 0), linewidth=2, title='Support Line')

pALLup = plot(nz(OTTup[2]), color=color.new(color.green, 0), linewidth=2, title='OTTup')
pALLdn = plot(nz(OTTdn[2]), color=color.new(color.red, 0), linewidth=2, title='OTTdown')

buySignalk = ta.crossover(MAvg, OTTup[2])
sellSignalk = ta.crossunder(MAvg, OTTdn[2])
K1 = ta.barssince(buySignalk)
K2 = ta.barssince(sellSignalk)
O1 = ta.barssince(buySignalk[1])
O2 = ta.barssince(sellSignalk[1])

plotshape(buySignalk and showsignalsk and O1 > K2 ? math.min(low, OTTdn) : na, title='Buy', text='Buy', location=location.absolute, style=shape.labelup, size=size.tiny, color=color.new(color.green, 0), textcolor=color.new(color.white, 0))
plotshape(sellSignalk and showsignalsk and O2 > K1 ? math.max(high, OTTup) : na, title='Sell', text='Sell', location=location.absolute, style=shape.labeldown, size=size.tiny, color=color.new(color.red, 0), textcolor=color.new(color.white, 0))
mPlot = plot(ohlc4, title='', style=plot.style_circles, linewidth=0, display=display.none)
longFillColor = highlighting ? O2 > K1 ? color.green : na : na
shortFillColor = highlighting ? O1 > K2 ? color.red : na : na
fill(mPlot, PPLOT, title='UpTrend Highligter', color=longFillColor, transp=90)
fill(mPlot, PPLOT, title='DownTrend Highligter', color=shortFillColor, transp=90)
fill(pALLup, pALLdn, title='Flat Zone Highligter', color=color.new(color.blue, 90))



dummy0 = input(true, title='=Backtest Inputs=')
FromDay = input.int(defval=1, title='From Day', minval=1, maxval=31)
FromMonth = input.int(defval=1, title='From Month', minval=1, maxval=12)
FromYear = input.int(defval=2005, title='From Year', minval=2005)
ToDay = input.int(defval=1, title='To Day', minval=1, maxval=31)
ToMonth = input.int(defval=1, title='To Month', minval=1, maxval=12)
ToYear = input.int(defval=9999, title='To Year', minval=2006)
Start = timestamp(FromYear, FromMonth, FromDay, 00, 00)
Finish = timestamp(ToYear, ToMonth, ToDay, 23, 59)
Timerange() =>
    time >= Start and time <= Finish ? true : false
if buySignalk
    strategy.entry('Long', strategy.long, when=Timerange())
if sellSignalk
    strategy.entry('Short', strategy.short, when=Timerange())



Files:

PNG
Exemple.png
120.5 Kb

Responded

1
Developer 1
Rating
(11)
Projects
12
25%
Arbitration
4
0% / 75%
Overdue
2
17%
Working
2
Developer 2
Rating
(1)
Projects
1
0%
Arbitration
0
Overdue
0
Free
3
Developer 3
Rating
(7)
Projects
6
33%
Arbitration
4
0% / 50%
Overdue
0
Free
4
Developer 4
Rating
(572)
Projects
943
47%
Arbitration
303
59% / 25%
Overdue
125
13%
Working
5
Developer 5
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
6
Developer 6
Rating
(322)
Projects
496
67%
Arbitration
5
40% / 0%
Overdue
4
1%
Working
Published: 8 codes
7
Developer 7
Rating
(560)
Projects
840
73%
Arbitration
15
53% / 13%
Overdue
193
23%
Working
Similar orders
SiyabongaSithole 60 - 100 USD
I need an Expert Advisor that trades by signals of ADX and Moving Average indicators. It must check and correctly process possible errors in trading operations. The main criteria of opening and closing positions: direction of Moving Average, price of the last bar. Set the number of lots to trade as an input parameter
The idea if the EA is to hedge and potentially profit from volatitly during time frames of high impact news, or other market moving events, using trailing stops coupled with positive progression. To enter trades, the EA simply creates both a buy and sell market order simultanously at the start of a user defined day of the week and time frame. Lot size will be fixed or volume based as a percentage of the accountc
Hello the ea must open posittion with tp ,it must fastly open trades and close them after again the same, needed the tp to go so far as the candle goes to take most profit that can made in that candle. also hedging is accesble if price gooes to not our side it can open sell after buy postions to hedge them and go to plus after close it imidiately.maybe martingale will work for that not bad
Hi I have a strategy for quantower I needed coded I have been trying myself but can't quite get there. They all partially work but break somewhere along the way either in live trading or can't connect to back testing. I have about 2500-4000 lines of code. What would a quote be? I am happy to share all codes I do have to help
Project Overview: I am seeking an experienced MT5 developer to create a high-precision Expert Advisor (EA) that: Draws and updates session rectangles based on candle bodies only, auto-extending with each new candle. Displays RSI + Envelope indicators combined in a single subwindow, visually and functionally identical to dragging Envelopes onto RSI in MT5. Executes trades automatically when RSI+Envelope levels and
🧾 Website Requirements Document Project Name: EA Trading Robot Sales Website Prepared for: Web Development Team Prepared by: [Your Name or Company Name] Date: [Insert Date] 1. 🎯 Project Overview We need a responsive, user-friendly website to sell and promote our MetaTrader Expert Advisor (EA) trading robot. The website should focus on driving sales, educating potential customers, and establishing trust and
I'm looking for someone who can help me create an EA that can both backtest and trade automatically according to a specific strategy that I've developed myself. The strategy is NOT based on any indicator but rather on market structure regarding higher highs, lower lows, liquidity etc. I need someone who has done such EA's before and have a deep experience
Hi I have a pine script that I want to change to Mql5 ea. The script uses ZigZag to adentify entries and Fibonaci to do exits. I would like to add a very leint stoploss to the ea as it does go into to drawdown sometimes befor it hits take profit. I would lke to call it Dragonfly EA
Category: Trading robots (Expert Advisors) Platform: MetaTrader 5 Budget: $300 (fixed) Description: I need an experienced MQL5 developer to build a **high-performance scalper EA** for MT5 designed to **pass a prop firm challenge within one week** while fully complying with prop firm rules (daily drawdown, max loss, profit target). This is a paid job with a strict requirement for **full source code delivery and IP
I am looking for an experienced MQL5 developer to create a fast and accurate scalping Expert Advisor for XAU/USD (Gold) on MetaTrader 5. The EA must operate with continuous trading , high trade frequency, and minimal delay in execution. Key Requirements: Trading Style: Scalping on M1 and M5 timeframes. Works best during high volatility sessions (London & New York). Indicators Used: EMA (Fast & Slow) for trend

Project information

Budget
30+ USD
For the developer
27 USD
Deadline
from 1 to 10 day(s)