trading_agent.terminal.widgets.profit_card
¶
The side panel's Profit and loss card: the desk's and the account's profit, and any halts in force.
Typical usage example:
card = ProfitCard() card.show('general', account)
ProfitCard
¶
Bases: SideCard
The Profit and loss card.
Creates the card.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
collapsed
|
bool
|
Whether it starts folded. |
False
|
Source code in src/trading_agent/terminal/widgets/profit_card.py
show
¶
Shows the profit and loss.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
desk_name
|
str
|
The desk the chat shows. |
required |
account
|
dict[str, Any] | None
|
The account, or None when it could not be read. |
required |