The following
For example, the following request completely flattens your entire account - closes all open trades and deletes all pending orders:
Framework.SendOrder({
tradingAction: FXB.OrderTypes.FLATTEN
}, function (MsgResult) {
…
});
All the following
| FXB.OrderTypes. | Description |
| FLATTEN | Closes all open trades and pending orders on all markets |
| FLATTENTRADES | Closes all open trades on all markets, but not pending orders |
| FLATTENPENDING | Deletes all pending orders on all markets, but not open trades |
| FLATTENWINNERS | Closes all profitable open trades on all markets ( |
| FLATTENLOSERS | Closes all loss-making open trades on all markets ( |
| FLATTENLONG | Closes all long trades and pending orders on all markets |
| FLATTENSHORT | Closes all short trades and pending orders on all markets |