Skip to content

BacktestingProcess.IsCompleted

property · BacktestingProcess · cAlgo.API

DesktopCLICloud

Gets a value indicating whether the backtesting process is completed.

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

bool IsCompleted {get;}
backtestingProcess.IsCompleted: bool

Returns bool

Examples

if (AlgoRegistry.Get("Sample Trend cBot", AlgoKind.Robot) is not RobotType robotType)
    return;
var settings = new BacktestingSettings { StartTimeUtc = new DateTime(2025, 1, 1), EndTimeUtc = new DateTime(2025, 2, 1), Balance = 10000 };
var process = Backtesting.Start(robotType, "EURUSD", TimeFrame.Hour, settings);
if (process.IsCompleted)
    Print("Backtesting already completed with error {0}", process.BacktestingError);
from System import DateTime
algoType = api.AlgoRegistry.Get("Sample Trend cBot", AlgoKind.Robot)
if algoType is None:
    return
settings = BacktestingSettings()
settings.StartTimeUtc = DateTime(2025, 1, 1)
settings.EndTimeUtc = DateTime(2025, 2, 1)
settings.Balance = 10000
process = api.Backtesting.Start(RobotType(algoType), "EURUSD", TimeFrame.Hour, settings)
if process.IsCompleted:
    api.Print(f"Backtesting already completed with error {process.BacktestingError}")