Eror in Load() function of CChart class

 

Dear MQL5 Team!

Seems there is a mistake in implementation of Load  function of CChart class. bool CChart::Load(int file_handle)  (file chart.mql)

 In place where  Symbol name and period of chart suppose to be loading,  information about the period is not read from the file:

   work_int=FileReadInteger(file_handle);
   if(work_int!=0) work_str=FileReadString(file_handle,work_int);
   else            work_str="";
   work_int=FileReadInteger(file_handle);         //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!GmA
   SetSymbolPeriod(work_str,(ENUM_TIMEFRAMES)work_int);
//--- reading chart period
   work_int=FileReadInteger(file_handle); ////!!!!!!!!!!!!!!!!!!!!!!!!

I think line work_int=FileReadInteger(file_handle); marked by red  should  be inserted above line  SetSymbolPeriod(work_str,(ENUM_TIMEFRAMES)work_int);  as it uploading period used in that function

Additionally variable resutl have toi be initialised with value "true"


Could you please check  

Documentation on MQL5: Standard Constants, Enumerations and Structures / Chart Constants / Chart Timeframes
  • www.mql5.com
Standard Constants, Enumerations and Structures / Chart Constants / Chart Timeframes - Documentation on MQL5
Reason: