本文整理汇总了C#中StockSharp.InteractiveBrokers.Native.IBSocket.ReadNullDecimal方法的典型用法代码示例。如果您正苦于以下问题:C# IBSocket.ReadNullDecimal方法的具体用法?C# IBSocket.ReadNullDecimal怎么用?C# IBSocket.ReadNullDecimal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StockSharp.InteractiveBrokers.Native.IBSocket
的用法示例。
在下文中一共展示了IBSocket.ReadNullDecimal方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReadOpenOrder
//.........这里部分代码省略.........
var portfolioName = socket.ReadStr();
if (!portfolioName.IsEmpty())
ibCon.Volatility.ClearingPortfolio = portfolioName;
ibCon.Volatility.ClearingIntent = socket.ReadStr();
}
if (version >= ServerVersions.V31)
{
var isOpenOrCloseStr = socket.ReadStr();
ibCon.Volatility.ShortSale.IsOpenOrClose = isOpenOrCloseStr == "?" ? (bool?)null : isOpenOrCloseStr.To<int>() == 1;
ibCon.Volatility.IsShortSale = socket.ReadBool();
ibCon.Volatility.ShortSale.Slot = (IBOrderCondition.ShortSaleSlots)socket.ReadInt();
ibCon.Volatility.ShortSale.Location = socket.ReadStr();
}
}
}
ibCon.Volatility.ContinuousUpdate = socket.ReadBool();
if (socket.ServerVersion == ServerVersions.V26)
{
ibCon.StockRangeLower = socket.ReadDecimal();
ibCon.StockRangeUpper = socket.ReadDecimal();
}
ibCon.Volatility.IsAverageBestPrice = socket.ReadBool();
}
if (version >= ServerVersions.V13)
ibCon.TrailStopPrice = socket.ReadDecimal();
if (version >= ServerVersions.V30)
ibCon.TrailStopVolumePercentage = socket.ReadNullDecimal();
if (version >= ServerVersions.V14)
{
ibCon.Combo.BasisPoints = socket.ReadDecimal();
ibCon.Combo.BasisPointsType = socket.ReadInt();
ibCon.Combo.LegsDescription = socket.ReadStr();
}
if (version >= ServerVersions.V29)
{
var comboLegsCount = socket.ReadInt();
if (comboLegsCount > 0)
{
//contract.m_comboLegs = new Vector(comboLegsCount);
for (var i = 0; i < comboLegsCount; ++i)
{
//int conId =
socket.ReadInt();
//int ratio =
socket.ReadInt();
//String action =
socket.ReadStr();
//String exchange =
socket.ReadStr();
//int openClose =
socket.ReadInt();
//int shortSaleSlot =
socket.ReadInt();
//String designatedLocation =
socket.ReadStr();
//int exemptCode =
socket.ReadInt();
示例2: ReadCommissionReport
private void ReadCommissionReport(IBSocket socket)
{
var tradeId = socket.ReadStr();
var value = socket.ReadDecimal();
var currency = socket.ReadCurrency();
var pnl = socket.ReadNullDecimal();
var yield = socket.ReadNullDecimal();
var redemptionDate = socket.ReadNullDateTime("yyyyMMdd");
var secId = _secIdByTradeIds.TryGetValue2(tradeId);
if (secId == null)
return;
// TODO
//SendOutMessage(new ExecutionMessage
//{
// ExecutionType = ExecutionTypes.Trade,
// TradeStringId = tradeId,
// Commission = value,
// SecurityId = secId.Value,
//});
}