Vrak

Trader
Apr 23, 2024
1
0
6
24
Hello, I'm new here. I need to convert this indicator, can anyone do this for me or give me a tip on how to convert mq4 to mq5?
 

Attachments

  • Averagew1.mq4
    6.9 KB · Views: 5
Last edited by a moderator:

Enivid

Administrator
Staff member
Nov 30, 2008
19,173
1,496
144
Odesa
www.earnforex.com
Hello, I'm new here. I need to convert this indicator, can anyone do this for me or give me a tip on how to convert mq4 to mq5?
It's not that difficult to convert. It requires just a few changes since it's coded in a highly compatible manner. The only question is why would you need it? It's a simple MA/price cross indicator. There are hundreds indies like that, including for MT5.
 

sever-seven

Trader
Apr 25, 2024
2
0
6
53
Hello.
Is it possible to convert these indicators to MT5?
 

Attachments

  • i-Profit v2-2-2.mq4
    60.7 KB · Views: 8
  • TradeInfo.mq4
    65.7 KB · Views: 5

Rambo.Forex

Trader
May 1, 2024
1
0
6
32
Hi guys, I would like to know if anyone can convert this indicator for MT5.
This allows you to know the highest and lowest and take trades accordingly. This is a very useful indicator that has already helped a friend of mine make A LOT of money with it. Thanks in advance if anyone manages to convert it.
 

Attachments

  • MBFX-Snatcher.ex4
    10.5 KB · Views: 10

Enivid

Administrator
Staff member
Nov 30, 2008
19,173
1,496
144
Odesa
www.earnforex.com
Hi guys, I would like to know if anyone can convert this indicator for MT5.
This allows you to know the highest and lowest and take trades accordingly. This is a very useful indicator that has already helped a friend of mine make A LOT of money with it. Thanks in advance if anyone manages to convert it.
One would need a source code file (.mq4) to convert an indicator from MT4 to MT5.
 

Jajaofopobo

Trader
Sep 6, 2021
70
7
24
MQL4:
//+------------------------------------------------------------------+
//|                                                 REV.mq4                                              |
//|                        Copyright 2024, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com                                   |
//+------------------------------------------------------------------+
#property copyright "Copyright 2024, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
#property indicator_chart_window
 
double Mercy;
double Mercy1;
 
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
   Mercy = EMPTY_VALUE;
   Mercy1 = EMPTY_VALUE;
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
   // No calculation needed for this custom indicator in OnCalculate
   return(rates_total);
  }
//+------------------------------------------------------------------+
//| ChartEvent function                                              |
//+------------------------------------------------------------------+
void OnChartEvent(const int id,
                  const long &lparam,
                  const double &dparam,
                  const string &sparam)
  {
   double Senkou_SpanA = iCustom(NULL, 0, "Ichimoku", 2, 1);
   double Senkou_SpanB = iCustom(NULL, 0, "Ichimoku", 3, 1);
 
   if (Senkou_SpanB != EMPTY_VALUE && Senkou_SpanA != EMPTY_VALUE)
     {
      if (Mercy != Senkou_SpanB || Mercy1 != Senkou_SpanA) // Check if values have changed
        {
         if (Senkou_SpanB > Senkou_SpanA)
           {
            Alert(Symbol() + " Blue cloud, Buy Cloud");
            SendNotification(Symbol() + " Blue cloud, Buy Cloud");
           }
         else if (Senkou_SpanB < Senkou_SpanA)
           {
            Alert(Symbol() + " Red cloud, Sell Cloud");
            SendNotification(Symbol() + " Red cloud, Sell Cloud");
           }
         Mercy = Senkou_SpanB;
         Mercy1 = Senkou_SpanA;
        }
     }
  }

This indicator reads the indicator values and sends alert, i have tried to convert this code to mt5 but it is not giving me the right values from the indicator
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,173
1,496
144
Odesa
www.earnforex.com
MQL4:
//+------------------------------------------------------------------+
//|                                                 REV.mq4                                              |
//|                        Copyright 2024, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com                                   |
//+------------------------------------------------------------------+
#property copyright "Copyright 2024, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
#property indicator_chart_window
 
double Mercy;
double Mercy1;
 
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
   Mercy = EMPTY_VALUE;
   Mercy1 = EMPTY_VALUE;
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
   // No calculation needed for this custom indicator in OnCalculate
   return(rates_total);
  }
//+------------------------------------------------------------------+
//| ChartEvent function                                              |
//+------------------------------------------------------------------+
void OnChartEvent(const int id,
                  const long &lparam,
                  const double &dparam,
                  const string &sparam)
  {
   double Senkou_SpanA = iCustom(NULL, 0, "Ichimoku", 2, 1);
   double Senkou_SpanB = iCustom(NULL, 0, "Ichimoku", 3, 1);
 
   if (Senkou_SpanB != EMPTY_VALUE && Senkou_SpanA != EMPTY_VALUE)
     {
      if (Mercy != Senkou_SpanB || Mercy1 != Senkou_SpanA) // Check if values have changed
        {
         if (Senkou_SpanB > Senkou_SpanA)
           {
            Alert(Symbol() + " Blue cloud, Buy Cloud");
            SendNotification(Symbol() + " Blue cloud, Buy Cloud");
           }
         else if (Senkou_SpanB < Senkou_SpanA)
           {
            Alert(Symbol() + " Red cloud, Sell Cloud");
            SendNotification(Symbol() + " Red cloud, Sell Cloud");
           }
         Mercy = Senkou_SpanB;
         Mercy1 = Senkou_SpanA;
        }
     }
  }

This indicator reads the indicator values and sends alert, i have tried to convert this code to mt5 but it is not giving me the right values from the indicator
It would help to see the MQL5 code you've got so far to check where the errors could be.
 

marek1952

Trader
Jul 10, 2024
1
0
6
72
Hello admin my file mq4 to ex5 help me admin. This is a simple volume indicator. But a reworked version of MTF. I know that Speed Dir will not be displayed and I have to accept that.
 

Attachments

  • TicksSeparateVolumeDif MTF.ex4
    27.4 KB · Views: 3
  • TicksSeparateVolumeDif MTF.mq4
    8.1 KB · Views: 3

Zeyna39

Newbie
Aug 11, 2024
2
0
1
23
Hello, I modified this MQL4 code with the help of ChatGPT and adjusted it to my liking, but I couldn't convert it to MQL5. I tried a few methods I found online, but they didn't work. Is there anyone who can help?
 

Attachments

  • Emir Fractals.mq4
    22.9 KB · Views: 2

Bob124

Newbie
Aug 15, 2024
4
0
2
Hi, there. I'm new in the forum. Could someone help convert this attached MT4 to MT5?
It helps me immediately notice the change price. Thank you in advance for your kind help.
 

Attachments

  • horizontal_grid_lines.mq4
    5.8 KB · Views: 2

Enivid

Administrator
Staff member
Nov 30, 2008
19,173
1,496
144
Odesa
www.earnforex.com
  • 👍
Reactions: Bob124

Bob124

Newbie
Aug 15, 2024
4
0
2
This is great, I need that. Thank you so much, Enivid, for your kind help.
One thing of the Round-Levels indicator that I'd like you to help edit is disable the value (or price label) of the line on the vertical price. The price label of the indicator overlaps with the vertical price.
Dear Enivid,
I'd just like to get you informed that I can disable the price label of the Round-Levels indicator by just change True/False on LinesAsBackground.
Regards,
 
  • 🚀
Reactions: Enivid