本文整理汇总了C#中Symbol.ToLower方法的典型用法代码示例。如果您正苦于以下问题:C# Symbol.ToLower方法的具体用法?C# Symbol.ToLower怎么用?C# Symbol.ToLower使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symbol
的用法示例。
在下文中一共展示了Symbol.ToLower方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LeanDataWriter
/// <summary>
/// Create a new lean data writer to this base data directory.
/// </summary>
/// <param name="symbol">Symbol string</param>
/// <param name="dataDirectory">Base data directory</param>
/// <param name="type">Security type</param>
/// <param name="resolution">Resolution of the desired output data</param>
/// <param name="market">Market for this security</param>
/// <param name="dataType">Write the data to trade files</param>
public LeanDataWriter(SecurityType type, Resolution resolution, Symbol symbol, string dataDirectory, string market, TickType dataType = TickType.Trade)
{
_securityType = type;
_dataDirectory = dataDirectory;
_resolution = resolution;
_symbol = symbol.ToLower();
_market = market.ToLower();
_dataType = dataType;
// All fx data is quote data.
if (_securityType == SecurityType.Forex || _securityType == SecurityType.Cfd)
{
_dataType = TickType.Quote;
}
// Can only process Fx and equity for now
if (_securityType != SecurityType.Equity && _securityType != SecurityType.Forex && _securityType != SecurityType.Cfd)
{
throw new Exception("Sorry this security type is not yet supported by the LEAN data writer: " + _securityType);
}
}