Edit Order
Only Entry Stop (SE), Entry Limit (LE), Stop (S) and Limit (L) orders (and all their modifications) in the waiting ("W") fix status can be changed.
To edit an order, please fill the following values in the value map:
Valuemap field |
Datatype |
Description |
||||
Command |
string |
The command. Must be The field is obligatory. |
||||
OrderID |
string |
The identifier of the order to be changed. The field is obligatory. |
||||
AcctID |
string |
The identifier of the account the order was placed for.
The value must be obtained from the "Accounts" table, the Please note that the account identifier may not necessarily be equal to the account name which is shown in the Trading Station application. The field is obligatory. |
||||
Rate |
number |
A new rate for the order. For sell stop and buy limit orders, the rate must be below the market. For sell limit and buy stop orders, the rate must be above the market. If you want to change the rate of the order, you must specify
either |
||||
PegType |
string |
The type of the pegged (relative to market) price. Possible values:
Please note that only stop and limit orders which are attached to the entry order can be kept in the pegged price. For all other kinds of the orders, the pegged price will be automatically converted to a regular price. |
||||
PegPriceOffsetPips |
number |
An offset, expressed in pips, against the price specified in the For sell stop and buy limit orders, the offset must be negative. For sell limit and buy stop orders, the offset must be positive. Price can be specified as an offset to the market only for Stop or Limit orders attached to an entry order. |
||||
TrailUpdatePips |
number |
The value can be changed for an entry order or for a stop order. The value specifies the maximum change of the market price after that the rate of the order will be changed as well. The value is expressed in pips. If the value is 1, it means that the dynamic trailing mode is used, i.e. the order rate is changed
with every change of the market price. Please note that in some systems, only dynamic
trailing mode is supported. See The value is optional. By default, this value is 0. 0 means no-trailing order. The trailing mode can be changed for the SE, LE and S orders only. |
||||
Quantity |
number |
The quantity of the instrument to be bought or sold. The quantity is expressed in contracts and must
be divisible by the value of the lot size (see The quantity can be changed for entry orders which are not in the netting mode. If value is not specified, the order amount will not be changed. |
||||
CustomID |
number |
The custom identifier of the order. This value will be populated into all order-related QTXT columns of the following tables: "Orders", "Trades", and "Closed Trades". If value is not specified, the custom identifier of the order will not be changed. |
Not all combinations of the fields can be used. Please follow the rules below:
1) Rate can be changed either using the Rate field or a pair of PegType and PegPriceOffsetPips fields. Pegged price (a price expressed as the distance in pips) can be changed only for the S or L orders attached to entry orders. For all other kinds of the order the Rate must be used to change the order rate. If rate is changed, the TrailUpdatePips must be also specified. If you omit TrailUpdatePips field, the trailing mode of the order will be reset, even if order was trailing. Moreover, even if you need change only trailing mode, the rate must be specified.
2) You can change as both rate (plus trailing mode) and quantity, as well as only rate or quantity.
For example on how to edit the order please the the following examples: