---
id: "T:cAlgo.API.BacktestingDataSourceMinMaxTimeArgs"
kind: "class"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceMinMaxTimeArgs/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# BacktestingDataSourceMinMaxTimeArgs (class)

Provides data for the backtesting data source min / max time handler.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Available to plugins only, and plugins cannot run in the CLI.
- Cloud: Available to plugins only, and plugins cannot run in the cloud.

## Definition

```csharp
public class BacktestingDataSourceMinMaxTimeArgs
```

Available since cAlgo.API 5.3.

## Examples

C#:

```csharp
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);
}
```

Python:

```python
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

- `public BacktestingDataSourceDataType DataType {get;}` — Gets data type for the min / max time request. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceMinMaxTimeArgs/DataType/index.md)
- `public PriceDataSourceId PriceDataSourceId {get;}` — Gets price data source Id for the min / max time request. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceMinMaxTimeArgs/PriceDataSourceId/index.md)

