---
id: "M:cAlgo.API.OhlcvBar.#ctor(System.Double,System.Double,System.Double,System.Double,System.Int64)"
kind: "constructor"
type: "T:cAlgo.API.OhlcvBar"
url: "https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/OhlcvBar/Constructor/"
---

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

# OhlcvBar constructor

Member of [OhlcvBar](https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/OhlcvBar/index.md).

## OhlcvBar(double open, double high, double low, double close, long tickVolume)

Create a OHLCV bar.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public OhlcvBar(double open, double high, double low, double close, long tickVolume)
```

Python:

```python
OhlcvBar(open: float, high: float, low: float, close: float, tickVolume: int)
```

### Parameters

- `open` (`double`, Python `float`): Open price
- `high` (`double`, Python `float`): High price
- `low` (`double`, Python `float`): Low price
- `close` (`double`, Python `float`): Close price
- `tickVolume` (`long`, Python `int`): Tick volume

Available since cAlgo.API 5.4.

### Examples

C#:

```csharp
var bar = new OhlcvBar(1.1000, 1.1050, 1.0980, 1.1020, 1500);
Print("Range: {0}", bar.High - bar.Low);
```

Python:

```python
bar = OhlcvBar(1.1000, 1.1050, 1.0980, 1.1020, 1500)
api.Print(f"Range: {bar.High - bar.Low}")
```

