public FxOrder OpenNewOrder(string operationId, string symbol, TradeCommand command, TradeRecordSide side, double priceThreshold, double volume, double? stopLoss, double? takeProfit, DateTime? expiration, string comment, int timeoutInMilliseconds) { if (operationId == null) operationId = string.Empty; this.VerifyInitialized(); var order = new FxOrder(symbol, (int)command, side, priceThreshold, volume, stopLoss, takeProfit, expiration, comment); return Native.TradeServer.OpenNewOrder(this.handle, operationId, order, (uint)timeoutInMilliseconds); }
public FxOrder ModifyOrder(string operationId, string orderId, string clientId, string symbol, TradeRecordType type, TradeRecordSide side, double volume, double? newActivationPrice, double? newStopLoss, double? newTakeProfit, DateTime? newExpiration, string newComment, int timeoutInMilliseconds) { if (operationId == null) operationId = string.Empty; if (newComment == null) newComment = string.Empty; this.VerifyInitialized(); var order = new FxOrder(orderId, clientId, symbol, (int)type, side, newActivationPrice, volume, newStopLoss, newTakeProfit, newExpiration, newComment); return Native.TradeServer.ModifyOrder(this.handle, operationId, order, (uint)timeoutInMilliseconds); }
internal TradeRecord(DataTrade dataTrade, FxOrder fxOrder) { this.DataTrade = dataTrade; this.OrderId = fxOrder.OrderId; this.ClientOrderId = fxOrder.ClientOrderId; this.Symbol = fxOrder.Symbol; this.Price = fxOrder.Price; this.StopLoss = fxOrder.StopLoss; this.TakeProfit = fxOrder.TakeProfit; this.InitialVolume = fxOrder.InitialVolume; this.Volume = fxOrder.Volume; this.Commission = fxOrder.Commission; this.Swap = fxOrder.Swap; this.Profit = fxOrder.Profit; this.Type = (TradeRecordType)fxOrder.Type; this.Side = fxOrder.Side; this.Comment = fxOrder.Comment; this.Expiration = fxOrder.Expiration; this.Created = fxOrder.Created; this.Modified = fxOrder.Modified; }