BacktestingDataSourceMinMaxTimeArgs.DataType
property · BacktestingDataSourceMinMaxTimeArgs · cAlgo.API Since 5.3
DesktopCLICloud
Gets data type for the min / max time request.
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 BacktestingDataSourceDataType DataType {get;}
backtestingDataSourceMinMaxTimeArgs.DataType: BacktestingDataSourceDataType
Returns BacktestingDataSourceDataType
Examples
private BacktestingMinMaxTime OnMinMaxTimeRequested(BacktestingDataSourceMinMaxTimeArgs args)
{
var days = args.DataType == BacktestingDataSourceDataType.Tick ? 30 : 365;
return new BacktestingMinMaxTime(Server.Time.AddDays(-days), Server.Time);
}
def on_min_max_time_requested(self, args):
days = 30 if args.DataType == BacktestingDataSourceDataType.Tick else 365
return BacktestingMinMaxTime(api.Server.Time.AddDays(-days), api.Server.Time)