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

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

# TradeWatchTab (interface)

Represents a trade watch panel tab.

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 TradeWatchTab
```

## Examples

C#:

```csharp
var tab = TradeWatch.AddTab("My Tab");
tab.Child = new TextBlock { Text = "Hello from my plugin" };
tab.IsBalanceBarVisible = false;
tab.IsSelected = true;
Print("Trade watch tab {0} added at index {1}", tab.Title, tab.Index);
```

Python:

```python
tab = api.TradeWatch.AddTab("My Tab")
textBlock = TextBlock()
textBlock.Text = "Hello from my plugin"
tab.Child = textBlock
tab.IsBalanceBarVisible = False
tab.IsSelected = True
api.Print(f"Trade watch tab {tab.Title} added at index {tab.Index}")
```

## Methods

- `bool Attach()` — Attaches current tab back to trade watch. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Attach/index.md)
- `bool Detach()` — Detaches current tab to a separate window. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Detach/index.md)

## Properties

- `ControlBase Child {get; set;}` — Get / set content of current tab. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Child/index.md)
- `DetachedWindow DetachedWindow {get;}` — Returns detached window properties. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/DetachedWindow/index.md)
- `double Height {get;}` — Returns current height of tab. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Height/index.md)
- `string Id {get;}` — Returns unique ID of the current tab. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Id/index.md)
- `int Index {get; set;}` — Get / set the index of the tab. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Index/index.md)
- `bool IsBalanceBarVisible {get; set;}` — Get / set the visibility of balance bar for the tab. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/IsBalanceBarVisible/index.md)
- `bool IsSelected {get; set;}` — Get / set selected state of current tab. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/IsSelected/index.md)
- `string Title {get;}` — Returns title of the current tab. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Title/index.md)
- `double Width {get;}` — Returns current width of tab. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Width/index.md)

## Events

- `event Action<TradeWatchTabAttachedEventArgs> Attached;` — Occurs when tab attached. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Attached/index.md)
- `event Action<TradeWatchTabDetachedEventArgs> Detached;` — Occurs when tab detached. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Detached/index.md)
- `event Action<TradeWatchTabIsSelectedChangedEventArgs> IsSelectedChanged;` — Occurs after tab IsSelected value change. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/IsSelectedChanged/index.md)
- `event Action<TradeWatchTabSizeChangedEventArgs> SizeChanged;` — Occurs after tab size (height / width) value change. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/SizeChanged/index.md)

