'Input' - declaration without type

 
//+------------------------------------------------------------------+
//| Class for the output of the optimization results                 |
//+------------------------------------------------------------------+
class FrameAnnealingMethod
  {
private:
   CSimpleTable      t_value;
   CSimpleTable      t_inputs;
   CSimpleTable      t_stat;
   CBmpButton        b_playbutton;
   CBmpButton        b_backbutton;
   CBmpButton        b_forwardbutton;
   CBmpButton        b_stopbutton;
   CLabel            l_speed;
   CLabel            l_stat;
   CLabel            l_value;
   CLabel            l_opt_value;
   CLabel            l_temp;
   CLabel            l_text;
   CLabel            n_frame;
   CEdit             e_speed;
   long              frame_counter;

public:
   //--- constructor/destructor
                     FrameAnnealingMethod();
                    ~FrameAnnealingMethod();
   //--- Events of the strategy tester
   void              FrameTester(double F,double Fbest,Input &Mass[],int num,int it);
   void              FrameInit(string &SMass[]);
   void              FrameTesterPass(int cr);
   void              FrameDeinit(void);
   void              FrameOnChartEvent(const int id,const long &lparam,const double &dparam,const string &sparam,int cr);
   uint              FrameToFile(int count);
  };
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
FrameAnnealingMethod::FrameAnnealingMethod()
  {
   frame_counter=0;
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
FrameAnnealingMethod::~FrameAnnealingMethod()
  {
  }
//+------------------------------------------------------------------+
//|  Should be called in the OnTesterInit() handler                  | 
//+------------------------------------------------------------------+
void FrameAnnealingMethod::FrameInit(string &SMass[])
  {
   int i=0;
// create buttons
   b_backbutton.Create(0,"Back",0,0,20,0,0);
   b_backbutton.BmpOnName("\\Images\\AnnealingMethod\\back.bmp");
   b_backbutton.BmpOffName("\\Images\\AnnealingMethod\\back.bmp");
   b_playbutton.Create(0,"Play",0,38,20,0,0);
   b_playbutton.BmpOnName("\\Images\\AnnealingMethod\\pause.bmp");
   b_playbutton.BmpOffName("\\Images\\AnnealingMethod\\play.bmp");
   b_stopbutton.Create(0,"Stop",0,76,20,0,0);
   b_stopbutton.BmpOnName("\\Images\\AnnealingMethod\\stop.bmp");
   b_stopbutton.BmpOffName("\\Images\\AnnealingMethod\\stop.bmp");
   b_forwardbutton.Create(0,"Forward",0,114,20,0,0);
   b_forwardbutton.BmpOnName("\\Images\\AnnealingMethod\\forward.bmp");
   b_forwardbutton.BmpOffName("\\Images\\AnnealingMethod\\forward.bmp");
// create a label for speed
   l_speed.Create(0,"Speed",0,157,20,0,0);
   l_speed.Width(80);
   l_speed.Height(19);
   l_speed.Text("SPEED,ms");
   l_speed.Color(clrGreen);
   l_speed.FontSize(12);
   l_speed.Font("Arial");
// create the edit box for speed
   e_speed.Create(0,"ValueSpeed",0,238,20,0,0);
   e_speed.Width(60);
   e_speed.Height(19);
   e_speed.Color(clrGreen);
   e_speed.Font("Arial");
   e_speed.Text("100");
// create a label to output information on the operation of the algorithm
   l_text.Create(0,"Information",0,157,39,0,0);
   l_text.Width(286);
   l_text.Height(38);
   l_text.Text("Optimization is performed, please wait");
   l_text.Color(clrRed);
// create a label with the frame number   
   n_frame.Create(0,"FrameNumber",0,299,20,0,0);
   n_frame.Width(60);
   n_frame.Height(19);
   n_frame.Color(clrGreen);
   n_frame.Font("Arial");
   n_frame.FontSize(12);
   n_frame.Text("Preparation...");
// create a header for the statistics table
   l_stat.Create(0,"Statistics",0,0,58,0,0);
   l_stat.Width(160);
   l_stat.Height(20);
   l_stat.ColorBackground(clrWhite);
   l_stat.ColorBorder(clrGray);
   l_stat.Color(clrGreen);
   l_stat.Font("Arial");
   l_stat.FontSize(12);
   l_stat.Text("  TRADING RESULTS");
// create a header for the column of values of optimized parameters
   l_value.Create(0,"Value",0,160,58,0,0);
   l_value.Width(160);
   l_value.Height(20);
   l_value.ColorBackground(clrWhite);
   l_value.ColorBorder(clrGray);
   l_value.Color(clrGreen);
   l_value.Text("       PARAMETERS");
   l_value.Font("Arial");
   l_value.FontSize(12);
// create a header for the temperature values
   l_temp.Create(0,"Tepmerature",0,380,58,0,0);
   l_temp.Width(60);
   l_temp.Height(20);
   l_temp.ColorBackground(clrWhite);
   l_temp.ColorBorder(clrGray);
   l_temp.Color(clrGreen);
   l_temp.Text("  TEMP");
   l_temp.Font("Arial");
   l_temp.FontSize(12);
// create a header for the column of the best values of optimized parameters
   l_opt_value.Create(0,"BestValue",0,320,58,0,0);
   l_opt_value.Width(160);
   l_opt_value.Height(20);
   l_opt_value.ColorBackground(clrWhite);
   l_opt_value.ColorBorder(clrGray);
   l_opt_value.Color(clrGreen);
   l_opt_value.Text("  BEST");
   l_opt_value.Font("Arial");
   l_opt_value.FontSize(12);
// create a table of statistics
   t_stat.Create("StatisticsTable",0,78,100,60,20);
   t_stat.BackColor(clrWhite);
   t_stat.BorderColor(clrGray);
   t_stat.TextColor(clrBlack);
   t_stat.AddRow("Profit"," - ");
   t_stat.AddRow("Profit Factor"," - ");
   t_stat.AddRow("Factor Recovery"," - ");
   t_stat.AddRow("Sharp ratio"," - ");
   t_stat.AddRow("Trades"," - ");
   t_stat.AddRow("Deals "," - ");
   t_stat.AddRow("Equity DD,%"," - ");
   t_stat.AddRow("F"," - ");
   t_stat.AddRow("Fopt"," - ");
// create a table of values of optimized parameters
   t_inputs.Create("InputTable",160,78,100,60,20);
   t_inputs.BackColor(clrWhite);
   t_inputs.BorderColor(clrGray);
   t_inputs.TextColor(clrBlack);
   for(i=0;i<ArraySize(SMass);i++)
      if(SMass[i]!="")
         t_inputs.AddRow(SMass[i]," - ");
// create a table of temperature values and the best values of optimized parameters
   t_value.Create("ValueTable",320,78,60,60,20);
   t_value.BackColor(clrWhite);
   t_value.BorderColor(clrGray);
   t_value.TextColor(clrBlack);
   for(i=0;i<ArraySize(SMass);i++)
      if(SMass[i]!="")
         t_value.AddRow(" - "," - ");
// update the current symbol chart
   ChartRedraw();
  }

 
//+------------------------------------------------------------------+
//|  Should be called in the OnTesterDeinit() handler                | 
//+------------------------------------------------------------------+
void FrameAnnealingMethod::FrameDeinit(void)
  {
//--- change the text and color of the text label 
   l_text.Color(clrGreen);
   l_text.Text("Optimization complete. Press 'Play' button for repeat play");
   ChartRedraw();
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void FrameAnnealingMethod::FrameTester(double F,double Fbest,Input &Mass[],int num,int it)
  {
   int i=0,j=0;
   int size=ArraySize(Mass);
   double FrameMass[];// array to be passes to a frame
   ArrayResize(FrameMass,9+3*size);
// fill the statistics
   FrameMass[0]=TesterStatistics(STAT_PROFIT);                // Total Net Profit
   FrameMass[1]=TesterStatistics(STAT_PROFIT_FACTOR);         // Profit Factor
   FrameMass[2]=TesterStatistics(STAT_RECOVERY_FACTOR);       // Recovery Factor
   FrameMass[3]=TesterStatistics(STAT_SHARPE_RATIO);       // Sharpe Ratio
   FrameMass[4]=TesterStatistics(STAT_TRADES);                // Number of trades
   FrameMass[5]=TesterStatistics(STAT_DEALS);                 // Number of deals
   FrameMass[6]=TesterStatistics(STAT_EQUITY_DDREL_PERCENT);  // the maximum equity drawdown as a percentage
   FrameMass[7]=F;// the current value of the custom optimization criterion
   FrameMass[8]=Fbest;// the best value of the custom optimization criterion
                      // fill the array of values of optimized parameters
   for(i=9;i<9+3*size;i=i+3)
     {
      FrameMass[i]=Mass[j].Value;
      FrameMass[i+1]=Mass[j].BestValue;
      FrameMass[i+2]=Mass[j].Temp;
      j++;
     }
//--- Create a data frame and send it to the terminal
   if(!FrameAdd(MQL5InfoString(MQL5_PROGRAM_NAME),num,it,FrameMass))
      Print("Frame add error: ",GetLastError());
   else
      Print("Frame added, Ok");
//---
  }
//+------------------------------------------------------------------+
//|  Receives frame with data during optimization and displays chart |
//+------------------------------------------------------------------+
void FrameAnnealingMethod::FrameTesterPass(int cr)
  {
//--- Variables for working with frames
   int i=0,j=0;
   double FrameOut[];
   string  name;
   ulong   pass;
   long    id;
   double  value;
   int size=0;
//  string params[];
//  uint par_count;
   while(FrameNext(pass,name,id,value,FrameOut))
     {
      if(id==-1)
        {
         l_text.Color(clrRed);
         l_text.Text("The temperature reached a minimum value. Please click the STOP button in Strategy Tester");
         // l_text.Text("The temperature reached a minimum value");
        }
      else
        {
         j=0;
         n_frame.Text(StringFormat("Number of pass: %d",id));
         size=(ArraySize(FrameOut)-9)/3;// calculate the number of optimized parameters
                                        // update the table of statistics
         t_stat.SetValue(1,0,StringFormat("%.2f",FrameOut[0]));
         t_stat.SetValue(1,1,StringFormat("%.2f",FrameOut[1]));
         t_stat.SetValue(1,2,StringFormat("%.2f",FrameOut[2]));
         t_stat.SetValue(1,3,StringFormat("%.2f",FrameOut[3]));
         t_stat.SetValue(1,4,StringFormat("%G",FrameOut[4]));
         t_stat.SetValue(1,5,StringFormat("%G",FrameOut[5]));
         t_stat.SetValue(1,6,StringFormat("%.2f",FrameOut[6]));
         t_stat.SetValue(1,7,StringFormat("%.2f",FrameOut[7]));
         if(t_stat.GetValue(1,8)==StringFormat("%s"," - "))
           {
            t_stat.SetValue(1,8,StringFormat("%.2f",FrameOut[8]));
            for(i=9;i<9+size*3;i=i+3)
              {
               t_value.SetValue(0,j,StringFormat("%.2f",FrameOut[i+1]));
               j++;
              }
           }
         else
           {

            j=0;
            if((cr!=5) && (cr!=6) && (cr!=11) && (cr!=12))// it is necessary to maximize the objective function
              {
               if(FrameOut[8]>=StringToDouble(t_stat.GetValue(1,8)))
                 {
                  t_stat.SetValue(1,8,StringFormat("%.2f",FrameOut[8]));
                  for(i=9;i<9+size*3;i=i+3)
                    {
                     t_value.SetValue(0,j,StringFormat("%.2f",FrameOut[i+1]));
                     j++;
                    }
                 }
              }
            else
              {
               if(FrameOut[8]<=StringToDouble(t_stat.GetValue(1,8)))
                 {
                  t_stat.SetValue(1,8,StringFormat("%.2f",FrameOut[8]));
                  for(i=9;i<9+size*3;i=i+3)
                    {
                     t_value.SetValue(0,j,StringFormat("%.2f",FrameOut[i+1]));
                     j++;
                    }
                 }
              }
           }
         j=0;
         // fill the table of optimized parameters
         for(i=9;i<9+size*3;i=i+3)
           {
            t_inputs.SetValue(1,j,StringFormat("%.2f",FrameOut[i]));
            t_value.SetValue(1,j,StringFormat("%.2f",FrameOut[i+2]));
            j++;
           }
        }
      ChartRedraw();
     }//end while
  }
//+------------------------------------------------------------------+
//|  Chart events handling                                           |
//+------------------------------------------------------------------+
void FrameAnnealingMethod::FrameOnChartEvent(const int id,const long &lparam,
                                             const double &dparam,const string &sparam,int cr)
  {
   long speed=0;
   string  name;
   ulong   pass;
   long    frameid;
   double  value;
   int size=0;
   int i=0,j=0;
   double FrameOut[];
//   if(!PlayFrame) return;
//--- If this is an event of a mouse click on a graphical object
   if(id==CHARTEVENT_OBJECT_CLICK)
     {
      //--- If the event of our object is received
      if(sparam==b_playbutton.Name())
        {
         if(frame_counter==0)
           {
            t_stat.SetValue(1,8,StringFormat("%s"," - "));
            FrameFirst();
           }
         while(ObjectGetInteger(0,sparam,OBJPROP_STATE)==1)
           {
            if(FrameNext(pass,name,frameid,value,FrameOut))
              {
               if(frameid!=-1)
                 {
                  j=0;
                  size=(ArraySize(FrameOut)-9)/3;// calculate the number of optimized parameters
                  t_stat.SetValue(1,0,StringFormat("%.2f",FrameOut[0]));
                  t_stat.SetValue(1,1,StringFormat("%.2f",FrameOut[1]));
                  t_stat.SetValue(1,2,StringFormat("%.2f",FrameOut[2]));
                  t_stat.SetValue(1,3,StringFormat("%.2f",FrameOut[3]));
                  t_stat.SetValue(1,4,StringFormat("%G",FrameOut[4]));
                  t_stat.SetValue(1,5,StringFormat("%G",FrameOut[5]));
                  t_stat.SetValue(1,6,StringFormat("%.2f",FrameOut[6]));
                  t_stat.SetValue(1,7,StringFormat("%.2f",FrameOut[7]));
                  if(t_stat.GetValue(1,8)==StringFormat("%s"," - "))
                    {
                     t_stat.SetValue(1,8,StringFormat("%.2f",FrameOut[8]));
                     for(i=9;i<9+size*3;i=i+3)
                       {
                        t_value.SetValue(0,j,StringFormat("%.2f",FrameOut[i+1]));
                        j++;
                       }
                    }
                  else
                    {
                     j=0;
                     if((cr!=5) && (cr!=6) && (cr!=11) && (cr!=12))// it is necessary to maximize the objective function
                       {
                        if(FrameOut[8]>=StringToDouble(t_stat.GetValue(1,8)))
                          {
                           t_stat.SetValue(1,8,StringFormat("%.2f",FrameOut[8]));
                           for(i=9;i<9+size*3;i=i+3)
                             {
                              t_value.SetValue(0,j,StringFormat("%.2f",FrameOut[i+1]));
                              j++;
                             }
                          }
                       }
                     else
                       {
                        if(FrameOut[8]<=StringToDouble(t_stat.GetValue(1,8)))
                          {
                           t_stat.SetValue(1,8,StringFormat("%.2f",FrameOut[8]));
                           for(i=9;i<9+size*3;i=i+3)
                             {
                              t_value.SetValue(0,j,StringFormat("%.2f",FrameOut[i+1]));
                              j++;
                             }
                          }
                       }
                    }
                  j=0;
                  // fill the table of optimized parameters
                  for(i=9;i<9+size*3;i=i+3)
                    {
                     t_inputs.SetValue(1,j,StringFormat("%.2f",FrameOut[i]));
                     t_value.SetValue(1,j,StringFormat("%.2f",FrameOut[i+2]));
                     j++;
                    }
                  frame_counter++;
                  //--- Update the text in the chart header
                  l_text.Text(StringFormat("Play with pause %d ms: frame %d",StringToInteger(e_speed.Text()),frame_counter));
                  n_frame.Text(StringFormat("Number of pass: %d",frameid));
                  ChartRedraw();
                  Sleep((int)StringToInteger(e_speed.Text()));
                 }
              }
            else
              {
               frame_counter=0;
               ObjectSetInteger(0,sparam,OBJPROP_STATE,false);
               l_text.Text("Press 'Play' button for repeat play");
               ChartRedraw();
              }
           }
        }
      if(sparam==b_backbutton.Name())
        {
         ObjectSetInteger(0,sparam,OBJPROP_STATE,false);
         speed=StringToInteger(e_speed.Text());
         if(speed>0)
           {
            speed=speed-100;
            e_speed.Text(IntegerToString(speed));
            ChartRedraw();
           }
        }
      if(sparam==b_forwardbutton.Name())
        {
         ObjectSetInteger(0,sparam,OBJPROP_STATE,false);
         speed=StringToInteger(e_speed.Text());
         speed=speed+100;
         e_speed.Text(IntegerToString(speed));
         ChartRedraw();
        }
      if(sparam==b_stopbutton.Name())
        {
         ObjectSetInteger(0,sparam,OBJPROP_STATE,false);
         l_text.Text("Press 'Play' button for repeat play");
         frame_counter=0;
         ChartRedraw();
        }
     }

  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
uint FrameAnnealingMethod::FrameToFile(int count)
  {
   ResetLastError();
   int i=0;
   string strF;
   double FrameOut[];
   string  name;
   ulong   pass;
   long    id;
   double  value;
   FrameFirst();
   int file_handle=FileOpen("output.txt",FILE_WRITE|FILE_TXT|FILE_COMMON);
   if(file_handle!=INVALID_HANDLE)
     {
      strF="Number of iteration\tPass in agent\tF\tFbest\t";
      for(i=0;i<count;i++)
         strF=strF+"Value"+IntegerToString(i+1)+"\t"+"BestValue"+IntegerToString(i+1)+"\t"+"Temp"+IntegerToString(i+1)+"\t";
      FileWrite(file_handle,strF);// write the file title
      strF="";
      while(FrameNext(pass,name,id,value,FrameOut))
        {
         if(id!=-1)
           {
            StringConcatenate(strF,id,"\t",value,"\t",FrameOut[7],"\t",FrameOut[8],"\t");
            for(i=9;i<ArraySize(FrameOut);i++)
               strF=strF+DoubleToString(FrameOut[i],3)+"\t";
            FileWrite(file_handle,strF);
           }
        }
     }
   else
      return GetLastError();
   FileClose(file_handle);
   return 0;
  }
//+------------------------------------------------------------------+
 

felipe ramos:

   void              FrameTester(double F,double Fbest,Input &Mass[],int num,int it);



Se for essa linha, INPUT é palavra reservada, não pode ser usada dessa forma.

Se "Input" é uma classe ela deveria ter sido declarada em algum ponto do seu código.

 

Eu consegui resolver alterando a classe AnnealingMethod, no arquivo AnnealingMethod.mqh.

Lá tem um struct "Input". Ao baixar o arquivo do artigo, o struct estava dentro da classe, no trecho "public".
Eu apenas movi o struct para fora da classe e funcionou.