/// <summary>
        /// Will calculate the result of this execution up until now, against the values of the provider.
        /// </summary>
        /// <param name="provider"></param>
        /// <returns></returns>
        public decimal?GetPendingResult(IQuoteProvider provider, Order.ResultModeEnum mode, DataSessionInfo info)
        {
            if (this.IsEmpty || _executedPrice.HasValue == false || this._executedPrice == 0 || provider == null)
            {
                return(null);
            }

            return(Order.GetResult(mode, _executedPrice, null, _volumeExecuted, Symbol, OrderStateEnum.Executed, OrderType, null, Symbol.Empty,
                                   info.LotSize, info.DecimalPlaces, provider.Ask, provider.Bid));
        }
Ejemplo n.º 2
0
        public decimal?GetOrderResult(string orderId, Order.ResultModeEnum mode)
        {
            Position position = this.Position;

            if (position != null)
            {
                ISourceOrderExecution provider = this.Position.OrderExecutionProvider;
                if (provider != null)
                {
                    Order order = provider.TradeEntities.GetOrderById(orderId);

                    if (order != null)
                    {
                        return(order.GetResult(mode));
                    }
                }
            }
            return(null);
        }
Ejemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 public override decimal?GetResult(Order.ResultModeEnum mode)
 {
     //_executionProvider.da
     return(null);
 }