Skip to content

BacktestingDataRequest.DataType

property · BacktestingDataRequest · cAlgo.API Since 5.3

DesktopCLICloud

Gets request data type.

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

BacktestingDataSourceDataType DataType {get;}
backtestingDataRequest.DataType: BacktestingDataSourceDataType

Returns BacktestingDataSourceDataType

Examples

private void OnDataRequested(BacktestingDataRequest request)
{
    if (request.DataType == BacktestingDataSourceDataType.Tick)
        Print("Tick data requested");
    else
        Print("Bar data requested: {0}", request.DataType);
}
def on_data_requested(self, request):
    if request.DataType == BacktestingDataSourceDataType.Tick:
        api.Print("Tick data requested")
    else:
        api.Print(f"Bar data requested: {request.DataType}")