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

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

# CustomBarsNeedsMoreEventArgs (class)

Provides data for CustomBars NeedsMore event.

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 class CustomBarsNeedsMoreEventArgs
```

Available since cAlgo.API 5.3.

## Examples

C#:

```csharp
protected override void OnStart()
{
    var customTimeFrame = TimeFrameManager.Custom.Add("My Time Frame");
    var customBars = customTimeFrame.AddBars(Symbols.GetSymbol("EURUSD"));
    customBars.NeedsMore += OnCustomBarsNeedsMore;
}

private void OnCustomBarsNeedsMore(CustomBarsNeedsMoreEventArgs args)
{
    Print("{0} {1} custom bars need more history", args.CustomBars.Symbol.Name, args.CustomBars.TimeFrame);
}
```

Python:

```python
def on_start(self):
    customTimeFrame = api.TimeFrameManager.Custom.Add("My Time Frame")
    customBars = customTimeFrame.AddBars(api.Symbols.GetSymbol("EURUSD"))
    customBars.NeedsMore += self.on_custom_bars_needs_more

def on_custom_bars_needs_more(self, args):
    api.Print(f"{args.CustomBars.Symbol.Name} {args.CustomBars.TimeFrame} custom bars need more history")
```

## Properties

- `public CustomBars CustomBars {get;}` — Gets custom bars that needs more bars. [details](https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomBarsNeedsMoreEventArgs/CustomBars/index.md)

