The following
For the following actions, an
For example, you can close all the loss-making open trades on EUR/USD with the following request:
Framework.SendOrder({
tradingAction: FXB.OrderTypes.CLOSEPOSLOSERS,
instrumentId: "EUR/USD"
}, function (MsgResult) {
…
});
| FXB.OrderTypes. | Description |
| CLOSEPOSITION | Closes all open trades and pending orders on the market |
| CLOSEPOSTRADES | Closes open trades on the market, but not pending orders |
| CLOSEPOSPENDING | Closes pending orders, but not open trades |
| CLOSEPOSWINNERS | Closes profitable open trades ( |
| CLOSEPOSLOSERS | Closes loss-making open trades ( |
| CLOSEPOSLONG | Closes all long trades and pending orders |
| CLOSEPOSSHORT | Closes all short trades and pending orders |
| HEDGEPOSITION | If supported by the account, hedges the current position by placing an open trade in the opposite direction for the current open volume. For example, you are currently short 20,000 EUR/USD this will open a buy trade for 20,000. Not allowed if the account is netting/non-hedging. |
| DOUBLEPOSITION | Doubles the current position. For example, if you are currently (net) short 20,000 EUR/USD this will open a new sell trade for a further 20,000 |
| REVERSEPOSITION | Reverses the current position by placing a new trade for the opposite volume, without closing the current open trade(s). For example, if you are currently short 20,000 EUR/USD this will open a buy trade for 40,000. Not allowed if the account is netting/non-hedging. |
| CLOSEANDREVERSE | Like |