---
id: "P:cAlgo.API.CustomSymbolBarsNeededArgs.CustomSymbol"
kind: "property"
type: "T:cAlgo.API.CustomSymbolBarsNeededArgs"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolBarsNeededArgs/CustomSymbol/"
---

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

# CustomSymbolBarsNeededArgs.CustomSymbol

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

## CustomSymbol

Gets custom symbol.

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
public CustomSymbol CustomSymbol {get;}
```

Python:

```python
customSymbolBarsNeededArgs.CustomSymbol: CustomSymbol
```

### Returns

`CustomSymbol` — 

Available since cAlgo.API 5.3.

### Examples

C#:

```csharp
protected override void OnStart()
{
    CustomSymbols.Add("MYEURUSD", Symbols.GetSymbol("EURUSD")).BarsNeeded = OnBarsNeeded;
}

private void OnBarsNeeded(CustomSymbolBarsNeededArgs args)
{
    Print("Custom symbol {0} needs bars", args.CustomSymbol.Name);
}
```

Python:

```python
from System import Action

def on_start(self):
    api.CustomSymbols.Add("MYEURUSD", api.Symbols.GetSymbol("EURUSD")).BarsNeeded = Action[CustomSymbolBarsNeededArgs](self.on_bars_needed)

def on_bars_needed(self, args):
    api.Print(f"Custom symbol {args.CustomSymbol.Name} needs bars")
```

