Skip to main content

Module trading

Module trading 

Source
Expand description

Trading from the chart through the host’s Broker: the broker picker, the order ticket, the Buy and Sell buttons, depth ladder and the account panel. The broker holds the account; this module shows what it pushes and sends the orders the user confirms.

Structs§

AccountPanel
The account panel of Trading, shown with Trading::show_account_panel.
Bracket
A take-profit or stop-loss as entered in the ticket.
BrokerPicker
The dialog in which the user picks a broker: a grid of the host’s BrokerTiles, the paper account first, with a search and a footer link. Its compare button shows the facts of two brokers side by side in aligned rows, with a control to add another and one to connect each. Picking a tile shows its connect card, whose Connect button returns BrokerPickerAction::Connect and closes the picker; the host then connects Trading to that broker. Open it with open, such as from the toolbar’s Trade button while no broker is connected.
BrokerTile
One broker of the BrokerPicker, as the host offers it.
OrderPreset
A named quantity and brackets the ticket applies in one step. Hosts persist Trading::presets themselves.
Trading
The trading controls of one chart, connected to the host’s Broker.

Enums§

AccountPanelAction
What the user asked for in the AccountPanel that the host carries out. Cancelling or changing an order and closing a position go to the broker from the panel itself.
BracketMode
How a take-profit or stop-loss distance is entered.
BrokerFact
One row of a broker in the picker’s comparison view.
BrokerPickerAction
What the user chose in the BrokerPicker.

Traits§

TradingFormatter
Host text for the numbers of the order ticket, the depth ladder and the account tables.