---
id: "P:cAlgo.API.HistoricalTrade.Label"
kind: "property"
type: "T:cAlgo.API.HistoricalTrade"
url: "https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/Label/"
---

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

# HistoricalTrade.Label

Member of [HistoricalTrade](https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/index.md).

## Label

The label.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
string Label {get;}
```

Python:

```python
historicalTrade.Label: str
```

### Returns

`string` — 

### Examples

C#:

```csharp
var labelProfit = History.Where(trade => trade.Label == "myLabel").Sum(trade => trade.NetProfit);
Print("Net profit of myLabel trades: {0}", labelProfit);
```

Python:

```python
labelProfit = sum(trade.NetProfit for trade in api.History if trade.Label == "myLabel")
api.Print(f"Net profit of myLabel trades: {labelProfit}")
```

