или не поправили или опять ошибка вернулась. У меня в QUIKE иногда дважды приходят отмена ордеров поэтому ловил только его. Версия 4.1.1
Вот код.
Code
string PStr;
long TId;
void OnOrderChanged(IEnumerable<StockSharp.BusinessEntities.Order> Orders)
{
foreach (Order _Order in Orders)
{
if (_Order.IsCanceled())
{
if (_Order.Id == TId)
{
Console.WriteLine("Prev " + PStr);
Console.WriteLine("Now "+DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fffff") + "\r\n" +
"balance = " + _Order.Balance + "\r\n" +
"comment = " + _Order.Comment + "\r\n" +
"derived Order = " + _Order.DerivedOrder + "\r\n" +
"direction = " + _Order.Direction + "\r\n" +
"execution condition = " + _Order.ExecutionCondition + "\r\n" +
"expiry = " + _Order.ExpiryDate + "\r\n" +
"extension info = " + _Order.ExtensionInfo + "\r\n" +
"id = " + _Order.Id + "\r\n" +
"isDisposed = " + _Order.IsDisposed + "\r\n" +
"isSystem = " + _Order.IsSystem + "\r\n" +
"isTrace = " + _Order.IsTrace + "\r\n" +
"lastchangetime = " + _Order.LastChangeTime+ "\r\n" +
"latency = " + _Order.Latency + "\r\n" +
"messages = " + string.Join(" | ", _Order.Messages) + "\r\n" +
"portfolio = " + _Order.Portfolio + "\r\n" +
"price = " + _Order.Price + "\r\n" +
"repo info = " + _Order.RepoInfo + "\r\n" +
"rps info = " + _Order.RpsInfo + "\r\n" +
"security= " + _Order.Security + "\r\n" +
"state = " + _Order.State + "\r\n" +
"status = " + _Order.Status + "\r\n" +
"stop condition = " + _Order.StopCondition + "\r\n" +
"time = " + _Order.Time.ToString("yyyy-MM-dd HH:mm:ss.fffff") + "\r\n" +
"trader = " + _Order.Trader + "\r\n" +
"transaction id = " + _Order.TransactionId + "\r\n" +
"type = " + _Order.Type + "\r\n" +
"volume = " + _Order.Volume + "\r\n");
}
TId = _Order.Id;
PStr=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fffff") + "\r\n" +
"balance = " + _Order.Balance + "\r\n" +
"comment = " + _Order.Comment + "\r\n" +
"derived Order = " + _Order.DerivedOrder + "\r\n" +
"direction = " + _Order.Direction + "\r\n" +
"execution condition = " + _Order.ExecutionCondition + "\r\n" +
"expiry = " + _Order.ExpiryDate + "\r\n" +
"extension info = " + _Order.ExtensionInfo + "\r\n" +
"id = " + _Order.Id + "\r\n" +
"isDisposed = " + _Order.IsDisposed + "\r\n" +
"isSystem = " + _Order.IsSystem + "\r\n" +
"isTrace = " + _Order.IsTrace + "\r\n" +
"lastchangetime = " + _Order.LastChangeTime+ "\r\n" +
"latency = " + _Order.Latency + "\r\n" +
"messages = " + string.Join(" | ", _Order.Messages) + "\r\n" +
"portfolio = " + _Order.Portfolio + "\r\n" +
"price = " + _Order.Price + "\r\n" +
"repo info = " + _Order.RepoInfo + "\r\n" +
"rps info = " + _Order.RpsInfo + "\r\n" +
"security= " + _Order.Security + "\r\n" +
"state = " + _Order.State + "\r\n" +
"status = " + _Order.Status + "\r\n" +
"stop condition = " + _Order.StopCondition + "\r\n" +
"time = " + _Order.Time.ToString("yyyy-MM-dd HH:mm:ss.fffff") + "\r\n" +
"trader = " + _Order.Trader + "\r\n" +
"transaction id = " + _Order.TransactionId + "\r\n" +
"type = " + _Order.Type + "\r\n" +
"volume = " + _Order.Volume + "\r\n";
}
// Дальше собственно обработчик
Вот результат.
Prev 2012-06-14 17:06:35.71875
balance = 1
comment =
derived Order =
direction = Buy
execution condition = PutInQueue
expiry =
extension info = System.Collections.Generic.Dictionary`2[System.Object,System.Object]
id = 8065253846
isDisposed = False
isSystem = True
isTrace = False
lastchangetime = 14.06.2012 17:06:27
latency = 00:00:00.1752975
messages = Заявка, с биржевым номером 8065253846, успешно зарегистрирована. | Заявка, с номером 8065253846 снята. Снятое количество: 1
portfolio =
price = 130315
repo info =
rps info =
security= RIM2@RTS
state = Done
status = Accepted
stop condition =
time = 2012-06-14 17:06:27.00000
trader = StockSharp.Quik.QuikTrader
transaction id = 61428467
type = Limit
volume = 1
Now 2012-06-14 17:06:35.92187
balance = 1
comment =
derived Order =
direction = Buy
execution condition = PutInQueue
expiry =
extension info = System.Collections.Generic.Dictionary`2[System.Object,System.Object]
id = 8065253846
isDisposed = False
isSystem = True
isTrace = False
lastchangetime = 14.06.2012 17:06:27
latency = 00:00:00.1752975
messages = Заявка, с биржевым номером 8065253846, успешно зарегистрирована. | Заявка, с номером 8065253846 снята. Снятое количество: 1
portfolio =
price = 130315
repo info =
rps info =
security= RIM2@RTS
state = Done
status = Accepted
stop condition =
time = 2012-06-14 17:06:27.00000
trader = StockSharp.Quik.QuikTrader
transaction id = 61428467
type = Limit
volume = 1