AlfaTrader выкидывает ошибку при работе с SampleRealTimeTesting
Эксепшн вылетает при первой попытки создания заявки:
var order = base.CreateOrder(direction, base.Security.GetMarketPrice(direction), base.Volume);
значение base.Security не null
Stack Trace:
Value cannot be null.
Parameter name: security
at Ecng.Trading.Algo.TraderHelper.ShrinkPrice(Security security, Decimal price, ShrinkRules rule)
at Ecng.Trading.Algo.TraderHelper.GetMarketPrice(MarketDepthPair bestPair, OrderDirections direction, Unit priceDelta, MarketPriceTypes priceType)
at Ecng.Trading.Algo.TraderHelper.GetMarketPrice(MarketDepth depth, OrderDirections direction, Unit priceDelta, MarketPriceTypes priceType)
at Ecng.Trading.Algo.TraderHelper.GetMarketPrice(Security security, OrderDirections direction, Unit priceDelta, MarketPriceTypes priceType)
at SampleRealTimeTesting.SmaStrategy.OnProcess() in E:\Projects\StockSharp\SampleRealTimeTesting\SmaStrategy.cs:line 100
at Ecng.Trading.Algo.Strategies.Strategy.#=qZIvlEwumCnLOHChv0nHsiE2DmvMiBjA27jwCfRBG6Ng=.#=qjSTDqQrm5VigoeELaU6R4g==()