Convert MT4 Indicator to MT5

작업 종료됨

실행 시간 10 분
피고용인의 피드백
Всё прошло отлично! Прекрасный заказчик!
고객의 피드백
Fantastic work! I couldn't have asked for better or quicker

명시

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);
}

파일:

MQ4
ADR_V2.mq4
2.2 Kb

응답함

1
개발자 1
등급
(137)
프로젝트
160
23%
중재
7
0% / 43%
기한 초과
4
3%
로드됨
2
개발자 2
등급
(92)
프로젝트
109
34%
중재
5
40% / 20%
기한 초과
5
5%
작업중
3
개발자 3
등급
(721)
프로젝트
1040
39%
중재
47
49% / 23%
기한 초과
84
8%
무료
4
개발자 4
등급
(10)
프로젝트
15
13%
중재
1
0% / 100%
기한 초과
1
7%
로드됨
5
개발자 5
등급
(60)
프로젝트
79
34%
중재
0
기한 초과
3
4%
작업중
6
개발자 6
등급
(328)
프로젝트
387
33%
중재
2
100% / 0%
기한 초과
0
작업중
비슷한 주문
I have a custom EA that works fine in the live market trading, but when doing a back test in the strategy tester , it does not open sell orders. There are no errors or warnings; it just doesn't open sell orders. I've checked every possible reason that might be the reason why it does not open sell orders, but I can't find anything, especially since it works fine in the real market and it opens both buys and sells
I'm looking for someone to help me create an arbitrage trading robot that can trade on any decentralized exchange and forex market. I already have some source code to a strategy but would like to enhance it to make it profitable and automated
I installed the E.A. into the Experts folder in MT4. When I double click on it nothing happens. When I right click and "attach to chart" nothing happens. The E.A. is not grayed out, it simply will not attach. Any help would be greatly Appreciated
I have an EA and want to add few new logic to fetch profit taking factors and other values from an external master data and use it in existing EA
I need EA that works on MT5 to be able to do the following: - Can recognize Support/Resistance area - Can recognize VWAP direction. - Can recognize RSI. - Can recognize Double Top/bottom, Bullish/Bearish hammer candle, Bullish/bearish engulfing candle. - Ability to set Stoploss below/above support/resistance, but risk must be fixed at a certain price. - Stoploss
I want a program that will help calculate and enter the market on full margin for me. I just need to put in the price for entry, Stop loss and TP then it will calculate the lot sizes for entering the trade on full margin on Mt5
I am seeking a highly skilled and experienced developer to assist with an important project. I need a development of an automated trading bot for NinjaTrader, utilizing a 4 SMA (Simple Moving Average) crossing strategy, with additional custom diversions for trade entries. The bot needs to be based on a strategy involving the crossing of four different SMAs. The exact periods for these SMAs and the conditions for
So i have copier EA. The idea is the EA will triggered through manual OP by user via mobile or whatever platform. Let's say 0.01 lot to trigger it. After the EA takes master's position, the EA will be standby mode. If the master take more OP, the EA still not take the master's position (OP) until the user input manually once again via mobile for another 0.01 lot. Since this is a MT4 EA, Whenever user want to close
preciso de um robô com duas médias móveis, uma exponencial high e uma exponencial low. preciso também ter a opção de utilizar e todos os tempos gráficos e alterar os parâmetros das médias. entrada de compra será feita quando um candle de alta romper e fechar a cima da média high e fechará a posição quando um candle de baixa romper e fechar a baixo da média low. a venda será feita quando o candle de baixa romper e
Description - An expert advisor(s), placing sell trades in EUR/USD, based on the close price of the previous two candles, as shown in the figure below. The trades would be made in the 5 minute, 1 hour, and 1 day timeframes. In the 5 minute and 1 hour timeframes the market orders would be placed at the start of a new candle, at specific times EST. The order would be cancelled at the close of that candle, i.e after 5

프로젝트 정보

예산
30+ USD
개발자에게
27 USD