History.Item
property · History · cAlgo.API
DesktopCLICloud
Find a historical trade by index
Definition
HistoricalTrade Item {get;}
api.History[index: int] -> HistoricalTrade
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
index | int | int | the index in the list |
Returns HistoricalTrade
Examples
if (History.Count > 0)
Print("First trade net profit: {0}", History[0].NetProfit);
if api.History.Count > 0:
api.Print(f"First trade net profit: {api.History[0].NetProfit}")