Interface: AccountManagerInfo
Charting Library.AccountManagerInfo
Properties
accountTitle
• accountTitle: string
Name of the broker
customFormatters
• Optional
customFormatters: CustomTableElementFormatter
<TableFormatterInputValues
>[]
Optional array to define custom formatters. Each description is an object with the following fields:
-
name
: FormatterName- Unique name of a formatter.
-
formatText
: TableFormatTextFunction -Function that is used for formatting of a cell value tostring
. Required because used to generate exported data. -
formatElement
: CustomTableFormatElementFunction | undefined- Optional function that is used for formatting of a cell value to
string
orHTMLElement
.
- Optional function that is used for formatting of a cell value to
If the formatElement
function is provided, then only it will be used to format the displayed values, otherwise
formatText
will be used. If you need to only display string
values it is better to use only formatText
for performance reasons.
Example
{
name: 'closeButton' as FormatterName, // Typecast to FormatterName. Use constant in real code
formatText: () => '', // Returns an empty string because we don't need to display this in the exported data
formatElement: ({ values: [id] }: TableFormatterInputs<[id: string]>) => {
const button = document.createElement('button');
button.innerText = 'Close';
button.addEventListener('click', () => {
event.stopPropagation();
closePosition(id);
});
return button;
},
}
historyColumns
• Optional
historyColumns: AccountManagerColumn
[]
History page will be displayed if it exists. All orders from previous sessions will be shown in the History.
historyColumnsSorting
• Optional
historyColumnsSorting: SortingParameters
Optional sorting of the history table.
marginUsed
• Optional
marginUsed: IWatchedValue
<number
>
Margin used
orderColumns
• orderColumns: OrderTableColumn
[]
Columns description that you want to be displayed on the Orders page. You can display any field of an Order or add your own fields to an order object and display them.
orderColumnsSorting
• Optional
orderColumnsSorting: SortingParameters
Optional sorting of the orders table.
pages
• pages: AccountManagerPage
[]
You can add new tabs in the Account Manager by using pages
. Each tab is a set of tables.
positionColumns
• Optional
positionColumns: AccountManagerColumn
[]
You can display any field of a Position or add your own fields to a position object and display them.
possibleOrderStatuses
• Optional
possibleOrderStatuses: OrderStatus
[]
Optional list of statuses to be used in the orders filter. Default list is used if it hasn't been set.
summary
• summary: AccountManagerSummaryField
[]
Custom fields which will always be displayed above the pages.
tradeColumns
• Optional
tradeColumns: AccountManagerColumn
[]
You can display any field of a Trade or add your own fields to a trade object and display them.
Methods
contextMenuActions
▸ contextMenuActions(contextMenuEvent
, activePageActions
): Promise
<ActionMetaInfo
[]>
Optional function to create a custom context menu.
Parameters
Name | Type | Description |
---|---|---|
contextMenuEvent | MouseEvent | TouchEvent | MouseEvent or TouchEvent object passed by a browser |
activePageActions | ActionMetaInfo [] | array of ActionMetaInfo items for the current page |
Returns
Promise
<ActionMetaInfo
[]>
Promise
that is resolved with an array of ActionMetaInfo