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

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

# BacktestingTick (struct)

Represents a tick, used for backtesting data source tick data.

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 sealed struct BacktestingTick : ValueType
```

Available since cAlgo.API 5.3.

## Examples

C#:

```csharp
var lastTick = MarketData.GetTicks("EURUSD").LastTick;
var tick = new BacktestingTick(lastTick.Time, lastTick.Bid, lastTick.Ask);
Print("Backtesting tick {0}: bid {1}, ask {2}", tick.Time, tick.Bid, tick.Ask);
```

Python:

```python
lastTick = api.MarketData.GetTicks("EURUSD").LastTick
tick = BacktestingTick(lastTick.Time, lastTick.Bid, lastTick.Ask)
api.Print(f"Backtesting tick {tick.Time}: bid {tick.Bid}, ask {tick.Ask}")
```

## Constructors

- `public BacktestingTick(DateTime Time, double Bid, double Ask)` — Represents a tick, used for backtesting data source tick data. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingTick/Constructor/index.md)

## Properties

- `public double Ask {get; set;}` — Ask Price [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingTick/Ask/index.md)
- `public double Bid {get; set;}` — Bid Price [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingTick/Bid/index.md)
- `public DateTime Time {get; set;}` — Timestamp [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingTick/Time/index.md)

