4.3Types of message

The types of message which you can receive via OnMessage() are as follows, from the FXB.MessageTypes enumeration:

FXB.MessageTypes.

Description

PRICE

Update to one or more prices

ORDER_OPEN

New pending order or open trade

ORDER_CHANGE

Change to a pending order or open trade (including non-trading changes such as fluctuating profit on an open trade)

ORDER_CLOSE

Closure of an open trade or cancellation of a pending order

POSITION_CHANGE

Change to a net position

ACCOUNT_METRICS

Change to account metrics such as balance or margin usage

ACCOUNT_HISTORY

Initial load or subsequent change to the account history

MARKET_DEPTH

Update to market depth

ORDER_BOOK

Update to order book

MAILBOX

Event within MyTrader's internal mail system

THEME

Change by the user to the software's graphical theme

CATEGORY_SETTINGS_CHANGE

Change to the category settings of your widget, script, or UDIX

WIDGET_CONTEXT_CHANGE

Change of context - synchronisation of markets and/or timeframes - in the MyTrader page container

BROADCASTx

Range of messages, from BROADCAST1 to BROADCAST10, which widgets, scripts, or UDIXes can use to broadcast their existence to other components

GENERICx

Range of messages, from GENERIC1 to GENERIC10, which a widget, script, or UDIX can use to send a direct message to a component whose ID it knows