BacktestingCompletedEventArgs.JsonReport
property · BacktestingCompletedEventArgs · cAlgo.API
DesktopCLICloud
Gets the JSON report of the backtesting results.
Environment behaviour
CLI — not supported. Available to plugins only, and plugins cannot run in the CLI.
Cloud — not supported. Available to plugins only, and plugins cannot run in the cloud.
Definition
public string JsonReport {get;}
backtestingCompletedEventArgs.JsonReport: str
Returns string
Examples
protected override void OnStart()
{
Backtesting.Completed += OnBacktestingCompleted;
}
private void OnBacktestingCompleted(BacktestingCompletedEventArgs args)
{
if (args.JsonReport != null)
Print("JSON report: {0}", args.JsonReport);
}
def on_start(self):
api.Backtesting.Completed += self.on_backtesting_completed
def on_backtesting_completed(self, args):
if args.JsonReport is not None:
api.Print(f"JSON report: {args.JsonReport}")