Convert TradingView Indicator/Strategy into MT4 EA/Trading Robot

MQL4 Dönüştürme

İş tamamlandı

Tamamlanma süresi: 8 gün
Geliştirici tarafından geri bildirim
Great customer, very reliable and easy to work with. Highly recommended!
Müşteri tarafından geri bildirim
Fantastic dev. Very patient, Very quick & most importantly executed the order EXACTLY as requested. Thank you so much)

Şartname

Hello!


The entire job will be posted below. Nothing else is required except for what is below. Thanks!


I need a translator. Pine script to MQL4, The code is below.


The indicator/EA has to execute trades at the same signals and with the same TP & SL as the one in TradingView. 


If you cant do the "SMA","TMA","LSMA" options its fine. I just use the SMA anyway so only keep that one. All 3 are preferred but if not then just SMA.


Once completed you can cross reference the results with the photo attatched (My TV chart with the indicator).



Thank you,


Iliya


//@version=3
strategy(title="HG_FX_1", overlay = true)

price = close

//
// ATR 
//

atrLength = input(14, "ATR Length")
slMultiplier = input(1.5, "SL")
tpMultiplier = input(1, "TP1")

atr = atr(atrLength)


//
// Indicator
// 

length = input(100),slen = input(10,title="Signal Length")
method = input("TMA",title="Pre-Filtering Method",options=["SMA","TMA","LSMA"])

Ds = input(1,title="Order Size")
sm = input("Bull/Bear Cross",title="Strategy Method",options=["Bull/Bear Cross","Signal Cross"])
mult = input(1.,title="Martingale Multiplier")
//----
source = close
f(x)=>method==x
s(x,p)=>f("SMA")?sma(x,p):f("TMA")?sma(sma(x,p),p):f("LSMA")?linreg(x,p,0):na
//----
src = s(source,length)
a = highest(src,length) 
b = lowest(src,length)
//----
bull = src/sma(a - b,length) - b/sma(a - b,length)
bear = abs(src/sma(a - b,length) - a/sma(a - b,length))
signal = sma(max(bull,bear),slen)

//
// Entry Structure
// 


goLong = crossover(bull,bear)   
goShort = crossunder(bull,bear)


if (goLong)
    sl = price - atr * slMultiplier
    tp = price + atr * tpMultiplier
    strategy.entry("Long", strategy.long)
    strategy.exit("Long Exit", "Long", stop = sl, limit = tp)
    
if (goShort)
    sl = price + atr * slMultiplier
    tp = price - atr * tpMultiplier
    strategy.entry("Short", strategy.short)      
    strategy.exit("Short Exit", "Short", stop = sl, limit = tp)


Dosyalar:

Yanıtlandı

1
Geliştirici 1
Derecelendirme
(590)
Projeler
789
71%
Arabuluculuk
9
33% / 33%
Süresi dolmuş
22
3%
Serbest
Yayınlandı: 8 kod
2
Geliştirici 2
Derecelendirme
(564)
Projeler
845
73%
Arabuluculuk
15
53% / 13%
Süresi dolmuş
193
23%
Serbest
3
Geliştirici 3
Derecelendirme
(54)
Projeler
53
17%
Arabuluculuk
7
0% / 100%
Süresi dolmuş
5
9%
Serbest

Proje bilgisi

Bütçe
50+ USD
Son teslim tarihi
to 7 gün