Interface: BrokerConfigFlags
Broker.BrokerConfigFlags
Properties
closePositionCancelsOrders
Optional
closePositionCancelsOrders: boolean
Closing a position cancels its brackets.
Default
false
positionPLInInstrumentCurrency
Optional
positionPLInInstrumentCurrency: boolean
Enables displaying Profit & Loss values in instrument currency.
Default
false
requiresFIFOCloseIndividualPositions
Optional
requiresFIFOCloseIndividualPositions: boolean
Enables closing of individual positions in FIFO order.
Default
false
showNotificationsLog
Optional
showNotificationsLog: boolean
Enables the Notifications log tab in the Account Manager.
Default
true
showQuantityInsteadOfAmount
Optional
showQuantityInsteadOfAmount: boolean
Changes Amount to Quantity in Order Ticket.
Default
false
showRiskInInstrumentCurrency
Optional
showRiskInInstrumentCurrency: boolean
Enables the display of Risk in Currency control value in instrument currency for brackets.
Default
false
supportAddBracketsToExistingOrder
Optional
supportAddBracketsToExistingOrder: boolean
Enables adding brackets to the existing order.
Default
true
supportBalances
Optional
supportBalances: boolean
Allows getting crypto balances for an account. Balances are displayed as the first table of the Account Summary tab. Use the flag for crypto currencies only. This flag requires the IBrokerConnectionAdapterHost.cryptoBalanceUpdate method to be implemented.
Default
false
supportCancellingBothBracketsOnly
Optional
supportCancellingBothBracketsOnly: boolean
Modifies the confirmation dialog text for closing a bracket order.
When set to true, the text explicitly states that cancelling a bracket order will also cancel its associated pair.
When set to false, the text will include the ID of the singular bracket order being cancelled.
Note that the library does not cancel orders itself. You should implement the IBrokerTerminal.cancelOrder or IBrokerTerminal.cancelOrders method.
Default
false
supportCloseIndividualPosition
Optional
supportCloseIndividualPosition: boolean
Enables individual position closing. This flag requires the IBrokerTerminal.closeIndividualPosition method to be implemented.
Default
false
supportClosePosition
Optional
supportClosePosition: boolean
Enables position closing.
- If
supportClosePositionis set tofalse, positions are closed using market orders of the opposite side. The library calls the IBrokerTerminal.placeOrder method, passing theisCloseproperty set totruein thePreOrderobject. - If
supportClosePositionis set totrue, the library calls the IBrokerTerminal.closePosition method.
Default
false
supportCryptoBrackets
Optional
supportCryptoBrackets: boolean
Enables crypto brackets.
Default
false
supportCryptoExchangeOrderTicket
Optional
supportCryptoExchangeOrderTicket: boolean
Enables cryptocurrency trading (exchanging). This flag switches the Order Ticket to Crypto Exchange mode, which provides additional controls for entering the quantity in either the base or quote currency.
Default
false
supportCustomOrderInfo
Optional
supportCustomOrderInfo: boolean
Allows brokers to add their own parameters that will be displayed in Order info.
Default
false
supportDemoLiveSwitcher
Optional
supportDemoLiveSwitcher: boolean
Enables demo live switcher.
Default
true
supportEditAmount
Optional
supportEditAmount: boolean
Enables order quantity editing.
If you set this flag to false, the quantity control in the Order Ticket will be disabled when users modify orders.
To completely disable the ability to modify an order (including hiding the Modify button and disabling drag-and-drop actions on the chart), this flag must be set to false in conjunction with BrokerConfigFlags.supportModifyOrderPrice and BrokerConfigFlags.supportModifyBrackets.
Default
true
supportExecutions
Optional
supportExecutions: boolean
If set to true, executions are displayed on the chart.
This flag requires the executions method to be implemented.
Default
true
supportGuaranteedStop
Optional
supportGuaranteedStop: boolean
Enables guaranteed stop loss orders.
If you set this flag to true, the library displays guaranteed stop orders and a user can place a guaranteed stop order using the Order Ticket.
Default
false
supportIndividualPositionBrackets
Optional
supportIndividualPositionBrackets: boolean
Enables brackets for individual positions: take-profit and stop-loss orders.
If you set this flag to true, the library displays an Edit button for individual positions and Edit position... in the individual position's context menu.
This flag requires the IBrokerTerminal.editIndividualPositionBrackets method to be implemented.
Ensure BrokerConfigFlags.supportPositionBrackets is set to false.
If supportPositionBrackets is enabled, it takes precedence, and individual positions will not be displayed on the chart.
Default
false
supportLevel2Data
Optional
supportLevel2Data: boolean
Enables Level 2 data for the Depth of Market widget.
This flag requires the subscribeDepth and unsubscribeDepth methods to be implemented.
Default
false
supportLeverage
Optional
supportLeverage: boolean
Enables trading with leverage.
If the flag is set to true, you should calculate the leverage using the IBrokerTerminal.leverageInfo method.
Default
false
supportLeverageButton
Optional
supportLeverageButton: boolean
Displays a leverage button in the UI.
Note that you should also enable the BrokerConfigFlags.supportLeverage flag.
If supportLeverageButton is set to true, the leverage input field appears in the Order Ticket.
Clicking the input field activates a dedicated Leverage Dialog.
Default
true
supportLimitOrders
Optional
supportLimitOrders: boolean
Enables limit orders type in the Order Ticket.
Default
true
supportMargin
Optional
supportMargin: boolean
Enables the margin meter in the Order Ticket, which visually indicates how much available margin an order will use.
When set to true, you must implement IBrokerTerminal.subscribeMarginAvailable and provide margin updates via IBrokerConnectionAdapterHost.marginAvailableUpdate.
You should also return InstrumentInfo.marginRate from the IBrokerTerminal.symbolInfo method.
Default
false
supportMarketBrackets
Optional
supportMarketBrackets: boolean
Enables brackets for market orders.
Default
true
supportMarketOrders
Optional
supportMarketOrders: boolean
Enables market orders type in the Order Ticket.
Default
true
supportModifyBrackets
Optional
supportModifyBrackets: boolean
Enables order brackets editing.
If you set this flag to false, the bracket's control in the Order Ticket will be disabled,
and the Modify button will be hidden from the chart and in the Account Manager.
To completely disable the ability to modify an order (including hiding the Modify button and disabling drag-and-drop actions on the chart), this flag must be set to false in conjunction with BrokerConfigFlags.supportModifyOrderPrice and BrokerConfigFlags.supportEditAmount.
Default
true
supportModifyDuration
Optional
supportModifyDuration: boolean
Allows modifying existing order duration.
Default
false
supportModifyOrderPreview
Optional
supportModifyOrderPreview: boolean
Allows providing the estimated commission, fees, margin, and other order information before modifying the order without actually modifying it. This information will be displayed in the Order confirmation dialog.
This flag requires the IBrokerTerminal.previewOrder method to be implemented and confirmId parameter to be passed in the IBrokerTerminal.modifyOrder method.
Refer to Enable order preview for more information.
Default
false
supportModifyOrderPrice
Optional
supportModifyOrderPrice: boolean
Enables order price editing.
If you set this flag to false, the price control in the Order Ticket will be disabled when users modify orders.
To completely disable the ability to modify an order (including hiding the Modify button and disabling drag-and-drop actions on the chart), this flag must be set to false in conjunction with BrokerConfigFlags.supportEditAmount and BrokerConfigFlags.supportModifyBrackets.
Default
true
supportModifyOrderType
Optional
supportModifyOrderType: boolean
Allows modifying order type.
Default
false
supportModifyTrailingStop
Optional
supportModifyTrailingStop: boolean
Allows modifying trailing stop orders.
Default
true
supportMultipleExitLevels
Optional
supportMultipleExitLevels: boolean
Enables multiple exit levels (multiple take-profit and stop-loss orders) for a single parent order or position. When enabled, the Order Ticket allows users to Add level for brackets.
Default
false
supportMultiposition
Optional
supportMultiposition: boolean
Enables multiple positions for one instrument at the same time.
Note that if the flag is set to true:
- The default reversal in the library does not work. You need to implement the native reversal on your backend side.
- The Flatten button in the Depth of Market widget will be disabled.
Default
false
supportNativeReversePosition
Optional
supportNativeReversePosition: boolean
Enables native position reversing. You should implement the IBrokerTerminal.reversePosition method to process reversing on your backend side.
Note that the supportReversePosition flag should be set to true to enable the reverse option in the UI.
If supportNativeReversePosition is set to false, the library handles reversing using the built-in mechanism. For more information, refer to the Default reversal section.
Default
false
supportOnlyPairOrderBrackets
Optional
supportOnlyPairOrderBrackets: boolean
Stop Loss and Take Profit are added or removed only together for an order.
Default
false
supportOnlyPairPositionBrackets
Optional
supportOnlyPairPositionBrackets: boolean
Stop Loss and Take Profit are added or removed only together for a position.
Default
false
supportOrderBrackets
Optional
supportOrderBrackets: boolean
Enables order brackets: take-profit and stop-loss.
Default
false
supportOrdersHistory
Optional
supportOrdersHistory: boolean
Enables the Orders History tab in the Account Manager.
This flag requires the ordersHistory method to be implemented.
The method should return a list of orders with the filled, cancelled, and rejected statuses from previous trade sessions.
To disable order history, set supportOrdersHistory to false.
Default
true
supportPLUpdate
Optional
supportPLUpdate: boolean
Allows using your own profit and loss (P&L) values for positions.
By default, supportPLUpdate is set to true.
This means you should calculate the P&L value for a position and provide values to the library.
If supportPLUpdate is set to false, the library automatically calculates P&L values as the difference between the current trade and the average position price.
However, we recommend using your own P&L calculations for positions.
This helps avoid any discrepancies between the P&L values of the account and positions due to potential delays.
Default
true
supportPartialCloseIndividualPosition
Optional
supportPartialCloseIndividualPosition: boolean
Enables partial individual position closing. This flag requires the IBrokerTerminal.closeIndividualPosition method to be implemented.
Default
false
supportPartialClosePosition
Optional
supportPartialClosePosition: boolean
Enables partial position closing. This flag requires the IBrokerTerminal.closePosition method to be implemented.
Default
false
supportPlaceOrderPreview
Optional
supportPlaceOrderPreview: boolean
Allows providing the estimated commission, fees, margin, and other order information before placing the order without actually placing it. This information will be displayed in the Order confirmation dialog.
This flag requires the IBrokerTerminal.previewOrder method to be implemented and confirmId parameter to be passed in the IBrokerTerminal.placeOrder method.
Refer to Enable order preview for more information.
Default
false
supportPositionBrackets
Optional
supportPositionBrackets: boolean
Enables position brackets: take-profit and stop-loss orders.
If you set supportPositionBrackets to true, the library displays an Edit button for positions and Edit position... in the position's context menu.
This flag requires the IBrokerTerminal.editPositionBrackets method to be implemented.
Default
false
supportPositionNetting
Optional
supportPositionNetting: boolean
Enables position netting.
This flag requires the positions and individualPositions method to be implemented.
If you set this flag to true, the Account Manager will have two tabs: Individual Positions and Net Positions.
Default
false
supportPositions
Optional
supportPositions: boolean
Enables positions.
This flag requires the positions method to be implemented.
If you set supportPositions to false, the Positions tab in the Account Manager will be hidden.
Default
true
supportPreviewClosePosition
Optional
supportPreviewClosePosition: boolean
Allows brokers to send position closing information that will be displayed in Close Position Dialog
Default
false
supportReversePosition
Optional
supportReversePosition: boolean
Enables position reversing.
If supportReversePosition is set to false, the Reverse Position button will be hidden from the UI.
Default
false
supportStopLimitOrders
Optional
supportStopLimitOrders: boolean
Enables stop-limit orders type in the Order Ticket.
Default
false
supportStopLimitOrdersInBothDirections
Optional
supportStopLimitOrdersInBothDirections: boolean
Whether stop-limit orders should behave like Limit-if-Touched in both directions. Enabling this flag prevents the check of stop price direction from the stop limit Order Ticket.
supportStopLoss
Optional
supportStopLoss: boolean
Enables stop loss orders. If this flag is set to true, the library displays stop loss orders and a user can place a stop loss order using the Order Ticket.
If you set this flag to false, the BrokerConfigFlags.supportTrailingStop and/or BrokerConfigFlags.supportGuaranteedStop flag should be set to true.
If the supportStopLoss, supportTrailingStop, and supportGuaranteedStop flags are set to false, the default value will be used.
Default
true
supportStopOrders
Optional
supportStopOrders: boolean
Enables stop orders type in the Order Ticket.
Default
true
supportStopOrdersInBothDirections
Optional
supportStopOrdersInBothDirections: boolean
Whether stop orders should behave like Market-if-Touched in both directions. Enabling this flag prevents the check of stop price direction from the stop limit Order Ticket.
Default
false
supportStrictCheckingLimitOrderPrice
Optional
supportStrictCheckingLimitOrderPrice: boolean
Whether the integration supports limit price validation in the order ticket to eliminate the possibility to place an order on the wrong side of the market that will most likely trigger and get filled immediately.
supportSymbolSearch
Optional
supportSymbolSearch: boolean
Enables symbol searching.
Default
false
supportSymbolSpecificCryptoOrderTicket
Optional
supportSymbolSpecificCryptoOrderTicket: boolean
This flag automatically switches Order Ticket to the Crypto Exchange mode if symbol type is crypto
Default
false
supportTrailingStop
Optional
supportTrailingStop: boolean
Enables trailing stop orders.
If you set this flag to true, the library displays trailing stop orders and a user can place a trailing stop order using the Order Ticket.
Default
false
supportUnpairedExitLevels
Optional
supportUnpairedExitLevels: boolean
Enables support for unpaired exit levels within brackets. Allows an exit level to consist of either a single bracket (take-profit or stop-loss) or a paired combination of both.
Default
false