---
id: "M:cAlgo.API.TradeWatchTab.Attach"
kind: "method"
type: "T:cAlgo.API.TradeWatchTab"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Attach/"
---

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

# TradeWatchTab.Attach

Member of [TradeWatchTab](https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/index.md).

## Attach()

Attaches current tab back to trade watch.

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
bool Attach()
```

Python:

```python
tradeWatchTab.Attach() -> bool
```

### Returns

`bool` — 

### Examples

C#:

```csharp
var tab = TradeWatch.AddTab("My Tab");
tab.Detach();
var isAttached = tab.Attach();
Print("Tab attached back: {0}", isAttached);
```

Python:

```python
tab = api.TradeWatch.AddTab("My Tab")
tab.Detach()
isAttached = tab.Attach()
api.Print(f"Tab attached back: {isAttached}")
```

