there is two error on this code,any one can fix this please...

 
--------------------------------------------------------------+
//|                                                 adx screener.mq5 |
//|                                  Copyright 2023, MetaQuotes Ltd. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2024, MetaQuotes Software Corp."
#property link      "https://mql5.com"
#property version   "1.00"
#property indicator_separate_window
#property indicator_level1 10
#property indicator_level2 25
#property indicator_level3 40

#property indicator_label1  "ADX"            // Plot Label
#property indicator_type1   DRAW_NONE        // Plot Type
#property indicator_color1  clrGreen         // Plot color
#property indicator_style1  STYLE_SOLID      // Draw a solid line
#property indicator_width1  2                // Plot width

string INDI_NAME="MPSCN-";

enum ENUM_SHOW_SYMBOLS
  {
   MarketWatch, //from Market Watch
   Custom   //from Custom List
  };

input ENUM_SHOW_SYMBOLS ShowSymbols=MarketWatch; //Show Symbols from
input string CustomSymbols=""; //Custom List (Ex:"EURUSD/GBPUSD")
input int TimerInterval=60; //Update interval (secs)
input int FontSize=8;  //Font Size
input string FontName="Calibri"; //Font Name
input int ColumnHeight=50; //Max symbols per column

input bool ShowAdx=true; //Show ADX
input ENUM_TIMEFRAMES AdxTimeframe=PERIOD_H1; //ADX Timeframe
input int AdxPeriod=14; //ADX Period
input ENUM_APPLIED_PRICE AdxAppliedPrice=PRICE_CLOSE; //ADX Applied Price

int GUIXOffset = 20;
int GUIYOffset = 45;

int GUIHeaderXOffset = 20;
int GUIHeaderYOffset = 0;

int GUIColOffset=100;

int ListXOffset = 10;
int ListYOffset = 15;

int ListXMultiplier = 10;
int ListYMultiplier = 15;

double   BufferADX[];



datetime TimeMissing;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
   SetIndexBuffer(0,BufferADX,INDICATOR_DATA);

// If initialization is successful, return INIT_SUCCEEDED
   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[])



  {
//---

//--- return value of prev_calculated for next call
   return(rates_total);

//+------------------------------------------------------------------+
//| Custom indicator timer function                                  |
//+------------------------------------------------------------------+
   void OnTimer()
     {
      static long last_time=0;
      MqlTick tick;
      bool refresh=false;
      int total=list_ind.Total();
      for(int i=0;i<total;i++)
        {
         CIndCollection* collection=list_ind.At(i);
         if(collection==NULL)
            continue;
         collection.OnTimer();
         if(collection.IsCounterRefreshDone())
           {
            if(SymbolInfoTick(collection.Symbol(),tick))
              {
               if(tick.time_msc>last_time)
                 {
                  last_time=tick.time_msc;
                  refresh=true;
                 }
              }
           }
        }
      if(refresh)
         RedrawField();

      //+------------------------------------------------------------------+
      //| Cart event function                                              |
      //+------------------------------------------------------------------+
      void OnChartEvent(const int id,
                        const long &lparam,
                        const double &dparam,
                        const string &sparam)
        {
         panel.OnChartEvent(id,lparam,dparam,sparam);
        }
      //+------------------------------------------------------------------+
      //| Обновляет данные панели                                          |
      //+------------------------------------------------------------------+
      void RedrawField(void)
        {
         int row=list_symbols.Total();
         int col=list_timeframes.Total();
         CCanvas *canvas=panel.GetFieldCanvas();
         if(canvas==NULL)
           {
            Print(__FUNCTION__,": Error: Canvas not available.");
            return;
           }
         int shiftV=14,shiftH=86,startH=54,startV=15;
         panel.Resize(startH+col*shiftH,shiftV+row*shiftV+3);
         canvas.Erase(ColorToARGB(panel.ColorBackground(),0));
         panel.DrawSeparateHLine(1,canvas.Width()-2,13,panel.NewColor(panel.ColorBackground(),-5,-5,-5),panel.NewColor(panel.ColorBackground(),45,45,45));
         panel.DrawSeparateVLine(50,14,canvas.Height()-2,panel.NewColor(panel.ColorBackground(),-5,-5,-5),panel.NewColor(panel.ColorBackground(),45,45,45));

         //---
         int total=list_ind.Total();
         for(int i=0;i<total;i++)
           {
            CIndCollection* collection=list_ind.At(i);
            if(collection==NULL)
               continue;
            collection.Refresh();
            int x=collection.IndexX();
            int y=collection.IndexY();
            if(y==0)
              {
               string tf=collection.TimeframeDescription();
               canvas.FontSet(panel.NameCaptionFont(),-80,FW_BLACK);
               canvas.TextOut(startH+(shiftH/2)-4+x*shiftH,0,tf,ColorToARGB(panel.ColorTexts()),TA_CENTER);
               if(x==0)
                  canvas.TextOut(22,0,"Pairs",ColorToARGB(panel.ColorTexts()),TA_CENTER);
              }
            if(x==0)
              {
               canvas.FontSet(panel.NameCaptionFont(),-80,FW_BLACK);
               canvas.TextOut(4,startV+y*shiftV,collection.Symbol(),ColorToARGB(panel.ColorTexts()));
              }
            int gx=startH+(shiftH/2)-4+x*shiftH;
            int gy=startV+6+y*shiftV;
            panel.DrawSeparateVLine(gx+shiftH-shiftH/2,14,canvas.Height()-2,panel.NewColor(panel.ColorBackground(),-5,-5,-5),panel.NewColor(panel.ColorBackground(),45,45,45));

            //--- ADX
            double adx0=0,adx1=0,dip0=0,dim0=0;
            CIndicatorsBase* adx=collection.GetIndByID(IND_ID_ADX);
            if(adx!=NULL)
              {
               adx0=adx.GetData(MAIN_LINE,0);
               adx1=adx.GetData(MAIN_LINE,1);
               dip0=adx.GetData(PLUSDI_LINE,0);
               dim0=adx.GetData(MINUSDI_LINE,0);
              }
            if(adx0!=EMPTY_VALUE && adx1!=EMPTY_VALUE && dip0!=EMPTY_VALUE && dim0!=EMPTY_VALUE)
              {
               //--- текст
               string text_dip=DoubleToString(dip0,2);
               string text_dim=DoubleToString(dim0,2);
               canvas.FontSet(panel.NameCaptionFont(),-80,FW_NORMAL);
               canvas.TextOut(startH+(shiftH/2)-14+x*shiftH,startV+y*shiftV,text_dip,ColorToARGB(InpColorUP),TA_RIGHT);
               canvas.TextOut(startH+(shiftH/2)-10+x*shiftH,startV+y*shiftV,"/",ColorToARGB(InpColorLabels),TA_CENTER);
               canvas.TextOut(startH+(shiftH/2)-6+x*shiftH,startV+y*shiftV,text_dim,ColorToARGB(InpColorDN),TA_LEFT);
               //--- стрелки
               if(adx0>level_adx && adx0>adx1 && dip0>dim0)
                 {
                  TriangleUp(canvas,gx+33,gy,panel.NewColor(InpColorUP,-40,-40,-40),panel.NewColor(InpColorUP,40,40,40));
                  SetSyncStatus(collection.Symbol(),collection.Timeframe(),SIG_STATUS_UP);
                 }
               else
                  if(adx0>level_adx && adx0>adx1 && dip0<dim0)
                    {
                     TriangleDown(canvas,gx+33,gy,panel.NewColor(InpColorDN,-40,-40,-40),panel.NewColor(InpColorDN,40,40,40));
                     SetSyncStatus(collection.Symbol(),collection.Timeframe(),SIG_STATUS_DN);
                    }
                  else
                    {
                     Circle(canvas,gx+33,gy,1,panel.NewColor(InpColorNL,-40,-40,-40),panel.NewColor(InpColorNL,40,40,40));
                     SetSyncStatus(collection.Symbol(),collection.Timeframe(),SIG_STATUS_NL);
                    }
              }
            else
              {
               Circle(canvas,gx,gy,1,panel.NewColor(InpColorNL,-40,-40,-40),panel.NewColor(InpColorNL,40,40,40));
               SetSyncStatus(collection.Symbol(),collection.Timeframe(),SIG_STATUS_NL);
              }
           }
         if(InpUseAlert)
           {
            AlertAllSyncProcess(canvas,startH,shiftH,startV,shiftV);
            //AlertOneTFProcess(canvas,startH,shiftH,startV,shiftV);
           }
         canvas.Update(true);
        }
      //+------------------------------------------------------------------+
      //|                                         |
      //+------------------------------------------------------------------+
      void TriangleUp(CCanvas *canvas,const int x,const int y,const color clr_bd,const color clr_bg)
        {
         if(canvas==NULL)
            return;
         int x1=x-4;
         int y1=y+2;
         int x2=x;
         int y2=y-2;
         int x3=x+4;
         int y3=y1;
         canvas.FillTriangle(x1,y1,x2,y2,x3,y3,ColorToARGB(clr_bg));
         canvas.TriangleWu(x1,y1,x2,y2,x3,y3,ColorToARGB(clr_bd),STYLE_SOLID);
        }
      //+------------------------------------------------------------------+
      //|                                           |
      //+------------------------------------------------------------------+
      void TriangleDown(CCanvas *canvas,const int x,const int y,const color clr_bd,const color clr_bg)
        {
         if(canvas==NULL)
            return;
         int x1=x-4;
         int y1=y-2;
         int x2=x;
         int y2=y+2;
         int x3=x+4;
         int y3=y1;
         canvas.FillTriangle(x1,y1,x2,y2,x3,y3,ColorToARGB(clr_bg));
         canvas.TriangleWu(x1,y1,x2,y2,x3,y3,ColorToARGB(clr_bd),STYLE_SOLID);
        }
      //+------------------------------------------------------------------+
      //|                                         |
      //+------------------------------------------------------------------+
      void TriangleRight(CCanvas* canvas,const int x,const int y,const color clr_bd,const color clr_bg)
        {
         if(canvas==NULL)
            return;
         int x1=x-2;
         int y1=y-3;
         int x2=x+3;
         int y2=y;
         int x3=x-2;
         int y3=y+3;
         canvas.FillTriangle(x1,y1,x2,y2,x3,y3,ColorToARGB(clr_bg));
         canvas.TriangleWu(x1,y1,x2,y2,x3,y3,ColorToARGB(clr_bd),STYLE_SOLID);
        }
      //+------------------------------------------------------------------+
      //|                                                       |
      //+------------------------------------------------------------------+
      void Circle(CCanvas *canvas,const int x,const int y,const double r,const color clr_bd,const color clr_bg)
        {
         if(canvas==NULL)
            return;
         canvas.FillCircle(x,y,(int)r,ColorToARGB(clr_bg));
         canvas.CircleWu(x,y,r,ColorToARGB(clr_bd),STYLE_SOLID);
        }
      //+------------------------------------------------------------------+
      //|                                              |
      //+------------------------------------------------------------------+
      void Rectangle(CCanvas* canvas,const int x,const int y,const int h,const int w,const color clr_bd,const color clr_bg,const uchar alpha=255)
        {
         if(canvas==NULL)
            return;
         int h2=(int)ceil(h/2);
         int w2=(int)ceil(w/2);
         int x1=x-w2;
         int y1=y-h2;
         int x2=x+w2;
         int y2=y+h2;
         canvas.FillRectangle(x1,y1,x2,y2,ColorToARGB(clr_bg,alpha));
         canvas.Rectangle(x1,y1,x2,y2,ColorToARGB(clr_bd,alpha));
        }
      //+------------------------------------------------------------------+
      //|                            |
      //+------------------------------------------------------------------+
      void AlertAllSyncProcess(CCanvas* canvas,const int startH,const int shiftH,const int startV,const int shiftV)
        {
         int total_sync=list_sync.Total();
         for(int i=0;i<total_sync;i++)
           {
            CSymbol* sync=list_sync.At(i);
            if(sync==NULL)
               continue;
            int value_sync=0;
            int num_sync=sync.CheckSyncAllTFs(value_sync);
            if(num_sync>1)
              {
               string text="";
               color clr_sig=InpColorNL;
               int y=sync.IndexY();
               int gy=startV+6+y*shiftV;
               CArrayObj* list_tf=sync.GetListTimeframes();
               if(list_tf==NULL)
                  continue;
               int total_tf=list_tf.Total();
               for(int j=0;j<total_tf;j++)
                 {
                  CTimeframe* obj_tf=list_tf.At(j);
                  if(obj_tf==NULL)
                     continue;
                  int x=obj_tf.IndexX();
                  int gx=startH+(shiftH/2)-4+x*shiftH;
                  //---
                  text=messages.Message(value_sync);
                  StringReplace(text,"SYMBOL",sync.Symbol());
                  if(value_sync==SIG_STATUS_UP)
                    {
                     clr_sig=InpColorUP;
                     Rectangle(canvas,gx+33,gy,10,12,clr_sig,panel.NewColor(clr_sig,40,40,40),50);
                     TriangleUp(canvas,gx+33,gy,panel.NewColor(clr_sig,-40,-40,-40),panel.NewColor(clr_sig,40,40,40));
                    }
                  else
                     if(value_sync==SIG_STATUS_DN)
                       {
                        clr_sig=InpColorDN;
                        Rectangle(canvas,gx+33,gy,10,12,clr_sig,panel.NewColor(clr_sig,40,40,40),50);
                        TriangleDown(canvas,gx+33,gy,panel.NewColor(clr_sig,-40,-40,-40),panel.NewColor(clr_sig,40,40,40));
                       }
                 }
               //--- Alert
               if(long(TimeCurrent()-sync.LastAlertTime())>long(alerts_interval*60))
                 {
                  Alert(text);
                  sync.SetAlertTime(TimeCurrent());
                 }
              }
           }
        }
      //+------------------------------------------------------------------+
      //|                  |
      //+------------------------------------------------------------------+
      void AlertOneTFProcess(CCanvas* canvas,const int startH,const int shiftH,const int startV,const int shiftV)
        {
         int total_sync=list_sync.Total();
         for(int i=0;i<total_sync;i++)
           {
            CSymbol* sync=list_sync.At(i);
            if(sync==NULL)
               continue;
            string text="";
            color clr_sig=InpColorNL;
            int y=sync.IndexY();
            int gy=startV+6+y*shiftV;
            CArrayObj* list_tf=sync.GetListTimeframes();
            int total_tf=list_tf.Total();
            for(int j=0;j<total_tf;j++)
              {
               CTimeframe* obj_tf=list_tf.At(j);
               if(obj_tf==NULL)
                  continue;
               ENUM_TIMEFRAMES tf=obj_tf.Timeframe();
               int signal=sync.CheckSigOneTF(tf);
               if(signal!=0)
                 {
                  text=messages.Message(signal);
                  StringReplace(text,"SYMBOL",sync.Symbol());
                  StringReplace(text,"TIMEFRAME",obj_tf.TimeframeDescription());
                  //---
                  int x=obj_tf.IndexX();
                  int gx=startH+(shiftH/2)-4+x*shiftH;
// In MQL5, the line of code you provided calculates the value of the variable `gx` based on several other variables. Let's break down the expression:
// 

int gx = startH + (shiftH / 2) - 4 + x * shiftH;

// 
// Here is what each part represents:
// 
// - `startH`: This is a variable, presumably an integer, representing some starting value.
// - `shiftH`: This is another variable, presumably an integer, representing a shift value.
// - `x`: This is a variable, presumably an integer, representing a multiplier or index.
// 
// The expression can be broken down as follows:
// 
// 1. `shiftH / 2`: This calculates half of the `shiftH` value.
// 2. `startH + (shiftH / 2)`: This adds the half of `shiftH` to `startH`.
// 3. `startH + (shiftH / 2) - 4`: This subtracts 4 from the result of the previous step.
// 4. `x * shiftH`: This multiplies `x` by `shiftH`.
// 5. `startH + (shiftH / 2) - 4 + x * shiftH`: This adds the result of step 4 to the result of step 3.
// 
// So, the final value of `gx` is determined by combining these operations.
// 
// Here is a simple example to illustrate this with some hypothetical values:
// 

int startH = 10;
int shiftH = 6;
int x = 3;

int gx = startH + (shiftH / 2) - 4 + x * shiftH;

// Calculation steps:
// shiftH / 2 = 6 / 2 = 3
// startH + (shiftH / 2) = 10 + 3 = 13
// startH + (shiftH / 2) - 4 = 13 - 4 = 9
// x * shiftH = 3 * 6 = 18
// gx = 9 + 18 = 27

Print(gx); // This will output 27

// 
// In this example, `gx` would be calculated to be 27.
// 

                  //---
                  if(signal==SIG_STATUS_UP)
                    {
                     //text=messages.Message(SIG_STATUS_B_DS);
                     //StringReplace(text,"SYMBOL",sync.Symbol());
                     //StringReplace(text,"TIMEFRAME",obj_tf.TimeframeDescription());
                     //clr_sig=InpColorUP;
                     //TriangleUp(canvas,gx-20,gy,clr_sig,panel.NewColor(clr_sig,40,40,40));
                     //TriangleUp(canvas,gx+10,gy,clr_sig,panel.NewColor(clr_sig,40,40,40));
                    }
                  else
                     if(signal==SIG_STATUS_DN)
                       {
                        //text=messages.Message(SIG_STATUS_S_DS);
                        //StringReplace(text,"SYMBOL",sync.Symbol());
                        //StringReplace(text,"TIMEFRAME",obj_tf.TimeframeDescription());
                        //clr_sig=InpColorDN;
                        //TriangleUp(canvas,gx-20,gy,clr_sig,panel.NewColor(clr_sig,40,40,40));
                        //TriangleUp(canvas,gx+10,gy,clr_sig,panel.NewColor(clr_sig,40,40,40));
                       }
                  //--- Alert
                  if(long(TimeCurrent()-obj_tf.LastAlertTime())>long(alerts_interval*60))
                    {
                     Alert(text);
                     obj_tf.SetAlertTime(TimeCurrent());
                    }
                 }
              }
           }
        }
      //+------------------------------------------------------------------+
      //|          |
      //+------------------------------------------------------------------+
      bool IsPresentSymbolInSyncList(const string symbol)
        {
         int total=list_sync.Total();
         for(int i=0;i<total;i++)
           {
            CSymbol* obj=list_sync.At(i);
            if(obj==NULL)
               continue;
            if(obj.Symbol()==symbol)
               return true;
           }
         return false;
        }
      //+------------------------------------------------------------------+
      //|                |
      //+------------------------------------------------------------------+
      CSymbol* GetSyncSymbol(const string symbol)
        {
         int total=list_sync.Total();
         for(int i=0;i<total;i++)
           {
            CSymbol* obj=list_sync.At(i);
            if(obj==NULL)
               continue;
            if(obj.Symbol()==symbol)
               return obj;
           }
         return NULL;
        }
      //+------------------------------------------------------------------+
      //|                 |
      //+------------------------------------------------------------------+
      void SetSyncStatus(const string symbol,const ENUM_TIMEFRAMES timeframe,const int status)
        {
         int total=list_sync.Total();
         for(int i=0;i<total;i++)
           {
            CSymbol* sync=list_sync.At(i);
            if(sync==NULL || sync.Symbol()!=symbol)
               continue;
            sync.SetStatusTF(timeframe,status);
           }
        }
      //+------------------------------------------------------------------+
      //|                                                  |
      //+------------------------------------------------------------------+
      bool SymbolCheck(const string symbol_name)
        {
         long select=0;
         ResetLastError();
         if(!SymbolInfoInteger(symbol_name,SYMBOL_SELECT,select))
           {
            int err=GetLastError();
            Print("Error: ",err," Symbol ",symbol_name," does not exist");
            return false;
           }
         else
           {
            if(select)
               return true;
            ResetLastError();
            if(!SymbolSelect(symbol_name,true))
              {
               int err=GetLastError();
               Print("Error selected ",symbol_name,": ",err);
              }
           }
         return false;
        }
      //+------------------------------------------------------------------+
      //|                          |
      //+------------------------------------------------------------------+
      bool IsPresentSymbol(const string symbol)
        {
         list_symbols.Sort();
         return(list_symbols.Search(symbol)>WRONG_VALUE);
        }
      //+------------------------------------------------------------------+
      //|                               |
      //+------------------------------------------------------------------+
      int IndexSymbol(const string symbol_name)
        {
         int total=list_symbols.Total();
         for(int i=0;i<total;i++)
            if(list_symbols.At(i)==symbol_name)
               return i;
         return WRONG_VALUE;
        }
      //+------------------------------------------------------------------+
      //|                             |
      //+------------------------------------------------------------------+
      int IndexTimeframe(const ENUM_TIMEFRAMES timeframe)
        {
         int total=list_timeframes.Total();
         for(int i=0;i<total;i++)
            if((ENUM_TIMEFRAMES)list_timeframes.At(i)==timeframe)
               return i;
         return WRONG_VALUE;
        }
      //+------------------------------------------------------------------+
      //|                            |
      //+------------------------------------------------------------------+
      bool ArraysPreparing(void)
        {
         if(InpSymbols=="" || InpSymbols==NULL)
           {
            ArrayResize(array_symbols,1);
            array_symbols[0]=Symbol();
           }
         else
           {
            string value=","+InpSymbols;
            int total=StringSplit(InpSymbols,StringGetCharacter(value,0),array_symbols);
            ResetLastError();
            if(total<=0)
              {
               string end=(total==0 ? "Symbols string is empty." : "Error: "+(string)GetLastError());
               Print("Failed to get the array of symbols. ",end);
               return false;
              }
            for(int i=0;i<total;i++)
               SymbolCheck(array_symbols[i]);
           }
         int total=ArraySize(array_symbols);
         list_symbols.Clear();
         for(int i=0;i<total;i++)
           {
            if(!IsPresentSymbol(array_symbols[i]))
               if(SymbolCheck(array_symbols[i]))
                  list_symbols.Add(array_symbols[i]);
           }
         if(list_symbols.Total()==0)
           {
            Print("There is no valid symbol in the list. The ",Symbol()," will be used.");
            list_symbols.Add(Symbol());
           }
         //---
         list_timeframes.Clear();
         for(int i=0;i<21;i++)
           {
            int tf=GetInputTimeframe(i);
            if(tf==WRONG_VALUE)
               continue;
            list_timeframes.Add((int)tf);
           }
         if(list_timeframes.Total()==0)
            list_timeframes.Add(Period());
         return true;
        }
      //+------------------------------------------------------------------+
      //|                 |
      //+------------------------------------------------------------------+
      int GetInputTimeframe(const int index)
        {
         switch(index)
           {
            case 0   :
               return (InpUseM1   ? PERIOD_M1    : WRONG_VALUE);
            case 1   :
               return (InpUseM2   ? PERIOD_M2    : WRONG_VALUE);
            case 2   :
               return (InpUseM3   ? PERIOD_M3    : WRONG_VALUE);
            case 3   :
               return (InpUseM4   ? PERIOD_M4    : WRONG_VALUE);
            case 4   :
               return (InpUseM5   ? PERIOD_M5    : WRONG_VALUE);
            case 5   :
               return (InpUseM6   ? PERIOD_M6    : WRONG_VALUE);
            case 6   :
               return (InpUseM10  ? PERIOD_M10   : WRONG_VALUE);
            case 7   :
               return (InpUseM12  ? PERIOD_M12   : WRONG_VALUE);
            case 8   :
               return (InpUseM15  ? PERIOD_M15   : WRONG_VALUE);
            case 9   :
               return (InpUseM20  ? PERIOD_M20   : WRONG_VALUE);
            case 10  :
               return (InpUseM30  ? PERIOD_M30   : WRONG_VALUE);
            case 11  :
               return (InpUseH1   ? PERIOD_H1    : WRONG_VALUE);
            case 12  :
               return (InpUseH2   ? PERIOD_H2    : WRONG_VALUE);
            case 13  :
               return (InpUseH3   ? PERIOD_H3    : WRONG_VALUE);
            case 14  :
               return (InpUseH4   ? PERIOD_H4    : WRONG_VALUE);
            case 15  :
               return (InpUseH6   ? PERIOD_H6    : WRONG_VALUE);
            case 16  :
               return (InpUseH8   ? PERIOD_H8    : WRONG_VALUE);
            case 17  :
               return (InpUseH12  ? PERIOD_H12   : WRONG_VALUE);
            case 18  :
               return (InpUseD1   ? PERIOD_D1    : WRONG_VALUE);
            case 19  :
               return (InpUseW1   ? PERIOD_W1    : WRONG_VALUE);
            default  :
               return (InpUseMN1  ? PERIOD_MN1   : WRONG_VALUE);
           }









        }
      //+------------------------------------------------------------------+
 

there's a lot more than 2 errors, once you fix the unbalanced parenthesis, you'll see about 100 errors

ChatGPT prompts?

you are missing a whole bunch of libraries that the code uses, and you don't have the #includes at the top
 

Hi

As was said above- this code has a lot of errors you need to add end of brackets „}” after each function (OnCalculate,OnChartEvent etc. But you use a lot of libraries which are not included in the code. You need to add something like this at the top of your code:

#include <Canvas\Canvas.mqh>

#include <Trade\SymbolInfo.mqh>

I don’t know others of the libraries you used here – try find them on your own and fix your code and then we might be able to help you.

Best Regards