How can sholve that Mql5 To mql4

 
//+------------------------------------------------------------------+
//|                                                      DEMA_BB.mq5 |
//|                                                           GBPUSD |
//|                                                                  |
//+------------------------------------------------------------------+
#property copyright "GBPUSD"
#property link      "13-02-2022"
#property version   "1.00"

//--- Include standard libraries
#include <Trade\AccountInfo.mqh>
#include <Trade\PositionInfo.mqh>
#include <Trade\SymbolInfo.mqh>
#include <Trade\Trade.mqh>



int BB_handle_5minit,Dema_handle_5tick,Dema_handle_10tick;
double BB_Upper_close[],BB_Middle_close[],BB_Lower_close[],Dema_close_5[],Dema_close_10[];



double Ask_price;
double Bid_price;
double buynow;
string signal="";
double entryPrice = 0;
CTrade trade;
CPositionInfo positionInfo; // to get info about current positions
MqlRates Price_info[];
MqlRates Price_Daily_info[];
MqlRates tick_info[];

double myStopLoss = 0;


//locked hour
datetime        Locked_bar_time_A[1],time_arr_A[];

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
   BB_handle_5minit=iBands(_Symbol,PERIOD_M5,20,0,2,PRICE_CLOSE);
   Dema_handle_5tick=iDEMA(_Symbol,PERIOD_H1,5,0,PRICE_CLOSE);
   Dema_handle_10tick=iDEMA(_Symbol,PERIOD_H1,10,0,PRICE_CLOSE);
   //Locked_bar_time_A[0] = 0;
   

   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---

  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//BB
   CopyBuffer(BB_handle_5minit,1,0,5,BB_Upper_close);
   ArraySetAsSeries(BB_Upper_close,true);

   CopyBuffer(BB_handle_5minit,2,0,5,BB_Lower_close);
   ArraySetAsSeries(BB_Lower_close,true);

   CopyBuffer(BB_handle_5minit,0,0,5,BB_Middle_close);
   ArraySetAsSeries(BB_Middle_close,true);


//DEMA 6 tick

   CopyBuffer(Dema_handle_5tick,0,0,5,Dema_close_5);
   ArraySetAsSeries(Dema_close_5,true);

//DEMA 10 tick
   CopyBuffer(Dema_handle_10tick,0,0,5,Dema_close_10);
   ArraySetAsSeries(Dema_close_10,true);



//Hour Time
   CopyTime(_Symbol,PERIOD_H1,0,1,time_arr_A);
   ArraySetAsSeries(time_arr_A,true);

//Rate Define
   CopyRates(_Symbol,PERIOD_H1,0,3,Price_info);
   ArraySetAsSeries(Price_info,true);

//Tick Info
   CopyRates(_Symbol,PERIOD_H1,0,3,tick_info);
   ArraySetAsSeries(tick_info,true);


//buy and sell code
   Ask_price=NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_ASK),Digits());
   Bid_price=NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_BID),Digits());




   if(PositionSelect(_Symbol) == false)
     {
      if(
         Dema_close_5[0] > Dema_close_10[0] &&
         Dema_close_5[0] > Dema_close_5[1] &&
         BB_Upper_close[0] > BB_Upper_close[1] &&
         BB_Lower_close[0] < BB_Lower_close[1] &&
         tick_info[0].tick_volume > tick_info[1].tick_volume &&
         tick_info[1].tick_volume > 600 &&
         Price_info[0].low > Price_info[1].low 
         //Locked_bar_time_A[0]<=time_arr_A[0]
      )
        {
         trade.Buy(1,_Symbol);
         entryPrice = Ask_price;
         if(Price_info[1].low < Price_info[2].low)
         {
            myStopLoss = Price_info[1].low;
         }
         else
         {
            myStopLoss = Price_info[2].low;
         }
        }

      //sell code me
      if(
         Dema_close_5[0] < Dema_close_10[0] &&
         Dema_close_5[0] < Dema_close_5[1] &&
         BB_Upper_close[0] > BB_Upper_close[1] &&
         BB_Lower_close[0] < BB_Lower_close[1] &&
         Price_info[0].close < BB_Lower_close[0] &&
         tick_info[0].tick_volume > tick_info[1].tick_volume &&
         tick_info[1].tick_volume > 600 &&
         Price_info[0].high < Price_info[1].high 
         //Locked_bar_time_A[0]<=time_arr_A[0]
      )
        {
         trade.Sell(1,_Symbol);
         entryPrice = Bid_price;
         if(Price_info[1].high > Price_info[2].high)
         {
            myStopLoss = Price_info[1].high;
         }
         else
         {
            myStopLoss = Price_info[2].high;
         }
        }
     }




   if(PositionSelect(_Symbol) == true)
     {
      if(positionInfo.PositionType()==POSITION_TYPE_BUY)
        {
         if(
            (
               (Price_info[0].close < BB_Lower_close[0]) || 
               (Price_info[0].close < myStopLoss)
            ) && 
            Price_info[0].close < entryPrice
           )
           {
            trade.PositionClose(_Symbol);
            //Locked_bar_time_A[0]=TimeCurrent();
           }
         if(Price_info[0].close < Price_info[1].low && Price_info[0].close > entryPrice)
           {
            trade.PositionClose(_Symbol);
            //Locked_bar_time_A[0]=TimeCurrent();
           }
        }
      if(positionInfo.PositionType()==POSITION_TYPE_SELL)
        {
         if(
            (
               (Price_info[0].close > BB_Upper_close[0]) || 
               (Price_info[0].close > myStopLoss) 
            ) && 
            Price_info[0].close > entryPrice            
            )
           {
            trade.PositionClose(_Symbol);
            //Locked_bar_time_A[0]=TimeCurrent();
           }
         if(Price_info[0].close > Price_info[1].high && Price_info[0].close < entryPrice)
           {
            trade.PositionClose(_Symbol);
            //Locked_bar_time_A[0]=TimeCurrent();
           }
        }
HOW CAN I COVERT MQ4
 
Pruthvirajsinh6212:
HOW CAN I COVERT MQ4
Usually people post freelance order for such task.
 
Or you can start learning to do it yourself with the help of the sources from here (learn to search): https://www.mql5.com/en/search#!keyword=mql4%20to%20mql5
 
Pruthvirajsinh6212: HOW CAN I COVERT MQ4
  1. Don't SHOUT at us, that is RUDE!

  2. You have only four choices:

    1. Search for it (CodeBase or Market). Do you expect us to do your research for you?

    2. Try asking at:

    3. MT4: Learn to code it.
      MT5: Begin learning to code it.

      If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into your code.

    4. Or pay (Freelance) someone to code it. Top of every page is the link Freelance.
                Hiring to write script - General - MQL5 programming forum (2019)

    We're not going to code it for you (although it could happen if you are lucky or the problem is interesting.) We are willing to help you when you post your attempt (using CODE button) and state the nature of your problem.
              No free help (2017)