You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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