Order
class
Represents information about pending order.
Properties
Account Account | Account that opened the order. |
Amount double | Value of the order in lots. |
CloseTime DateTime | Returns close time for the order (if order is cancelled). |
Comment string | Returns comment for the selected order. |
CurrentPrice double | Current price |
ExpirationTime DateTime | The date of expiration order (for GTD orders). |
FilledAmount double | Filled amount (zero means any fills occured) |
FillPrice double | Average price of order fill (or zero if any fills ocuured) |
GroupId long | The ID of the order group. This group created when trades done by the MAM account. |
Id string | Unique number that the trading system assigns to each order. If a position opens based on an order, the position's OpenOrderId property will return the same number. |
Instrument Instrument | Represents the information of instrument for order. |
IsActive bool | Returns true if this order is active on server |
IsAutoTradeOrder bool | Returns true if this order is created by strategy |
IsGroupPart bool | Return true when order was sent by MAM account. |
IsReplaceable bool | Returns true if user can replace(modify) this order |
IsStopLossOrder bool | Return true if this order is Stop Loss order for some order. |
IsTakeProfitOrder bool | Return true if this order is Take Profit order for some order. |
LastUpdateTime DateTime | Time of last order update |
LinkedTo string | The ID of the order which current order is bound to; if the former is executed, the system cancels the latter. Uses by OCO, StopLoss, TakeProfit or TrStop orders. |
MagicNumber int | Returns a magic number of chosen order. |
Price double | Price at which the order is to be executed. |
RemoteId string | Order number as defined by the destination sent |
Side Operation | Type of trade to be executed (BUY or SELL). |
StopLimitPrice double | Stop Price for the StopLimit order. |
StopLossOrder Order | Gets current stop-loss order or null if it isn't exist |
TakeProfitOrder Order | Gets current take-profit order or null if it isn't exist |
Time DateTime | Date and time when the order was placed. |
TimeInForce TimeInForce | Order's Time-in-force. |
Type OrdersType | The type of order. |
Methods
Cancel () Return: bool | Cancels the order |
CancelAsync (Action<bool> callback) Return: bool | Cancels the order asynchronously. |
Modify (ReplaceOrderRequest request) Return: bool | Replace this order by modifying some of it's parameters |
Modify (double newPrice) Return: bool | Replace this order by modifying its price |
Modify (double newPrice, double newAmount) Return: bool | Replace this order by modifying its price and amount |
RemoveStopLoss () Return: bool | Removes current stop-loss order |
RemoveStopLossAsync (Action<bool> callback) Return: bool | Removes current stop-loss order asynchronously |
RemoveTakeProfit () Return: bool | Removes current take-profit order |
RemoveTakeProfitAsync (Action<bool> callback) Return: bool | Removes current take-profit order asynchronously |
SetStopLoss (double slPrice) Return: bool | Sets a new (modifies existed) stop-loss order |
SetStopLossAsync (double slPrice, Action<bool> callback) Return: bool | Sets a new (modifies existed) stop-loss order asynchronously |
SetStopLossTrail (double slPrice) Return: bool | Sets a new (modifies existed) stop-loss order with trailing |
SetStopLossTrailAsync (double slPrice, Action<bool> callback) Return: bool | Sets a new (modifies existed) stop-loss order asynchronously |
SetTakeProfit (double tpPrice) Return: bool | Sets a new (modifies existed) take-profit order |
SetTakeProfitAsync (double tpPrice, Action<bool> callback) Return: bool | Sets a new (modifies existed) take-profit order asynchronously |