Nr. of optimization pass

 

Hello,

I export the balance during optimization:

if(   IsOptimization()  == true
   && AccountBalance()  != AccountBalance_old
  )
   {
     AccountBalance_old = AccountBalance();
     int handle = FileOpen("Optimization Balance.csv",FILE_WRITE|FILE_READ|FILE_CSV);
     FileWrite(handle,"Balance"); 
     FileSeek(handle, 0, SEEK_END);
     FileWrite(handle,AccountBalance());
     FileClose(handle);
   }

Is there a way to identify the number of the current optimization pass?

FileWrite(handle,"Number","Balance"); 
FileSeek(handle, 0, SEEK_END);
FileWrite(handle,number,AccountBalance());


I am using an old build 401.

Thanks!

 
APeng:

I am using an old build 401.


How do you do that? Would be very interesting!!


Gooly

 
gooly:

How do you do that? Would be very interesting!!


Gooly


I use it offline. So no updates are made. For backtesting.
 
void export_optimization()
{
  if(   iVolume(Symbol(),Period(),0) == 1
     && Time[0]                      == time_start
    )
     {
      int handle = FileOpen("Optimization .csv",FILE_WRITE|FILE_READ|FILE_CSV);
      FileSeek(handle, 0, SEEK_END);
      FileWrite(handle,"New pass");
      FileClose(handle);       
     }      
 
  if(   IsOptimization() == true
     && AccountBalance() != AccountBalance_old
    )
     {
       AccountBalance_old = AccountBalance();
       handle = FileOpen("Optimization .csv",FILE_WRITE|FILE_READ|FILE_CSV);
       FileSeek(handle, 0, SEEK_END);
       FileWrite(handle,AccountBalance());
       FileClose(handle);
     }
}
Now every new pass "New pass" is inserted as a title for the next balance row. Not what I really wanted but it makes able that a makro in excel can seperate between different backtesting passes.
 

See my multipass code mt4 strategy tester - BATCH MODE - MQL4 forum It needs to be updated for 600+ (dots in var names and OutputDebugStringA)

 
WHRoeder:

See my multipass code mt4 strategy tester - BATCH MODE - MQL4 forum It needs to be updated for 600+ (dots in var names and OutputDebugStringA)




thanks!
Reason: