2.6Framework.Orders collection

The Framework.Orders collection is a Dictionary of all the pending/working orders and open trades on the account. The framework uses the same FXB.Order class to represent both pending orders and open trades (and also historic trades and credit movements).

Framework.Orders is then a collection of FXB.Order objects, keyed by their orderId.

To watch for changes in the order list, you can use an OnMessage() handler.

In addition to standard Dictionary functions, the Framework.Orders collection offers, for convenience, the following derived properties:

Property

Description

tradeNetProfit

Current net profit on all open trades - should normally match Account.floatingPL

openTradeCount

Number of open trades

pendingOrderCount

Number of pending orders

In other words, Orders.length (inherited from Dictionary) = Orders.openTradeCount + Orders.pendingOrderCount.