//+------------------------------------------------------------------+ //| ArrayDoubleSample.mq5 | //| Copyright 2000-2025, MetaQuotes Ltd. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2000-2025, MetaQuotes Ltd." #property link "https://www.mql5.com" //--- #include #include //--- const int ExtArraySize=10000; const int ExtArrayAdd=100; string ExtFileName="ArrayDoubleSample.bin"; //+------------------------------------------------------------------+ //| Example class CArrayDouble | //+------------------------------------------------------------------+ int OnStart(void) { int i,pos; double key; CFileBin File; CArrayDouble ArrayDouble; //--- printf("Start sample %s.",__FILE__); //--- fill an array of background information //--- open file for reading if(File.Open(ExtFileName,FILE_READ)!=INVALID_HANDLE) { //--- read array from file if(!ArrayDouble.Load(File.Handle())) { //--- error reading from file printf("%s (%4d): error %d",__FILE__,__LINE__,GetLastError()); } //--- do not forget close file File.Close(); } //--- check whether enough information in the array if(ArrayDouble.Total()