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

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

# BacktestingDataSource (interface)

Represents a backtesting data source.

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 interface BacktestingDataSource
```

Available since cAlgo.API 5.3.

## Examples

C#:

```csharp
foreach (var dataSource in Backtesting.DataSources)
    Print("Data source {0}, only own custom time frames: {1}", dataSource.Name, dataSource.SupportOnlyOwnCustomTimeFrames);
```

Python:

```python
for dataSource in api.Backtesting.DataSources:
    api.Print(f"Data source {dataSource.Name}, only own custom time frames: {dataSource.SupportOnlyOwnCustomTimeFrames}")
```

## Methods

- `bool ClearCache()` — Clears cached price data of current data source if not being used. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSource/ClearCache/index.md)

## Properties

- `string Name {get;}` — Gets unique name of backtesting data source. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSource/Name/index.md)
- `bool SupportOnlyOwnCustomTimeFrames {get; set;}` — Gets / sets if current backtesting data source can be used only for owner plugin custom TimeFrames or for both owner plugin custom TimeFrames and built-in TimeFrames. If True current source will only appear if backtesting TimeFrame is owner plugin created custom TimeFrame. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSource/SupportOnlyOwnCustomTimeFrames/index.md)

