Beispiel #1
0
        public void CloseLastOrder(DateTime time, TickerType tickerType, double bidPrice, double askPrice, BarItem barItem)
        {
            MarketOrder marketOrder = marketOrders[lastTickerOrder[tickerType.Symbol]];

            marketOrder.CloseOrder(time, bidPrice, askPrice, barItem.Time);
            marketOrderCache.AppendMarketOrder(marketOrders.Count, marketOrder.Position, marketOrder.OrderTime, marketOrder.OpeningBarTime, marketOrder.OpeningBidPrice, marketOrder.OpeningAskPrice,
                                               barItem.Time, marketOrder.ClosingBarTime, marketOrder.ClosingBidPrice, marketOrder.ClosingAskPrice);
        }