evaluate ()

User-supplied function that is called at the end of a [Test] run, or when [Result] is clicked, or in [Trade] mode when the status page is updated. Can be used for analyzing the performance or storing it for further evaluation in a user specified way.

Parameters:

perf - optional pointer to a PERFORMANCE struct containing the result of the test; defined in include\trading.h.

cleanup ()

User-supplied function that is called at the end of a simulation or session. Can be used to copy files, free memory, or release other allocated resources.

Remarks:

Examples:

function evaluate()
{
  printf("\nR2 = %.2f Mean = %.3f",ReturnR2,ReturnMean);
}
// plot a parameter histogram in [Test] mode - profit vs. BarZone
function run()
{
  ...
  NumTotalCycles = 12;
  BarZone = 2*TotalCycle;
  ...
}

void evaluate()
{
  PlotScale = 10;
  plotBar("Objective",TotalCycle,BarZone,Balance,BARS,RED);	
}

See also:

Performance, trade statistics, user supplied functions

► latest version online