---
id: "M:cAlgo.API.CustomSymbol.RemoveAllUnloadedBars"
kind: "method"
type: "T:cAlgo.API.CustomSymbol"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/RemoveAllUnloadedBars/"
---

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

# CustomSymbol.RemoveAllUnloadedBars

Member of [CustomSymbol](https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/index.md).

## RemoveAllUnloadedBars()

Removes all existing unloaded custom bars that aren't being used.

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.

C#:

```csharp
void RemoveAllUnloadedBars()
```

Python:

```python
customSymbol.RemoveAllUnloadedBars() -> None
```

Available since cAlgo.API 5.3.

### Examples

C#:

```csharp
var customSymbol = CustomSymbols.Get("MYEURUSD");
customSymbol?.RemoveAllUnloadedBars();
```

Python:

```python
customSymbol = api.CustomSymbols.Get("MYEURUSD")
if customSymbol is not None:
    customSymbol.RemoveAllUnloadedBars()
```

