NumTotalCycles

Repeat the complete simulation - including training and testing - as often as set up with this variable (default = 0 = no repetitions). This is normally used for plotting histograms, doing special Montecarlo simulations or evaluating result statistics dependent on changed parameters or randomized price curves.

TotalCycle

The number of the cycle from 1 to NumTotalCycles. Read/only, automatically set by NumTotalCycles.

LogNumber

When nonzero, appends the given number to the files generated by the simulation. By setting LogNumber = TotalCycle, different log files are stored for any cycle.

Type:

int

Remarks:

Example:

function run()
{
  BarPeriod = 1440;
  StartDate = 2015;
  NumYears = 1;
  LookBack = 0;
 
// run this simulation 3000 times  
  NumTotalCycles = 3000;
 
// some random trading strategy
  if(random() > 0)
    enterLong();
  else 
    enterShort();
 
// plot the result of every run in a bar graph  
  if(is(EXITRUN)) {
    int Step = 250;
    int Result = floor(ProfitClosed/PIPCost/Step);
    plotBar("Profit",Result,Step*Result,1,SUM+BARS+LBL2,RED);  
  } 
}

See also:

NumSampleCycles, NumWFOCycles

 

► latest version online