public static PendingOrder DecoratePendingOrder(PENDING_ORDER_CLOSED ord) { var po = new PendingOrder { ID = ord.OrderID, AccountID = ord.AccountID, PriceSide = (PendingOrderType)ord.PriceSide, PriceFrom = (float)ord.PriceFrom, PriceTo = (float?)ord.PriceTo, TimeFrom = ord.TimeFrom, TimeTo = ord.TimeTo, Symbol = ord.Symbol, Volume = ord.Volume, Side = ord.Side, Magic = ord.Magic, Comment = ord.Comment, ExpertComment = ord.ExpertComment, StopLoss = (float?)(ord.Stoploss == 0 ? null : ord.Stoploss), TakeProfit = (float?)(ord.Takeprofit == 0 ? null : ord.Takeprofit), Status = (PendingOrderStatus)ord.Status, PairOCO = ord.PairOCO, TimeClosed = ord.TimeClosed, PriceClosed = (float?)ord.PriceClosed, CloseReason = ord.CloseReason, }; return(po); }
public static PendingOrder DecoratePendingOrder(PENDING_ORDER_CLOSED ord) { var po = new PendingOrder { ID = ord.OrderID, AccountID = ord.AccountID, PriceSide = (PendingOrderType)ord.PriceSide, PriceFrom = (float)ord.PriceFrom, PriceTo = (float?)ord.PriceTo, TimeFrom = ord.TimeFrom, TimeTo = ord.TimeTo, Symbol = ord.Symbol, Volume = ord.Volume, Side = ord.Side, Magic = ord.Magic, Comment = ord.Comment, ExpertComment = ord.ExpertComment, StopLoss = (float?)(ord.Stoploss == 0 ? null : ord.Stoploss), TakeProfit = (float?)(ord.Takeprofit == 0 ? null : ord.Takeprofit), Status = (PendingOrderStatus)ord.Status, PairOCO = ord.PairOCO, TimeClosed = ord.TimeClosed, PriceClosed = (float?)ord.PriceClosed, CloseReason = ord.CloseReason, }; return po; }