---
id: "P:cAlgo.API.BarsHistoryLoadedEventArgs.Count"
kind: "property"
type: "T:cAlgo.API.BarsHistoryLoadedEventArgs"
url: "https://help.ctrader.com/ctrader-algo/references/EventArgs/BarsHistoryLoadedEventArgs/Count/"
---

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

# BarsHistoryLoadedEventArgs.Count

Member of [BarsHistoryLoadedEventArgs](https://help.ctrader.com/ctrader-algo/references/EventArgs/BarsHistoryLoadedEventArgs/index.md).

## Count

Gets the number of bars.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public int Count {get;}
```

Python:

```python
barsHistoryLoadedEventArgs.Count: int
```

### Returns

`int` — 

### Examples

C#:

```csharp
protected override void OnStart()
{
    Bars.HistoryLoaded += OnBarsHistoryLoaded;
    Bars.LoadMoreHistoryAsync();
}

private void OnBarsHistoryLoaded(BarsHistoryLoadedEventArgs args)
{
    Print("Loaded {0} more bars", args.Count);
}
```

Python:

```python
def on_start(self):
    api.Bars.HistoryLoaded += self.on_bars_history_loaded
    api.Bars.LoadMoreHistoryAsync()

def on_bars_history_loaded(self, args):
    api.Print(f"Loaded {args.Count} more bars")
```

