BacktestingDataSourceMinMaxTimeArgs
class cAlgo.API Since 5.3
DesktopCLICloud
Provides data for the backtesting data source min / max time handler.
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 class BacktestingDataSourceMinMaxTimeArgs
Namespace: cAlgo.API · Group: DataSource
Examples
private BacktestingMinMaxTime OnMinMaxTimeRequested(BacktestingDataSourceMinMaxTimeArgs args)
{
Print("Min/max time requested for {0} {1}, data type {2}", args.PriceDataSourceId.Symbol.Name, args.PriceDataSourceId.TimeFrame, args.DataType);
return new BacktestingMinMaxTime(Server.Time.AddYears(-1), Server.Time);
}
def on_min_max_time_requested(self, args):
api.Print(f"Min/max time requested for {args.PriceDataSourceId.Symbol.Name} {args.PriceDataSourceId.TimeFrame}, data type {args.DataType}")
return BacktestingMinMaxTime(api.Server.Time.AddYears(-1), api.Server.Time)
Properties
| Name | Description |
|---|---|
DataTypeDesktopCLICloudBacktestingDataSourceDataType | Gets data type for the min / max time request. |
PriceDataSourceIdDesktopCLICloudPriceDataSourceId | Gets price data source Id for the min / max time request. |