Уважаемые господа, может кто видит, почему на RealTimeEmulationTrader<QuikTrader> три заявки регистритуются, а на реальных торгах регистрируется только одна TargetOrder1, а от остальных никакого следа (нет сообщений об ошибке). Первая заявка на фьючерс, а две последних на опционы.
Под фрагментом программы приведена распечатка содержимого TargetOrder2 и TargetOrder3. Может чего не указал в кострукторе заявок на опцион?Код
if ((dShortProf > Profitgap) & (dShortProf != dShortProfOld))
{
sLS = "Short";
TargetOrder1 = new Order
{
Security = dicSecurities[secKey].Undelying,
Direction = OrderDirections.Sell,
Price = dicSecurities[secKey].Undelying.MinPrice,
Volume = 1,
Portfolio = _portfolio,
Type = OrderTypes.Limit,
};
TargetOrder2 = new Order
{
Security = dicSecurities[secKey].CallOpt,
Direction = OrderDirections.Buy,
Price = dicSecurities[secKey].CallOpt.BestBid.Price + dicSecurities[secKey].CallOpt.MinStepPrice, // + 500m,
Volume = 1,
Portfolio = _portfolio,
Type = OrderTypes.Limit,
};
TargetOrder3 = new Order
{
Security = dicSecurities[secKey].PutOpt,
Direction = OrderDirections.Sell,
Price = dicSecurities[secKey].PutOpt.BestAsk.Price - dicSecurities[secKey].PutOpt.MinStepPrice, // - 500m,
Volume = 1,
Portfolio = _portfolio,
Type = OrderTypes.Limit,
};
};
if ((sLS == "Long") || (sLS == "Short"))
{
if ((TargetOrder1 != null) && (TargetOrder2 != null) && (TargetOrder3 != null))
{
if (_strategy != null) _strategy.RegOrd(TargetOrder1);
else _trader.RegisterOrder(TargetOrder1);
if (_strategy != null) _strategy.RegOrd(TargetOrder2);
else _trader.RegisterOrder(TargetOrder2);
if (_strategy != null) _strategy.RegOrd(TargetOrder3);
else _trader.RegisterOrder(TargetOrder3);
};
};
- TargetOrder2 {StockSharp.BusinessEntities.Order} StockSharp.BusinessEntities.Order+ base {StockSharp.BusinessEntities.Order} Ecng.Common.Cloneable<StockSharp.BusinessEntities.Order> {StockSharp.BusinessEntities.Order}
Balance 0 decimal
CancelTime null System.DateTime?
Comment null string
DerivedOrder null StockSharp.BusinessEntities.Order
Direction Buy StockSharp.BusinessEntities.OrderDirections
ExecutionCondition PutInQueue StockSharp.BusinessEntities.OrderExecutionConditions
ExtensionInfo null System.Collections.Generic.IDictionary<object,object>
Id 0 long
+ Latency {00:00:00} System.TimeSpan
+ Messages {Ecng.Collections.SynchronizedList<string>} System.Collections.Generic.IList<string> {Ecng.Collections.SynchronizedList<string>}
+ Portfolio {SPBFUT00000} StockSharp.BusinessEntities.Portfolio
Price 1305 decimal
RepoInfo null StockSharp.BusinessEntities.RepoOrderInfo
RpsInfo null StockSharp.BusinessEntities.RpsOrderInfo
- Security {GZ18000BL1@RTS} StockSharp.BusinessEntities.Security
+ BestAsk {Оффер 1264 0} StockSharp.BusinessEntities.Quote
+ BestBid {Бид 1304 0} StockSharp.BusinessEntities.Quote
+ BestPair {Бид 1304 0} {Оффер 1264 0} StockSharp.BusinessEntities.MarketDepthPair
Class "SPBOPT" string
ClosePrice 1076 decimal
Code "GZ18000BL1" string
Decimals 0 int
+ Exchange {РТС} StockSharp.BusinessEntities.Exchange
ExpiryDate null System.DateTime?
+ ExtensionInfo Count = 9 System.Collections.Generic.IDictionary<object,object> {System.Collections.Generic.Dictionary<object,object>}
HighPrice 0 decimal
Id "GZ18000BL1@RTS" string
+ LastTrade {StockSharp.BusinessEntities.Trade} StockSharp.BusinessEntities.Trade
LowPrice 0 decimal
MarginBuy 0 decimal
MarginSell 0 decimal
MaxPrice 0 decimal
MinLotSize 1 int
MinPrice 0 decimal
MinStepPrice 1 decimal
MinStepSize 1 decimal
Name "GAZR-12.11M141211CA 18000" string
OpenPrice 0 decimal
OptionType null StockSharp.BusinessEntities.OptionTypes?
SettlementDate null System.DateTime?
ShortName "" string
State Trading StockSharp.BusinessEntities.SecurityStates
Strike 18000 decimal
TheorPrice 0 decimal
+ Trader {StockSharp.Quik.QuikTrader} StockSharp.BusinessEntities.ITrader {StockSharp.Quik.QuikTrader}
Type Option StockSharp.BusinessEntities.SecurityTypes
UnderlyingSecurityId "GZZ1@RTS" string
Volatility 0 decimal
+ Non-Public members {GZ18000BL1@RTS} StockSharp.BusinessEntities.Security
State None StockSharp.BusinessEntities.OrderStates
Status null StockSharp.BusinessEntities.OrderStatus?
StopCondition null StockSharp.BusinessEntities.StopCondition
+ Time {1/1/0001 12:00:00 AM} System.DateTime
Trader null StockSharp.BusinessEntities.ITrader
TransactionId 0 long
Type Limit StockSharp.BusinessEntities.OrderTypes
Volume 1 decimal
+ Non-Public members {StockSharp.BusinessEntities.Order} StockSharp.BusinessEntities.Order
- TargetOrder3 {StockSharp.BusinessEntities.Order} StockSharp.BusinessEntities.Order
+ base {StockSharp.BusinessEntities.Order} Ecng.Common.Cloneable<StockSharp.BusinessEntities.Order> {StockSharp.BusinessEntities.Order}
Balance 0 decimal
CancelTime null System.DateTime?
Comment null string
DerivedOrder null StockSharp.BusinessEntities.Order
Direction Sell StockSharp.BusinessEntities.OrderDirections
ExecutionCondition PutInQueue StockSharp.BusinessEntities.OrderExecutionConditions
ExtensionInfo null System.Collections.Generic.IDictionary<object,object>
Id 0 long
+ Latency {00:00:00} System.TimeSpan
+ Messages {Ecng.Collections.SynchronizedList<string>} System.Collections.Generic.IList<string> {Ecng.Collections.SynchronizedList<string>}
+ Portfolio {SPBFUT00000} StockSharp.BusinessEntities.Portfolio
Price 927 decimal
RepoInfo null StockSharp.BusinessEntities.RepoOrderInfo
RpsInfo null StockSharp.BusinessEntities.RpsOrderInfo
- Security {GZ18000BX1@RTS} StockSharp.BusinessEntities.Security
+ BestAsk {Оффер 928 0} StockSharp.BusinessEntities.Quote
+ BestBid {Бид 979 0} StockSharp.BusinessEntities.Quote
+ BestPair {Бид 979 0} {Оффер 928 0} StockSharp.BusinessEntities.MarketDepthPair
Class "SPBOPT" string
ClosePrice 1245 decimal
Code "GZ18000BX1" string
Decimals 0 int
+ Exchange {РТС} StockSharp.BusinessEntities.Exchange
ExpiryDate null System.DateTime?
+ ExtensionInfo Count = 9 System.Collections.Generic.IDictionary<object,object> {System.Collections.Generic.Dictionary<object,object>}
HighPrice 0 decimal
Id "GZ18000BX1@RTS" string
+ LastTrade {StockSharp.BusinessEntities.Trade} StockSharp.BusinessEntities.Trade
LowPrice 0 decimal
MarginBuy 0 decimal
MarginSell 0 decimal
MaxPrice 0 decimal
MinLotSize 1 int
MinPrice 0 decimal
MinStepPrice 1 decimal
MinStepSize 1 decimal
Name "GAZR-12.11M141211PA 18000" string
OpenPrice 0 decimal
OptionType null StockSharp.BusinessEntities.OptionTypes?
SettlementDate null System.DateTime?
ShortName "" string
State Trading StockSharp.BusinessEntities.SecurityStates
Strike 18000 decimal
TheorPrice 0 decimal
+ Trader {StockSharp.Quik.QuikTrader} StockSharp.BusinessEntities.ITrader {StockSharp.Quik.QuikTrader}
Type Option StockSharp.BusinessEntities.SecurityTypes
UnderlyingSecurityId "GZZ1@RTS" string
Volatility 0 decimal
+ Non-Public members
State None StockSharp.BusinessEntities.OrderStates
Status null StockSharp.BusinessEntities.OrderStatus?
StopCondition null StockSharp.BusinessEntities.StopCondition
+ Time {1/1/0001 12:00:00 AM} System.DateTime
Trader null StockSharp.BusinessEntities.ITrader
TransactionId 0 long
Type Limit StockSharp.BusinessEntities.OrderTypes
Volume 1 decimal
+ Non-Public members