Convert MT4 Indicator to MT5

Job finished

Execution time 10 minutes
Feedback from employee
Всё прошло отлично! Прекрасный заказчик!
Feedback from customer
Fantastic work! I couldn't have asked for better or quicker

Specification

Convert the ADR indicator (ADR V2.mq4) from this page:
https://forex-station.com/app.php/attach/file/3363278

from MT4 to MT5

It is a very simple indicator which is only 64 lines including all of the comments & declarations at the top.

The code is actually the following:
//+------------------------------------------------------------------+
//|                                           Daily Range PeterE.mq4 |
//+------------------------------------------------------------------+

#property indicator_chart_window

extern int      NumOfDays             = 25;
extern string   FontName              = "Tahoma";
extern int      FontSize              = 14;
extern color    FontColor             = White;
extern int      Window                = 0;
extern int      Corner                = 0;
extern int      HorizPos              = 85;
extern int      VertPos               = 0;

double pnt;
int    dig;
string objname = "*DRPE";

//+------------------------------------------------------------------+
int init()  {
//+------------------------------------------------------------------+
  pnt = MarketInfo(Symbol(),MODE_POINT);
  dig = MarketInfo(Symbol(),MODE_DIGITS);
  if (dig == 3 || dig == 5) {
    pnt *= 10;
  }  
  ObjectCreate(objname,OBJ_LABEL,Window,0,0);
  return(0);
}

//+------------------------------------------------------------------+
int deinit()  {
//+------------------------------------------------------------------+
  ObjectDelete(objname);
  return(0);
}

//+------------------------------------------------------------------+
int start()  {
//+------------------------------------------------------------------+
  int c=0;
  double sum=0;
  for (int i=1; i<Bars-1; i++)  {
    double hi = iHigh(NULL,PERIOD_D1,i);
    double lo = iLow(NULL,PERIOD_D1,i);
    datetime dt = iTime(NULL,PERIOD_D1,i);
    if (TimeDayOfWeek(dt) > 0 && TimeDayOfWeek(dt) < 6)  {
      sum += hi - lo;
      c++;
      if (c>=NumOfDays) break;
  } }
  hi = iHigh(NULL,PERIOD_D1,0);
  lo = iLow(NULL,PERIOD_D1,0);
  if (i>0 && pnt>0)  {
    string objtext = DoubleToStr(sum/c/pnt,1) + " | " + DoubleToStr((hi-lo)/pnt,1) + " | " +DoubleToStr((((hi-lo)/pnt)/(sum/c/pnt))*100,0)+" %";   
//     add: + c + :here ^ to display user select adr number of days           
    ObjectSet(objname,OBJPROP_CORNER,Corner);
    ObjectSet(objname,OBJPROP_XDISTANCE,HorizPos);
    ObjectSet(objname,OBJPROP_YDISTANCE,VertPos);
    ObjectSetText(objname,objtext,FontSize,FontName,FontColor);
  }  
  return(0);
}

Files:

MQ4
ADR_V2.mq4
2.2 Kb

Responded

1
Developer 1
Rating
(222)
Projects
277
27%
Arbitration
15
47% / 33%
Overdue
9
3%
Busy
2
Developer 2
Rating
(101)
Projects
122
30%
Arbitration
5
40% / 20%
Overdue
5
4%
Free
3
Developer 3
Rating
(777)
Projects
1096
42%
Arbitration
47
49% / 23%
Overdue
84
8%
Free
4
Developer 4
Rating
(25)
Projects
33
24%
Arbitration
3
33% / 33%
Overdue
4
12%
Free
5
Developer 5
Rating
(104)
Projects
133
43%
Arbitration
0
Overdue
3
2%
Working
6
Developer 6
Rating
(492)
Projects
571
38%
Arbitration
2
100% / 0%
Overdue
1
0%
Working
Published: 9 codes
Similar orders
Everything is based on ATR , Additional Filter requirements : - Needs Session Filter . ( please have the session filter ready already ) just copy paste , also let me have a look before, - News Filter . ( having news and session filter already ready will aid ) - Minor changes to some of the input parameters
Ftmo challenge pass ea 30 - 100 USD
Hello there l need a perfect save ea to pass challenge on any kind of propfirm save and nonbad drop down or blowing account I need someone that already have a ea or build new one
Project Objective To develop a robust Expert Advisor (EA) for MetaTrader 5, based on Volume Spread Analysis (VSA), dynamically plotted VWAP (MIDAS), and Stop Limit orders with two triggers, including multiple conditions for entry, cancellation of orders, and risk management. The EA will run on a MT5 demo account, and orders will be mirrored to a MT4 live account. Expected Technical Level This project is not trivial
Hello guys, I'm currently looking for a serious and well-tested EA that can help pass prop firm challenges (like FTMO, MyForexFunds, etc.) and eventually run on a funded account. Requirements: Max Drawdown: 1–2% per trade Lot Size: Adjustable based on the challenge account size Risk Management: On-chart panel showing all key stats (daily drawdown, equity, profit target, etc.) Stop Loss & Take Profit: Must follow
We are looking for a highly experienced MQL4/MQL5 developer to build an auto-compounding trading robot focused on XAUUSD (Gold) and major Forex pairs. The goal is to build a smart EA that grows capital through dynamic lot sizing and strategic risk management. Key Features Required: Compounding logic to grow small balances into high returns Auto lot size adjustment based on equity Only one trade open at a time Support
Hello developers, I’m currently seeking a highly experienced and professional MetaTrader 5 (MT5) expert to handle a technical issue and optimize a pairs trading Expert Advisor (EA) strategy. Project Overview : The EA is based on a market-neutral pairs trading strategy involving EURCHF and AUDUSD . It uses the statistical spread between the two instruments (based on Z-score) to detect divergence from the historical
Hello, I would like an indicator wich can show the tester results equity/balance curve behind the symbol's price chart. So I would like to compare the profit curve to the price chart of the tested instrument as a "Benchmark". ..need to set the EquityScaleFactor, EquityOffset values to synchronise/normalize the comparison.. (similar as here, but on the main price chart instead of the indicator window
Back End Developer Required with Prop firm experience , For an ongoing live chart support . Please mention about your Prop Firm experience while applying , Following are the project requirements : ATR Threshold Breakout . Certification . The expert is designed to gain 1-2 % of the equity every single day . ( for prop firms ) . Session Filter , Economic Calendar Filter . The Panel needs Minor Adjustments to show the
Hey Team, Hope you are doing good. I wanted to convert an indicator (that is available in the mql5 store for free) to EA https://www.mql5.com/en/market/product/125857 In the above link download indicator and check I want same thing to be done as EA. It will, show microstructure (pullback), Inducement, CHOCH, BOS If you can develop and share video as EA, I can make the payment and get the code. Thanks
Back End Developer Required with Prop firm experience , For an ongoing live chart support . Please mention about your experience while applying , Following are the project requirements : ATR Threshold Breakout . Certification . The expert is designed to gain 1-2 % of the equity every single day . ( for prop firms ) . Session Filter , Economic Calendar Filter . The Panel needs Minor Adjustments to show the parameters

Project information

Budget
30+ USD
For the developer
27 USD