MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal

Automated Trading Language Documentation

Linear Sinus FT Indicator
Linear Sinus FT
Author: GODZILLA
Subscribe to signal
NET AGGRESSIVE
124.49%, 161 674.05 USD
ProfessorFx PlatinumProfessorFx Platinum Try product
ProfessorFx Platinum
Author: achidayat
Custom Graphical Controls. Part 2. Control Library Custom Graphical Controls. Part 2. Control Library Screenshot
USDJPY, M15
Demo

Save

Saves data in the file list.

virtual bool  Save(
   int  file_handle      // File handle
   )

Parameters

file_handle

[in] handle of the previously opened using the function FileOpen (...) file.

Return Value

true - if successfully completed, false - if an error.

Example:

//--- example for CList::Save(int) 
#include <Arrays\List.mqh> 
//--- 
void OnStart() 
  { 
   int    file_handle; 
   CList *list=new CList; 
   //--- 
   if(list!=NULL
     { 
      printf("Object create error"); 
      return
     } 
   //--- add lists elements 
   //--- . . . 
   //--- open file 
   file_handle=FileOpen("MyFile.bin",FILE_WRITE|FILE_BIN|FILE_ANSI); 
   if(file_handle>=0) 
     { 
      if(!list.Save(file_handle)) 
        { 
         //--- file save error 
         printf("File save: Error %d!",GetLastError()); 
         delete list; 
         FileClose(file_handle); 
         //--- 
         return
        } 
      FileClose(file_handle); 
     } 
   //--- delete list 
   delete list; 
  } 


Updated: 2010.02.09