Convert MQL4 -> MQL5 EA

MQL5 Experts

Job finished

Execution time 2 days
Feedback from customer
Good Work
Feedback from employee
Thank you, I am glad to serve you.

Specification

Hi

You have to convert/ rewrite my Mql4 code into Mql5 code.

Back testing enable required.

you have to explain me that how i can enable and disable buy or sell in it ( Trade opening criteria is already in my Mql4 code)

It should work with Grid=.002 and  Grid=.2 ( already in my Mql4 code)

Arrange all steps as in my code, put the trading function Buy or Sell in the last if possible or let me know how to able and disable trading function.

Here is the code below

 

----------------------------------------------------------------------------------------------------------------------------------------------------------

//+------------------------------------------------------------------+

//|                                                Grid 2021 New.mq4 |

//|                                                            Smile |

//|                https://www.mql5.com/en/signals/author/tahirabbas |

//+------------------------------------------------------------------+

#property copyright "Smile"

#property link      "https://www.mql5.com/en/signals/author/tahirabbas"

#property version   "1.00"

#property strict

//+------------------------------------------------------------------+

//| Expert initialization function                                   |

//+------------------------------------------------------------------+

int OnInit()

  {

//--- create timer

   EventSetTimer(60);

   

//---

   return(INIT_SUCCEEDED);

  }

//+------------------------------------------------------------------+

//| Expert deinitialization function                                 |

//+------------------------------------------------------------------+

void OnDeinit(const int reason)

  {

//--- destroy timer

   EventKillTimer();

   

  }

//+------------------------------------------------------------------+

//| Expert tick function                                             |

//+------------------------------------------------------------------+

void OnTick()

  {

double OrderPirice,OrderSize,Lot,rsi,ReSize

,Grid=0.002,Profit,otp;

string symbol,csymbol;

int ticket,Type,result;

 int i =(OrdersTotal()-1);

   if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==true)

   {

   OrderPirice=OrderOpenPrice();

   OrderSize=OrderLots();

   Type=OrderType();

   symbol=OrderSymbol();

   otp=OrderTakeProfit();

   }


if (OrdersTotal()<4){ReSize=1;}

if (OrdersTotal()<3){Profit=300;}

if (OrdersTotal()>2&&OrdersTotal()<6){Profit=400;}

if (OrdersTotal()==4){ReSize=1.5;}   

if (OrdersTotal()==5){ReSize=2;}    

if (OrdersTotal()>5){Profit=500;}   

if (OrdersTotal()==11){ReSize=1.5;}

if (OrdersTotal()==10){ReSize=1.3;}

if (OrdersTotal()==9){ReSize=1.5;}

if (OrdersTotal()==8){ReSize=1.5;}

if (OrdersTotal()==7){ReSize=2;}

if (OrdersTotal()==6){ReSize=.7;}

    

//Print("Symbol",OrderSymbol());

csymbol=ChartSymbol();

if (symbol==csymbol&&OrdersTotal()<12&&OrderPirice-Ask>=Grid)

{

if (Type==OP_BUY==true)

{

Lot=(OrderSize*ReSize);

MathRound (Lot);

ticket=OrderSend(symbol,OP_BUY,Lot,Ask,300,0,0,"",0,0,Green);

for(int Kb = 0; Kb < OrdersTotal(); Kb++)

{

if(OrderSelect(Kb, SELECT_BY_POS, MODE_TRADES) == true) 

OrderModify(OrderTicket(),OrderOpenPrice(),0,Ask+Point*Profit,0,CLR_NONE);

}

}

}

csymbol=ChartSymbol();

if (symbol==csymbol&&OrdersTotal()<12&&Bid-OrderPirice>=Grid)

{

if (Type==OP_SELL==true)

{

Lot=(OrderSize*ReSize);

MathRound (Lot);

ticket=OrderSend(symbol,OP_SELL,Lot,Bid,300,0,0,"",0,0,Red);

for(int Ks = 0; Ks < OrdersTotal(); Ks++)

{

if(OrderSelect(Ks, SELECT_BY_POS, MODE_TRADES) == true) 

OrderModify(OrderTicket(),OrderOpenPrice(),0,Bid-Point*Profit,0,CLR_NONE);

}

}

if (symbol==csymbol&&OrdersTotal()==1&&otp==0)

{

if (Type==OP_BUY==true)

{

for(int Kb = 0; Kb < OrdersTotal(); Kb++)

{

if(OrderSelect(Kb, SELECT_BY_POS, MODE_TRADES) == true) 

OrderModify(OrderTicket(),OrderOpenPrice(),0,Ask+Point*Profit,0,CLR_NONE);

}

}

}

if (symbol==csymbol&&OrdersTotal()==1&&otp==0)

{

if (Type==OP_SELL==true)

{

for(int Kb = 0; Kb < OrdersTotal(); Kb++)

{

if(OrderSelect(Kb, SELECT_BY_POS, MODE_TRADES) == true) 

OrderModify(OrderTicket(),OrderOpenPrice(),0,Bid-Point*Profit,0,CLR_NONE);

}

}

}


rsi=iRSI(NULL,0,14,PRICE_CLOSE,0);

if (OrdersTotal()<1)

{

if (rsi<50)

{

ticket=OrderSend(NULL,OP_BUY,0.02,Ask,300,0,Ask+300*Point,"WhatsApp",0,0,Green);

}}

rsi=iRSI(NULL,0,14,PRICE_CLOSE,0);

if (OrdersTotal()<1)

{

if (rsi>50)

{

ticket=OrderSend(NULL,OP_SELL,0.02,Bid,300,0,Bid-300*Point,"WhatsApp",0,0,Red);

}}


}

//------------------------------------------------------------------------------------------------

//+------------------------------------------------------------------+

//| Timer function                                                   |

//+------------------------------------------------------------------+

void OnTimer()

  {

//---

   

  }

//+------------------------------------------------------------------+

//| Tester function                                                  |

//+------------------------------------------------------------------+

double OnTester()

  {

//---

   double ret=0.0;

//---


//---

   return(ret);

  }

//+------------------------------------------------------------------+

//| ChartEvent function                                              |

//+------------------------------------------------------------------+

void OnChartEvent(const int id,

                  const long &lparam,

                  const double &dparam,

                  const string &sparam)

  {

//---

   

  }

//+------------------------------------------------------------------+


Responded

1
Developer 1
Rating
(65)
Projects
95
36%
Arbitration
11
27% / 45%
Overdue
14
15%
Free
2
Developer 2
Rating
(57)
Projects
72
22%
Arbitration
13
46% / 15%
Overdue
5
7%
Free
3
Developer 3
Rating
(2)
Projects
2
0%
Arbitration
0
Overdue
0
Free
4
Developer 4
Rating
(304)
Projects
509
47%
Arbitration
29
10% / 45%
Overdue
138
27%
Free
5
Developer 5
Rating
(14)
Projects
19
11%
Arbitration
1
0% / 100%
Overdue
5
26%
Free
6
Developer 6
Rating
(15)
Projects
23
9%
Arbitration
7
29% / 57%
Overdue
2
9%
Free
7
Developer 7
Rating
(7)
Projects
8
63%
Arbitration
1
0% / 100%
Overdue
1
13%
Free
8
Developer 8
Rating
(38)
Projects
50
10%
Arbitration
1
0% / 0%
Overdue
8
16%
Free
9
Developer 9
Rating
(131)
Projects
173
39%
Arbitration
4
25% / 50%
Overdue
13
8%
Working
10
Developer 10
Rating
(33)
Projects
49
12%
Arbitration
16
0% / 88%
Overdue
10
20%
Free
11
Developer 11
Rating
(50)
Projects
55
60%
Arbitration
2
0% / 0%
Overdue
1
2%
Free
12
Developer 12
Rating
(7)
Projects
17
41%
Arbitration
3
0% / 100%
Overdue
3
18%
Free
13
Developer 13
Rating
(171)
Projects
194
11%
Arbitration
37
38% / 35%
Overdue
5
3%
Loaded
14
Developer 14
Rating
(66)
Projects
143
34%
Arbitration
10
10% / 60%
Overdue
26
18%
Free
15
Developer 15
Rating
(87)
Projects
114
26%
Arbitration
7
29% / 57%
Overdue
5
4%
Free
Similar orders
Im looking for an coder to code an EA: Trade management 1. opening trades according to the indicator 2. trades settings to choose from like: open all trades according to the signal open only trade 1,2,3 or 4 % per trade ( example 50/30/20 of the lot settings, with 4 trades it would be for example 50/30/10/10) 3. SL/Trailing settings: Move SL to entry after hitting TP1/TP2 or TP3 moving SL by % keep the original SL
Hi I'm looking to have 2 of my pinescript strategies converted to MQL5 and was wondering if you could first give me a quote for the more simple strategy and then for both the simple and complex strategy together. The simple strategy is a MACD crossover type thing that uses a special EMA script that filters out some ranging price action and also fractal candles for the stop loss. The second strategy is market
I want grate robot for making profits that know when to start a good trade and close a trade and must be active all time to avoid lost of money
I have developed a very strong TradingView strategy in Pine Script but unfortunately, a third-party connector is requiired and in my opinion, I want a more direct connection. I am not brilliant at coding, but I have coded the majority of the MT5 code and I would like you to make sure that the MT5 code matches my TradingView script and executes the same way as the TradingView script that I will provide if you are
Mbeje fx 50+ USD
I like to own my robot that why I want to build my own.i like to be a best to every robot ever in the life to be have more money
I need an MT5 EA that can do the following: I have to give the EA a price in advance, when the price is reached the EA has to automatically place a buy stop or sell stop order 0.5 pips below or above the price. Is this possible
Dr Pattern 30+ USD
good day i need the service of the seaso coder to help me fix my ea The Job required 1 knowledge of Mt4 and Mt5 indicator coding 2. Telegram code 3. ability to code indicator to work on multiple Time frame combine to trade 4 Ability to Join two or three indicator on same ir different time frame if you have these skill please let chart i will discuss the details of the Job inside to you The required day including
Good day, I want someone to help me create a universal news filter with on/off switch, with start and end settings, and drawdown control with magic number of EAs, etc. Thanks
Hello, I am looking for a professional programmer to optimize my existing EA integrating it with ChatGPT to analyze currencies using various methods to make the right trading decisions. i want it to be an EA that can be trusted to carry trade with the help of chat gpt and also have a very low drawdown
Hello, I am looking for a professional programmer to create a trading expert on the MT4 platform, integrating it with ChatGPT to analyze currencies using various methods to make the right trading decisions. Further details will be provided to the applicants later

Project information

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