Convert the Pine Scriptto MQL4 Indicator

MQL4 指标 转化中 外汇

工作已完成

执行时间12 天
客户反馈
Very nice dev
员工反馈
It was good working with him, great ability for detatils

指定

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())



附加的文件:

PNG
Exemple.png
120.5 Kb

反馈

1
开发者 1
等级
(11)
项目
12
25%
仲裁
4
0% / 75%
逾期
2
17%
工作中
2
开发者 2
等级
(1)
项目
1
0%
仲裁
0
逾期
0
空闲
3
开发者 3
等级
(7)
项目
6
33%
仲裁
4
0% / 50%
逾期
0
空闲
4
开发者 4
等级
(572)
项目
943
47%
仲裁
303
59% / 25%
逾期
125
13%
工作中
5
开发者 5
等级
项目
0
0%
仲裁
0
逾期
0
空闲
6
开发者 6
等级
(322)
项目
496
67%
仲裁
5
40% / 0%
逾期
4
1%
工作中
发布者: 8 代码
7
开发者 7
等级
(560)
项目
840
73%
仲裁
15
53% / 13%
逾期
193
23%
工作中
相似订单
I have two bots that I have created that trade forex. I would like someone to create two separate set files for my two bots that I have created. The two bots have been created in mql4
Hi friends, I need EA , it should be given consistent profit....with low Drawdown , i will pay what you ask.We are forex broker and i need skiled mql5 developer for further project, thanks
Dear developers, i want you to create me a non repaint trading indicator for Deriv to detect spikes. It should have alert function and i will test it to see if i can hire you. Note that i am well versed with indicators so do not deceive me. I will need clean and precise code for the indicator. Send me your screenshots to first have a look
I would like you to create an expert advisor or robot based on a closed source Trading View indicator ‘Stop Hunt by _Nephew_Sam’. You have to first check this indicator out and be sure you can replicate the source code’s logic before you apply for this gig. If you read to this point, include closed source in your reply to this post
Open NY sesion robot 50 - 90 USD
is typical Open NY sesion bot: I need a robot for MT5 that opens positions based on a minute or 10-minute candlestick at the opening of the London and/or New York session. If the market breaks through the upper edge of the candlestick, it opens a buy position; if it breaks through the lower edge, it opens a sell position. TP and SL = candlestick height. After the first SL, it opens the opposite position, but only
I have a simple strategy I’d like someone to convert into a mt4 and mt5 ea for me please , just using vwap(volume weighted average profile) and price action with a few simple rules
Project Description: I am looking for an experienced developer to create an Expert Advisor (EA) compatible with both MT4 and MT5 with the following functionalities: 1. Capital and Position Sizing Management: Automatically calculate and determine the appropriate trade size based on account balance and predefined risk parameters. Enforce strict capital management rules to prevent excessive exposure and control overall
I need to convert an MT5 Expert Advisor into a fully functional TradingView strategy. Could you handle this task, and if so, please let me know your estimated cost and expected completion timeframe
I’m seeking an experienced and reliable MQL5 developer to build a custom MT5 Hedge Trade Copier with the following core features: Two Modes in One EA : Sender (prop/challenge) & Receiver (live hedge) Custom Hedge Lot Formula (based on account size, max loss %, or fixed amount) Secure Authentication System (HTTP license server check) CSV-based Trade Bridge (no sockets/DLLs) Duplicate Trade Protection and error
Required Indi: BB Band: Period 21, Deviations 2.000 SMA: 21 in H1 timeframe RSI: Period 7 Timeframe: M5 Pair: XAUUSD, USDJPY, GBPJPY, EURJPY, AUDJPY, CHFJPY, GBPUSD Trading rules: #A In H1 timeframe, when price goes above the 21 SMA then looking for buy opportunity and when price goes below to 21 SMA, then look fora sell opportunity Buy triggered when candle got rejection from the lower Bollinger bands, and sell

项目信息

预算
30+ USD
开发人员
27 USD
截止日期
 1  10 天