Convert the existing MQ4 code to MQ5 code.

MQL5 Experts Convertir

Spécifications

The program I have created is in MQ4, I want you to convert the programme to MQ5 language .  I will select only those who can change these two function from MQ4 to MQ5. 

double MaxSpread=4 ;
double MaxSlippage=1 ;
double    gThresholdATR = 1.0;

void lizong_7()
 {
  //+------------------------------------------------------------------------------------------------------------------------------+
  // OrderInfoArray is such that OrderInfoArray[OrderIndex][0] -> OrderOpenTime() & OrderInfoArray[OrderIndex][1] -> OrderTicket() |
  // OrderCount implies Total market and pending order count                                                                       |
  // Index implies the index of Open or Pending order, however it's dynamic and change as any Open or Pending orders get closed    |
  // OrderIndex implies the index of the Open or Pending order !!                                                                      
  //+------------------------------------------------------------------------------------------------------------------------------+
     
   
  // Assigning variable names 
     
  int       OrderInfoArray[30][2];
  int       OrderCount;
  int       Index; 
  int       OrderIndex;

 if (Ask >= iMA(NULL,0,20,0,MODE_SMA,PRICE_MEDIAN,0))
    {
    return;
    }
 if ( (Ask - Bid<=MaxSpread * gThresholdATR * Point()) && (FridayTrade()== false) )
    {
        OrderCount = OrdersTotal() ;
        Index = 0 ;
        for (OrderIndex = 0 ; OrderIndex < OrderCount ; OrderIndex = OrderIndex + 1)
            {
                if (( OrderSelect(OrderIndex,SELECT_BY_POS,MODE_TRADES) && (OrderType() != 1 || OrderSymbol() != Symbol() || OrderMagicNumber() != 2) ))   continue;
                OrderInfoArray[Index][0] = OrderOpenTime();
                OrderInfoArray[Index][1] = OrderTicket();
                Index = Index + 1;
            }
        if (Index > 1)
            {
                ArrayResize(OrderInfoArray,Index,0); 
                ArraySort(OrderInfoArray,0,0,1); 
            }
        for (OrderIndex = 0 ; OrderIndex < Index ; OrderIndex = OrderIndex + 1)
            {
                if ( OrderSelect(OrderInfoArray[OrderIndex][1],SELECT_BY_TICKET,MODE_TRADES) != true || OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),MaxSlippage,Red) != false )   continue;
                Print("OrderClose() error - ",ErrorDescription(GetLastError())); 
            }
    }
 }

bool FridayTrade()
   {
   //---------------------------------------------------
   // Only trade if FridayTrade() is false. 
   
      if ((Hour()>=15 && DayOfWeek()==5)|| DayOfWeek()==6)
      {
         return true;
      } 
      else 
      {
         return false ;
      }  
   }

Répondu

1
Développeur 1
Évaluation
(42)
Projets
62
8%
Arbitrage
12
58% / 42%
En retard
1
2%
Gratuit
2
Développeur 2
Évaluation
(2)
Projets
2
0%
Arbitrage
0
En retard
1
50%
Gratuit
3
Développeur 3
Évaluation
(10)
Projets
15
27%
Arbitrage
3
67% / 33%
En retard
0
Gratuit
4
Développeur 4
Évaluation
(44)
Projets
50
50%
Arbitrage
1
0% / 100%
En retard
1
2%
Travail
5
Développeur 5
Évaluation
(16)
Projets
17
35%
Arbitrage
2
50% / 50%
En retard
0
Gratuit
6
Développeur 6
Évaluation
(1124)
Projets
1426
62%
Arbitrage
21
57% / 10%
En retard
43
3%
Gratuit
7
Développeur 7
Évaluation
(38)
Projets
51
29%
Arbitrage
1
0% / 100%
En retard
0
Gratuit
8
Développeur 8
Évaluation
(356)
Projets
632
26%
Arbitrage
89
73% / 13%
En retard
12
2%
Gratuit
9
Développeur 9
Évaluation
(15)
Projets
19
37%
Arbitrage
2
0% / 100%
En retard
0
Gratuit
10
Développeur 10
Évaluation
(441)
Projets
499
33%
Arbitrage
25
40% / 48%
En retard
7
1%
Occupé
11
Développeur 11
Évaluation
(50)
Projets
55
60%
Arbitrage
2
0% / 0%
En retard
1
2%
Gratuit
12
Développeur 12
Évaluation
(282)
Projets
422
63%
Arbitrage
5
40% / 0%
En retard
4
1%
Chargé
13
Développeur 13
Évaluation
(2)
Projets
4
0%
Arbitrage
0
En retard
0
Gratuit
14
Développeur 14
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
Commandes similaires
I need a feature setup that will input the Sunday opening price as a horizontal ray on any chart and can be used by another EA as part of a trading strategy. Like this TradingView example below
I need a mobile phone EA that is similar to no limitz EA mobile bot which will use an ea converter for scalping strategy that will execute trade automatically, set tp and sl for different pairs using integrated trading strategies . It must hedge for both action to buy and sell under 1 min and 5 min based on scalping strategy to execute trades
Hello everyone, I am looking for a talented developer who can help me create my EA. I have several indicators that I want to combine in the EA. I will take care of the integration of the indicators and the trading strategy myself, I need someone to program all the trading operations for me. This is probably absolutely standard, someone with experience has certainly programmed this several times before. Here are the
Hi there, I am looking for someone to build a Martingale/Cost Averaging Expert Advisor (EA) with the following features and functions: Martingale and Cost Averaging Features: 1. **Martingale Calculation Settings:** - Standard Martingale system allowing the trader to set the initial trade size and the pip step for subsequent trades. - Option for averaging up and averaging down: - **Averaging Up:** Lot size
Job Title: MQL5 Trading Bot Code Debugging and Optimization** **Description:** We are seeking an experienced MQL5 developer proficient in debugging and optimizing trading bot codes. The current project involves fixing existing code that runs into debugging issues without errors and optimizing it for efficient performance in live trading environments. **Responsibilities:** - Debug existing MQL5 trading bot code to
need a very skilled developer to create ea from indicator .i have source code for the indicator and it is non repainting. More details will be provided .i need parameters like take profit/stop/loss/loss recovery and few more
Active expert 250+ USD
hi, I must do changes to a dashboard with manual input of trader and active expert. Budget 250$ Can do? the budget is correct based on job to do. If you want me to increase the budget you can message me
HELLO DEAR DEV'S. I'VE AN EA BUT IT STOP WORKING WHEN MT4 HAS BEEN UPDATED TO THE LATEST VERSION (1420). SO I NEED A GOOD DEVELOPPER THAT COULD UPDATE THIS EA TO THE LATEST VERSION OF MT4 SO I CAN USE IT. NB: IT'S A SINGLE FILE (.EX4) AND THE PRICE CAN BE NEGOCIATED TO BE SUITABLE FOR BOTH PARTIES. THANK YOU
hey friends, I am looking to build a smart trading robot, for the capital market. He knew how to trade in all the different types of trade. Example - in shares, currencies, index, indices, ETFs, funds, commodities, options, futures and so on. Suitable for trading on all stock exchanges in the world. It will be possible to install the trading robot in the MetaTrader 5 trading software. But it will also be possible to
STI EA 30 USD
I need to convert this MT4 indicator into MT5 EA/indicator. The problem is I only have the .ex4 file bt not .mq4 file and it is also a repainting indicator. I need preliminary assessment if the conversion can be done based on .ex4 file first before exploring the EA details further. Attached is the indicator Budget below is just indicative for the assessment. We can discuss further once the conversion can be done and

Informations sur le projet

Budget
30+ USD
Pour le développeur
27 USD
Délais
à 10 jour(s)