evaluate (PERFORMANCE* perf )

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.

Remarks:

Examples:

function evaluate(PERFORMANCE* perf)
{
  printf("\nR2 = %.2f Mean = %.3f",perf->vR2,perf->vMean);
}
// 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