I want to let a strategy write some data to a file
at the end of a backtest during an optimization procedure (such as profit factor, number of trades, by accessing the performance tab / tradelist object.)
.
For this I thought to use protected override void OnTermination()
since it's called every time one of the backtests is completed.
It seems like the method's use is limited to certain actions.
For example, it seems not to be possible to
declare variables within the method. The following snippet causes errors:
protected override void OnTermination()
{
private string header = "";
Print("header");
}
end of every backtest?
Thanks in advance, Stephan

Comment