Пример #1
0
        public static bool TryGetBarTypeSize(string seriesName, out BarType barType, out long barSize)
        {
            DataSeriesInfo dataSeriesInfo = DataSeriesHelper.GetDataSeriesInfo(seriesName);

            barType = dataSeriesInfo.BarType;
            barSize = dataSeriesInfo.BarSize;
            return(dataSeriesInfo.DataType == DataType.Bar);
        }
Пример #2
0
        public static string SeriesNameToString(string seriesName)
        {
            DataSeriesInfo dataSeriesInfo = DataSeriesHelper.GetDataSeriesInfo(seriesName);

            switch (dataSeriesInfo.DataType)
            {
            case DataType.Bar:
                return(string.Format("{0} {1}", "Bar", DataSeriesHelper.BarTypeSizeToString(dataSeriesInfo.BarType, dataSeriesInfo.BarSize)));

            case DataType.MarketDepth:
                return(dataSeriesInfo.DataType.ToString());

            default:
                return(dataSeriesInfo.Suffix);
            }
        }