本文整理汇总了C#中QuickFix.Fields.ClOrdID类的典型用法代码示例。如果您正苦于以下问题:C# QuickFix.Fields.ClOrdID类的具体用法?C# QuickFix.Fields.ClOrdID怎么用?C# QuickFix.Fields.ClOrdID使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
QuickFix.Fields.ClOrdID类属于命名空间,在下文中一共展示了QuickFix.Fields.ClOrdID类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckIsInGroupTest
public void CheckIsInGroupTest()
{
QuickFix.DataDictionary.DataDictionary dd = new QuickFix.DataDictionary.DataDictionary("../../../spec/fix/FIX44.xml");
QuickFix.DataDictionary.DDGrp g = dd.Messages["B"].GetGroup(33);
QuickFix.Fields.Text textField = new QuickFix.Fields.Text("woot");
QuickFix.Fields.ClOrdID clOrdIdField = new QuickFix.Fields.ClOrdID("not woot");
Assert.DoesNotThrow(delegate() { dd.CheckIsInGroup(textField, g, "B"); });
Assert.Throws(typeof(TagNotDefinedForMessage), delegate { dd.CheckIsInGroup(clOrdIdField, g, "B"); });
}
示例2: Set
public void Set(QuickFix.Fields.ClOrdID val)
{
this.ClOrdID = val;
}
示例3: OnMessage
//receive fills, working orders, order rejects
public void OnMessage(QuickFix.FIX42.ExecutionReport message, QuickFix.SessionID session)
{
//parseMessage(message, session);
try
{
QuickFix.Fields.ExecType et = new QuickFix.Fields.ExecType();
QuickFix.Fields.ExecTransType ett = new QuickFix.Fields.ExecTransType();
QuickFix.Fields.ClOrdID coid = new QuickFix.Fields.ClOrdID();
//Friday, December 11, 2009 10:29:27 AM Added parentheses to encapsulate OR
//remove hold on orders if order was rejected
if (message.IsSetField(coid) &&
(message.GetField(et).getValue() == QuickFix.Fields.ExecType.FILL ||
message.GetField(et).getValue() == QuickFix.Fields.ExecType.REJECTED))
{
updateOrderMgmt(message.GetField(coid).getValue().ToString());
}
//end modified code
if (message.IsSetField(et))
{
//capture fill to update position
if ((message.GetField(et).getValue() == QuickFix.Fields.ExecType.FILL ||
message.GetField(et).getValue() == QuickFix.Fields.ExecType.PARTIAL_FILL) &&
message.MultiLegReportingType.getValue() != QuickFix.Fields.MultiLegReportingType.MULTI_LEG_SECURITY)
{
updateDisplay("execution received");
posTableUpdate(message, session);
}
//capture working orders and cancel for flatten
if (message.GetField(et).getValue() == QuickFix.Fields.ExecType.RESTATED &&
message.GetField(ett).getValue() == QuickFix.Fields.ExecTransType.STATUS)
{
string MGT = null;
QuickFix.Fields.SenderSubID subID = new QuickFix.Fields.SenderSubID();
if (message.Header.IsSetField(subID))
{
MGT = message.Header.GetField(subID).ToString();
orderCancel(MGT, message.OrderID.ToString());
}
}
}
}
catch (Exception ex)
{
updateDisplay("QuickFIX Error");
log.WriteLog(ex.ToString());
}
}