Convert Pinescript into MQL5 EA

MQL5 Experts

Job finished

Execution time 3 days
Feedback from employee
Good client, very patient

Specification

I have a pinescript which I want to convert to an EA. The following code need to be written in MQL5 (or MQL4).


Does someone have experience with translating pinescript to MQL scripting?

This is the following code:

trategy("Trend analysis", overlay = true)
prd = input(defval = 20, title="Trend analyse", minval = 1, maxval = 50)
Factor=input(defval = 3, title = "ATR Factor", minval = 1, step = 0.1)
Pd=input(defval = 30, title = "ATR Period", minval=1)
minrateu = input(defval = 1.0, title="Min profit Rate if Center Line Used", minval = 0)
usecenter = input(defval = false, title="Use Center Line to Close Entry for 50%")
showpivot = input(defval = false, title="Show Pivot Points")
showcl = input(defval = false, title="Show PP Center Line")
onlylong = input(defval = false, title="Enter Only Long Position")
float minrate = minrateu / 100

float ph = na
float pl = na
ph := pivothigh(prd, prd)
pl := pivotlow(prd, prd)

plotshape(ph and showpivot, text="H",  style=shape.labeldown, color=na, textcolor=color.red, location=location.abovebar, offset = -prd)
plotshape(pl and showpivot, text="L",  style=shape.labeldown, color=na, textcolor=color.lime, location=location.belowbar, offset = -prd)

float center = na
center := center[1]
float lastpp = ph ? ph : pl ? pl : na
if lastpp
    if na(center)
        center := lastpp
    else
        center := (center * 3 + lastpp) / 4

Up = center - (Factor * atr(Pd))
Dn = center + (Factor * atr(Pd))

float TUp = na
float TDown = na
Trend = 10
TUp := close[1] > TUp[1] ? max(Up, TUp[1]) : Up
TDown := close[1] < TDown[1] ? min(Dn, TDown[1]) : Dn
Trend := close > TDown[1] ? 1: close < TUp[1]? -1: nz(Trend[1], 1)
Trailingsl = Trend == 1 ? TUp : TDown

linecolor = Trend == 1 and nz(Trend[1]) == 1 ? color.lime : Trend == -1 and nz(Trend[1]) == -1 ? color.red : na
plot(Trailingsl, color = linecolor ,  linewidth = 2, title = "PP SuperTrend")

plot(showcl ? center : na, color = showcl ? center < hl2 ? color.blue : color.red : na)

ssignal = Trend == 1 and Trend[1] == -1
bsignal = Trend == -1 and Trend[1] == 1

halfexited = false
halfexited := nz(halfexited[1], false)
if change(Trend)
    strategy.close_all()


   
if bsignal
    strategy.entry("Buy", true, comment = "Buy")
if ssignal and not onlylong
    strategy.entry("Sell", false, comment = "Sell")

Responded

1
Developer 1
Rating
(35)
Projects
50
42%
Arbitration
3
33% / 33%
Overdue
4
8%
Free
Similar orders
Need a good synthetic EA 50 - 1000 USD
I don't have specifications. If you're good at building an EA with good coding, accuracy, 85% money management, good trading decision. Please apply let's discuss Bussiness. Price below is not specific we can discuss new price depending on your professionalism
I need to modify an existing deriv.com bot. Need to modify the money management and accuracy of taking trades, need to upgrade detecting of price when it's auto trading. need good results
I want to create a Bybit based bot that can scan specific pairs that are fed to it and determine if the difference between them is up to a certain level at which it can then do a series of three or two actions to secure profit. For example, if xrp/wif is 200points greater than xrp/snx the bot places a buy for snx (from snx/wif) if it is null in my account, then use the snx to buy xrp (from xrp/snx) pair. Then finally
ProfitPulse EA 500 - 1000 USD
Titre : Développement d'un Robot de Trading pour MetaTrader 4Description : Je suis à la recherche d'un développeur expérimenté pour créer un robot de trading (Expert Advisor) pour MetaTrader 4. Le robot doit avoir les spécificités suivantes :Suivi des Meilleurs Traders :Suivi et copie des trades des meilleurs traders sur une plateforme de social trading en temps réel.Automatisation des Positions :Ouverture et
I need EA code for a very basic grid strategy on chosen forex pair for MT5. In every x dolars price change, a buy and sell order should be opened. Every opened order should has a fix stop-loss and take-profit value in dollar and I want to enter this value as an input. When an active order closed by its stop-loss or take-profit, the same order should be placed again as limit or stop order (as needed) . Finally I want
Need an EA based on Double Bollinger bands and Ichimoku kinko hyo. Strategy includes position sizing based on account balance and predetermined stop loss which is calculated using ATR. Scaling out exit strategy as well. Going to take 2-3 days to select a developer. Price is negotiable of course
greetings, i need to optimize a source code with hedging when the DD go upper X% or with another type of optimization, like setting a new stop loss or other. so, i need a optimizion of a existing ea i will send you the files and i would have an explanation of what you can do about it
Hi like this post : MADdash (Moving Average Distance) source code - an order to develop the technical indicator at MQL5.community Freelance service - Budget: 30+ USD - MQL4 - Indicators, Experts and MADdash (Moving Average Distance) | Forex Factory i need the same indicator than MADdash dashboard (cf screenshot) where i could choose tf & MA charistics but with theses modifications : 1) in text of TF header need the
I need simple hedging EA that that allows me to manage trade after I open manual trade. I need source file as well. Details will be send directly. Thank you
Hi there, I need a very skilled EA developer to work on my project. Use your own best skills & strategies to develop the best EA. EA must never take trades during market consolidations. But wait until there's a signal for a particular trend & take supper sniper entries & exits. Once the daily TP is hit(10$-12$), EA must stop trading for that day & wait for the next day. Unless there's a strong trend. If the

Project information

Budget
30+ USD
VAT (21%): 6.3 USD
Total: 36.3 USD
For the developer
27 USD