The
The FXB.Message object will contain arrays listing the new/changed/closed orders:
| FXB.MessageTypes. | Array |
| ORDER_OPEN | ordersOpened[] |
| ORDER_CHANGE | ordersChanged[] |
| ORDER_CLOSE | ordersClosed[] |
A single message from the framework can contain multiple updates, and therefore the message may contain all of these arrays. For example:
Framework.OnMessage = function(Msg) {
if (Msg.is(FXB.MessageTypes.ORDER_OPEN)) {
… process changes in Msg.ordersOpened[]
}
if (Msg.is(FXB.MessageTypes.ORDER_CLOSE)) {
… process changes in Msg.ordersClosed[]
}
};
Each item in one of these arrays is simply an FXB.Order object describing the new/changed/closed order or trade.
You can react to the changes either by looking at the arrays of orders, or by looking at the Framework.Orderscollection which will already have been updated.
However, in addition to the standard members of
The possible flags are members of the
| FXB.UpdateFlags. | Description |
| FLAG_ORDER_NEW | Order is new (should only exist in |
| FLAG_ORDER_TYPE | Change in |
| FLAG_ORDER_VOLUME | Volume has changed, for example as a result of a partial close |
| FLAG_ORDER_PROFIT | Profit has changed |
| FLAG_ORDER_SLTP | Stop-loss and/or take-profit has changed |
| FLAG_ORDER_CURRENTPRICE | Current price ( |
| FLAG_ORDER_OPENPRICE | Open price has changed - alteration to the entry price on a pending order |
| FLAG_ORDER_COMMENT | Order comment has changed |
| FLAG_ORDER_OTHER | Any other change to order properties |
| FLAG_ORDER_CLOSED | Order is closed/cancelled (should only exist in |