Skip to content

BacktestingProgressChangedEventArgs.Process

property · BacktestingProgressChangedEventArgs · cAlgo.API

DesktopCLICloud

Gets the backtesting process that reported progress.

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 BacktestingProcess Process {get;}
backtestingProgressChangedEventArgs.Process: BacktestingProcess

Returns BacktestingProcess

Examples

protected override void OnStart()
{
    Backtesting.ProgressChanged += OnBacktestingProgressChanged;
}

private void OnBacktestingProgressChanged(BacktestingProgressChangedEventArgs args)
{
    if (args.Progress > 50 && !args.Process.IsCompleted)
        Print("Backtesting is more than half done");
}
def on_start(self):
    api.Backtesting.ProgressChanged += self.on_backtesting_progress_changed

def on_backtesting_progress_changed(self, args):
    if args.Progress > 50 and not args.Process.IsCompleted:
        api.Print("Backtesting is more than half done")