Indicator conversion from MQL4 to MQL5 and EA build on it (in MQL5)

MQL5 지표

작업 종료됨

실행 시간 3 일

명시

The job is very simple. An indicator that has less than 90 lines I want to be converted from MQL4 to MQL5. Than in MQL5 build an EA that will open BUY when the 2 arrows of the indicator are both BLUE  at the same time and close it when the 2 arrows are different. In the same way open an SELL order when the 2 arrows  are both RED at the same time and close it when the 2 arrows are different. You can use the MQL4 code (that is functionally) to better understand what I mean.

#property indicator_separate_window
#property indicator_minimum 1.0
#property indicator_maximum 3.0
#property indicator_buffers 6
#property indicator_color1 Blue
#property indicator_color2 Red
#property indicator_color3 Yellow
#property indicator_color4 Blue
#property indicator_color5 Red
#property indicator_color6 Yellow

int g_period_76 = 14;
int g_period_80 = 14;
int g_period_84 = 14;
double g_ibuf_88[];
double g_ibuf_92[];
double g_ibuf_96[];
double g_ibuf_100[];
double g_ibuf_104[];
double g_ibuf_108[];
double g_imomentum_112;
double g_idemarker_120;
double g_iforce_128;
int g_color_136 = Blue;
int g_color_140 = Red;
int g_color_144 = Yellow;
int gi_148 = 225;
int gi_152 = 226;
int gi_156 = SYMBOL_STOPSIGN;
int gi_160 = 1;
int gi_164 = 2;
int gi_168 = 1;
double gd_172 = 0.6;

int init() {
   SetIndexStyle(0, DRAW_ARROW, STYLE_SOLID, gi_160, g_color_136);
   SetIndexArrow(0, gi_148);
   SetIndexBuffer(0, g_ibuf_88);
   SetIndexStyle(1, DRAW_ARROW, STYLE_SOLID, gi_160, g_color_140);
   SetIndexArrow(1, gi_152);
   SetIndexBuffer(1, g_ibuf_92);
   SetIndexStyle(2, DRAW_ARROW, STYLE_SOLID, gi_160, g_color_144);
   SetIndexArrow(2, gi_156);
   SetIndexBuffer(2, g_ibuf_96);
   SetIndexStyle(3, DRAW_ARROW, STYLE_SOLID, gi_160, g_color_136);
   SetIndexArrow(3, gi_148);
   SetIndexBuffer(3, g_ibuf_100);
   SetIndexStyle(4, DRAW_ARROW, STYLE_SOLID, gi_160, g_color_140);
   SetIndexArrow(4, gi_152);
   SetIndexBuffer(4, g_ibuf_104);
   SetIndexStyle(5, DRAW_ARROW, STYLE_SOLID, gi_160, g_color_144);
   SetIndexArrow(5, gi_156);
   SetIndexBuffer(5, g_ibuf_108);
   IndicatorShortName("Oracle Direction");
   return (0);
}

int deinit() {
   return (0);
}

int start() {
   int li_0 = IndicatorCounted();
   if (li_0 < 0) return (-1);
   if (li_0 > 0) li_0--;
   int li_4 = Bars - li_0;
   for (int li_8 = li_4 - 1; li_8 >= 0; li_8--) {
      g_idemarker_120 = iDeMarker(NULL, 0, g_period_80, li_8);
      g_imomentum_112 = iMomentum(NULL, 0, g_period_76, PRICE_CLOSE, li_8);
      g_iforce_128 = iForce(NULL, 0, g_period_84, MODE_EMA, PRICE_CLOSE, li_8);
      g_ibuf_88[li_8] = EMPTY_VALUE;
      g_ibuf_92[li_8] = EMPTY_VALUE;
      g_ibuf_96[li_8] = EMPTY_VALUE;
      g_ibuf_100[li_8] = EMPTY_VALUE;
      g_ibuf_104[li_8] = EMPTY_VALUE;
      g_ibuf_108[li_8] = EMPTY_VALUE;
      if (g_imomentum_112 > 100.0) g_ibuf_88[li_8] = gd_172 * gi_164 + 1.0;
      if (g_imomentum_112 <= 100.0) g_ibuf_92[li_8] = gd_172 * gi_164 + 1.0;
      if (g_idemarker_120 > 0.5 && g_iforce_128 > 0.0) g_ibuf_100[li_8] = gd_172 * gi_168 + 1.0;
      else {
         if (g_idemarker_120 < 0.5 < 50 && g_iforce_128 < 0.0) g_ibuf_104[li_8] = gd_172 * gi_168 + 1.0;
         else g_ibuf_108[li_8] = gd_172 * gi_168 + 1.0;
      }
   }
   return (0);
}

 

응답함

1
개발자 1
등급
(564)
프로젝트
845
73%
중재
15
53% / 13%
기한 초과
193
23%
무료
2
개발자 2
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
3
개발자 3
등급
(47)
프로젝트
140
49%
중재
9
56% / 0%
기한 초과
27
19%
무료
4
개발자 4
등급
(15)
프로젝트
65
58%
중재
6
17% / 33%
기한 초과
39
60%
무료
5
개발자 5
등급
(187)
프로젝트
367
56%
중재
45
22% / 56%
기한 초과
188
51%
무료
게재됨: 1 기고글, 6 코드
비슷한 주문
Please may someone assist me with the indicator attached, it has a SERIOUS BUG issue in the sense that when I load it, and activate the template (attached as well) MT4 ALWAYS freezes and then eventually disconnects automatically, ALL THE TIME. It even gets worse to an extent that after disconnecting a number of times mt4 ends up not loading anymore, UNTIL I remove the indicator. Please I WILL NEED A DEMO (FOR A DAY)
‎A trending candle followed by a smaller trending candle which is the second candle with no 5EMA ‎ ‎The 3rd candle is a reversal candle in which it and it's immidiate previous candle must be at least 70% of each other's body or equal body, with no 5EMA touch ‎ ‎the 3rd candle candle is followed immediately by the 4th candle which is the signal candle in which it and the 1st cabdle must be also at least 70% of
LynxMT5algo 30 - 100 USD
An mt5 add on indicator like gainalgo style to show entrance and exit areas for gold silver and Btc scalping. It will be used to make trading more easy for beginners
I have the Fisher Indicator shown below the chart. I need an alert added for when the Fisher Indicator hits the 50 point at the end of each period. GBPUSD and EURUSD 4H charts are provided and I can provide additional
Hello here, I need someone who can work on pinescript and also with Renko charts. My entries for my strategy would be based on stop orders Kindly let me know if you can work on this for me and i will send necessary file and quote in the chat
Freelance Task — EA Recovery Layer Hello. I have a ready-made MQL5 EA. The signals, SL/TP and lot calculation should essentially not be touched. I need a recovery system added. I am not a programmer — below is how the robot should behave. What stays Entry only from an EA signal. Stop-loss is not a new signal. Trailing is already built into my EA — recovery does not implement its own trailing. If trailing is disabled
# SNRZ BOT — SESSION PROGRESS LOG Last updated: 2026-09-16 (local late-evening session) ## SAN BOT (new — cloned from SNRZ) - `MQL5\Experts\AutomatedOrderBot_SAN.mq5` / `.ex5` — v1.0, compiled 0 errors/0 warnings - Signal source: custom indicator "SAN" (InpSANName, buy buf 0 / sell buf 1, target bar 1), same SNRZ-style read, MA fallback if missing - Magic number 234567 (separate from SNRZ 123456 so both bots can run
Should be as it but no alarms, also we need to add a deep search so he can see all the preves candles and a memory function so its not slowing down the indicator. for higher time frames daily 4h 1h around 365 days and for lower time frames we do up to 20k bars but both flexible so i can change it later. the memory is important so the indicator is not always recalculating everything when a new candle shows especially
Hi, I need an experienced NinjaTrader 8/NinjaScript developer to finish or rebuild an automated futures strategy, ideally by the end of this week. I already have the complete TradingView Pine Script reference strategy, an existing ~2,000-line NinjaScript implementation, Playback logs, and known historical benchmark trades. MOST IMPORTANT REQUIREMENT: TRADINGVIEW ↔ NINJATRADER PARITY. The Pine Script is the reference
I need a custom MQL5 indicator for MetaTrader 5. The indicator must automatically print entry, stop loss, and take profit zones on the chart using dots. A critical requirement is that these dots must be non-lagging and absolutely non-repainting. Additionally, the indicator needs to identify and display current supply and demand zones. Please provide the mq5 source code and the ex5 file upon completion

프로젝트 정보

예산
10 USD