protected override void ResendMessage(FIXTMessage1_1 textMessage) { var mbtMsg = (FIXMessage4_2)textMessage; if (SyncTicks.Enabled && !IsRecovered && mbtMsg.Type == "8") { switch (mbtMsg.OrderStatus) { case "E": case "6": case "A": var symbolInfo = Factory.Symbol.LookupSymbol(mbtMsg.Symbol); var tickSync = SyncTicks.GetTickSync(symbolInfo.BinaryIdentifier); //if (symbolInfo.FixSimulationType == FIXSimulationType.BrokerHeldStopOrder && // mbtMsg.ExecutionType == "D") // restated //{ // // Ignored order count. //} //else //{ // tickSync.AddPhysicalOrder("resend"); //} break; case "2": case "1": symbolInfo = Factory.Symbol.LookupSymbol(mbtMsg.Symbol); tickSync = SyncTicks.GetTickSync(symbolInfo.BinaryIdentifier); //tickSync.AddPhysicalFill("resend"); break; } } ResendMessageProtected(textMessage); }
protected override void RemoveTickSync(FIXTMessage1_1 textMessage) { var mbtMsg = (FIXMessage4_2)textMessage; if (SyncTicks.Enabled && mbtMsg.Type == "8") { switch (mbtMsg.OrderStatus) { case "E": case "6": case "0": { var symbolInfo = Factory.Symbol.LookupSymbol(mbtMsg.Symbol); var tickSync = SyncTicks.GetTickSync(symbolInfo.BinaryIdentifier); tickSync.RemovePhysicalOrder("offline"); } break; case "A": if (mbtMsg.ExecutionType == "D") { // Is it a Forex order? var symbolInfo = Factory.Symbol.LookupSymbol(mbtMsg.Symbol); var tickSync = SyncTicks.GetTickSync(symbolInfo.BinaryIdentifier); tickSync.RemovePhysicalOrder("offline"); } break; case "2": case "1": { var symbolInfo = Factory.Symbol.LookupSymbol(mbtMsg.Symbol); var tickSync = SyncTicks.GetTickSync(symbolInfo.BinaryIdentifier); tickSync.RemovePhysicalFill("offline"); } break; } } }