Convert Single Symbol function to Multi Symbol

MQL5 Indicatori Esperti

Lavoro terminato

Tempo di esecuzione 20 minuti
Feedback del cliente
Highly recommended, Work delivered very fast and with 100% satisfaction,

Specifiche

ON an EA (not for trading but only for reading buffers) which has a function SearchZigZagExtremums

I want this function to be converted into multi symbols  multi period

below is my attempt to modify the free program which is available in mql codebase

//+------------------------------------------------------------------+
//|                           ZigZag EA(barabashkakvn's edition).mq5 |
//|                                   Copyright © 2009, Tokman Yuriy |
//|                                            yuriytokman@gmail.com |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2009, Tokman Yuriy"
#property link      "yuriytokman@gmail.com"
#property version   "1.002"

//--- input parameters
input string      ____1___          = "Настройки индикатора ZigZag";
input int         ExtDepth          = 12;             // Depth
input int         ExtDeviation      = 5;              // Deviation
input int         ExtBackstep       = 3;              // Backstep
//---
//---
int            handle_iCustom;               // variable for storing the handle of the iCustom indicator
#define RESET 0
int min_rates_total;
int symbolCount;
string symbolsList[];
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit() {
//---
   min_rates_total=100;
//--- indicator buffers mapping
   symbolCount=SymbolsTotal(true);
   if( ArrayResize(symbolsList, symbolCount) < symbolCount ) return (INIT_FAILED);

//--- create handle of the indicator iCustom
   for(int i=0; i<symbolCount; i++) {
      symbolsList[i] = SymbolName(i,true);
      handle_iCustom=iCustom(symbolsList[i],Period(),"Examples\\ZigZag");
//--- if the handle is not created
      if(handle_iCustom==INVALID_HANDLE) {
         //--- tell about the failure and output the error code
         PrintFormat("Failed to create handle of the iCustom indicator for the symbol %s/%s, error code %d",
                     symbolsList[i],
                     EnumToString(Period()),
                     GetLastError());

         //--- the indicator is stopped early
         return(INIT_FAILED);
      }
   }

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

}
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick() {
//---

//---
for(int j=0; j<symbolCount; j++) {
      symbolsList[j] = SymbolName(j,true);
      
   double array_results[];
 
      if(!SearchZigZagExtremums(4,array_results))
         return;
         
      double high=0.0,low=0.0;
      double room_0 = array_results[0]; // index 0
      double room_1 = array_results[1]; // index 1
      double room_2 = array_results[2]; // index 2
      double room_3 = array_results[3]; // index 3

//--- находим верх и низ
      if(room_1>room_2) {
         high=room_1;
         low=room_2;
      } else {
         high=room_2;
         low=room_1;
      }
     
      Print(symbolsList[j], array_results[0]);
      Sleep(1000);
      }
      


//---

   }

//+------------------------------------------------------------------+
//| Search for indicator extremums                                   |
//+------------------------------------------------------------------+
   bool SearchZigZagExtremums(const int count,double &array_results[]) {
      if(!ArrayIsDynamic(array_results)) {
         Print("This a no dynamic array!");
         return(false);
      }
      ArrayFree(array_results);
      ArrayResize(array_results,count);
      ArraySetAsSeries(array_results,true);
      int      buffer_num=0;           // indicator buffer number
      double   arr_buffer[];
      ArraySetAsSeries(arr_buffer,true);
//--- reset error code
      ResetLastError();
//--- fill a part of the iCustom array with values from the indicator buffer
      int copied=CopyBuffer(handle_iCustom,buffer_num,0,100,arr_buffer);
      if(copied<0) {
         //--- if the copying fails, tell the error code
         PrintFormat("Failed to copy data from the iCustom indicator, error code %d",GetLastError());
         //--- quit with zero result - it means that the indicator is considered as not calculated
         return(false);
      }
      int elements=0;
      for(int i=0; i<copied; i++) {
         if(arr_buffer[i]!=0) {
            array_results[elements]=arr_buffer[i];
            elements++;
            if(elements==count)
               break;
         }
      }
      if(elements==count)
         return(true);
//---
      return(false);
   }


Goal : I want this program to be modified so it can read buffers 

      double room_0 = array_results[0]; // index 0
      double room_1 = array_results[1]; // index 1
      double room_2 = array_results[2]; // index 2
      double room_3 = array_results[3]; // index 3

for each symbol existed in marketwatch and when i print

Print(symbolsList[j], array_results[0]);

I get results like

Symbol_1 buffer_for_Symbol_1 for PERIOD_1

Symbol_2 buffer_for_Symbol_2 for PERIOD_2

like this

Con risposta

1
Sviluppatore 1
Valutazioni
(356)
Progetti
632
26%
Arbitraggio
89
73% / 13%
In ritardo
12
2%
Gratuito
2
Sviluppatore 2
Valutazioni
(38)
Progetti
50
10%
Arbitraggio
1
0% / 0%
In ritardo
8
16%
Gratuito
Ordini simili
Attached to this post is the pinescript tradingview indicator code, i will also attach a link to the youtube explanatory video of how the indicator works on tradingview, i will like the exact thing on mt5, including the percentage prediction on each bar and the win loss counter ... it should work on both forex, stock and volatility indices on mt5 https://youtu.be/30FLWyEWroM?si=q9GpvJVHp-oyvsvZ // This work is
Hello! I want to develop an indicator for tradingview. Twice a day on 12H candle close the indicator will show a set of timeframes if they closed bullish or bearish. Show daybreak with a vertical line. Every 12H closure will show a box somewhere, preferably above/below that candle on all timeframes up to D1, clearly showing which candle is the close of 12H. The box will contain info about which timeframes closed
Hello, Looking for Multipair and Multi-timeframe scanner indicator based on Zigzag. It's going to be a simple indicator based on Higher high and Lower Low Formation. I want for both platform for MT4/5. It should have alert features as well have to scan from custom pairs, marketwatch also able to use custom timeframe. I'll share zigzag formation to the right candidate when it should gives an alert. And if you are not
Hello, I purchased a TradingView script that works very well, but it doesn’t have any alerts. All I need are alerts programmed so I don’t have to sit behind the chart watching it all the time
Hi! Are you able to code an exact copy of an indicator for trading view? It must be exactly the same. if you are expert in doing this I am expecting your message in the comment session to share you with the indicator I want to duplicate. Looking forward to your positive response and the opportunity to collaborate with you on this project
Hello developers I hope this message finds you well. I am currently seeking a highly skilled developer for an important project. I need an exact copy of a TradingView indicator to be coded for the MetaTrader 4/5 platform. The indicator must be replicated with absolute precision, maintaining all its functionalities and features. Would you be able to take on this project? If so, I would appreciate discussing the
Hello Developers, I am looking for a highly skilled and experienced developer to code an exact copy of a specific indicator for TradingView. The indicator must be replicated with precise accuracy, maintaining all functionalities and features of the original. Requirements: Proficiency in Pine Script and experience with TradingView indicators. Demonstrated ability to replicate complex indicators with exact
MODIFICATION OF AND EXISTING EXPERT BY ADDING INDICATORS TO FUNCTION AS FILTERS, TRADE CLOSURE BY THE REVERSAL OF THE adx INDICATOR, LOOKING FOR TRADE BASED ON THE COLOR OF THE PERCENTAGE CHANGE INDICATOR (DPC) SELLING THE COLR IS RED AND DECREASING IN PERCENTAGE AND BUYING WHEN THE COLOR IS GREEN AND INCREASING IN PERCENTAGE . There is an EA I have been using which I splitted into long trading and short trading. It
i am looking for experienced programmer to create indicator for me. i am willing to pay for the service. and if it works amazingly like i expected. i will tip more money
I recently bought an indicator, that sends out notifications for trades i need to place, on the notification these and SL and TP, so i want an EA that would automate that for me

Informazioni sul progetto

Budget
30+ USD
Per lo sviluppatore
27 USD