---
id: "T:cAlgo.API.TicksHistoryLoadedEventArgs"
kind: "class"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/EventArgs/TicksHistoryLoadedEventArgs/"
---

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

# TicksHistoryLoadedEventArgs (class)

Provides data for the tick history loaded event.

Environments: Desktop supported · CLI supported · Cloud supported.

## Definition

```csharp
public class TicksHistoryLoadedEventArgs
```

## Examples

C#:

```csharp
using cAlgo.API;
using cAlgo.API.Internals;

namespace cAlgo
{
    // This sample indicator shows how to use TicksHistoryLoadedEventArgs
    public partial class Test : Indicator
    {
        private Ticks _ticks;

        protected override void Initialize()
        {
            // Getting a symbol ticks data
            _ticks = MarketData.GetTicks(InputSymbolName);

            _ticks.HistoryLoaded += OnTicksHistoryLoaded;
            // You can also pass a callback method instead of subscribing to HistoryLoaded event
            //_ticks.LoadMoreHistoryAsync(OnTicksHistoryLoaded);
            _ticks.LoadMoreHistoryAsync();

            _ticks.Reloaded += OnTicksReloaded;
        }

        private void OnTicksReloaded(TicksHistoryLoadedEventArgs obj)
        {
            Print("Ticks got reloaded");
        }

        private void OnTicksHistoryLoaded(TicksHistoryLoadedEventArgs obj)
        {
            Print("New ticks loaded: #{0}", obj.Count);
        }

        public override void Calculate(int index)
        {
        }
    }
}
```

Python:

```python
import clr
clr.AddReference("cAlgo.API")

from cAlgo.API import *
from System import Action

class Test():
    def initialize(self):
        self.ticks = api.MarketData.GetTicks(api.InputSymbolName)
        self.ticks.HistoryLoaded += self.on_ticks_history_loaded
        # You can also pass a callback method instead of subscribing to HistoryLoaded event
        self.ticks.LoadMoreHistoryAsync(Action[TicksHistoryLoadedEventArgs](self.on_ticks_history_loaded))
        self.ticks.LoadMoreHistoryAsync()
        self.ticks.Reloaded += self.on_ticks_reloaded

    def on_ticks_history_loaded(self, args):
        print("New ticks loaded: #", args.Count)

    def on_ticks_reloaded(self, args):
        print("Ticks got reloaded")
```

config.json:

```json
{
  "AccessRights": "None",
  "TimeZone": "UTC",
  "IsOverlay": true,
  "Parameters": [
    {
      "Name": "InputSymbolName",
      "DisplayName": "Symbol Name",
      "Type": "String",
      "DefaultValue": "EURUSD"
    }
  ]
}
```

## Properties

- `public int Count {get;}` — Gets the number of the ticks. [details](https://help.ctrader.com/ctrader-algo/references/EventArgs/TicksHistoryLoadedEventArgs/Count/index.md)
- `public Ticks Ticks {get;}` — Gets the tick data. [details](https://help.ctrader.com/ctrader-algo/references/EventArgs/TicksHistoryLoadedEventArgs/Ticks/index.md)

