Skip to content

HistoricalTrade.Label

property · HistoricalTrade · cAlgo.API

DesktopCLICloud

The label.

Definition

string Label {get;}
historicalTrade.Label: str

Returns string

Examples

var labelProfit = History.Where(trade => trade.Label == "myLabel").Sum(trade => trade.NetProfit);
Print("Net profit of myLabel trades: {0}", labelProfit);
labelProfit = sum(trade.NetProfit for trade in api.History if trade.Label == "myLabel")
api.Print(f"Net profit of myLabel trades: {labelProfit}")