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.
perf - optional pointer to a PERFORMANCE struct containing the result of the test; defined in include\trading.h.
- All statistics parameters are also available for evaluation. The ...Long/...Short statistics parameters are for the last selected asset.
- The print(TO_REPORT, ...) function can be used for printing user-specific data to the performance report.
- In [Train] mode the objective function is called at the end of every simulation. The evaluate function is called only in the test run after training when the TESTNOW flag is set.
function evaluate(PERFORMANCE* perf)
printf("\nR2 = %.2f Mean = %.3f",perf->vR2,perf->vMean);
// plot a parameter histogram in [Test] mode - profit vs. BarZone
NumTotalCycles = 12;
BarZone = 2*TotalCycle;
PlotScale = 10;
Performance, trade statistics, user supplied functions