---
id: "T:cAlgo.API.MainMenuCustomItem"
kind: "interface"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuCustomItem/"
---

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

# MainMenuCustomItem (interface)

Represents a custom item in main menu.

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 interface MainMenuCustomItem
```

Available since cAlgo.API 5.4.

## Examples

C#:

```csharp
if (MainMenu.SelectedItem is MainMenuCustomItem customItem)
    Print("Selected custom item: {0}", customItem.Name);
```

Python:

```python
selectedItem = api.MainMenu.SelectedItem
if isinstance(selectedItem.__implementation__, MainMenuCustomItem):
    api.Print(f"Selected custom item: {MainMenuCustomItem(selectedItem).Name}")
```

## Properties

- `string Name {get;}` — Gets name of item. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuCustomItem/Name/index.md)

