本文整理汇总了C#中Instrument.GetSymbol方法的典型用法代码示例。如果您正苦于以下问题:C# Instrument.GetSymbol方法的具体用法?C# Instrument.GetSymbol怎么用?C# Instrument.GetSymbol使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Instrument
的用法示例。
在下文中一共展示了Instrument.GetSymbol方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetInstrumentInfoForCTPZQ
private void GetInstrumentInfoForCTPZQ(Instrument inst, out string apiSymbol, out string apiExchange, out double apiTickSize,out string yahooSymbol)
{
// 如果设置了altSymbol取到600000;没设,取到600000.SS
apiSymbol = inst.GetSymbol(Name);
apiExchange = inst.GetSecurityExchange(Name);
apiTickSize = inst.TickSize;
apiSymbol = GetApiSymbol(apiSymbol);
yahooSymbol = GetYahooSymbol(apiSymbol, apiExchange);
CThostFtdcInstrumentField _Instrument;
if (_dictInstruments.TryGetValue(yahooSymbol, out _Instrument))
{
apiSymbol = _Instrument.InstrumentID;
apiExchange = _Instrument.ExchangeID;
apiTickSize = _Instrument.PriceTick;
}
}
示例2: GetInstrumentInfoForCTP
private void GetInstrumentInfoForCTP(Instrument inst, out string apiSymbol, out string apiExchange, out double apiTickSize)
{
apiSymbol = inst.GetSymbol(Name);
apiExchange = inst.GetSecurityExchange(Name);
apiTickSize = inst.TickSize;
CThostFtdcInstrumentField _Instrument;
if (_dictInstruments.TryGetValue(apiSymbol, out _Instrument))
{
apiSymbol = _Instrument.InstrumentID;
apiExchange = _Instrument.ExchangeID;
apiTickSize = _Instrument.PriceTick;
}
}