FastQuant.DataSeriesNameHelper.GetName C# (CSharp) Méthode

GetName() public static méthode

public static GetName ( Instrument instrument, BarType barType, long barSize ) : string
instrument Instrument
barType BarType
barSize long
Résultat string
        public static string GetName(Instrument instrument, BarType barType, long barSize)=> $"{instrument.Symbol}.{instrument.Id}.{GetBarTypeAsString(barType, barSize)}";

Same methods

DataSeriesNameHelper::GetName ( Instrument instrument, byte type ) : string

Usage Example

        public override void DeleteDataSeries(Instrument instrument, byte type, BarType barType = BarType.Time, long barSize = 60)
        {
            DataSeries dataSeries;

            if (type == DataObjectType.Bar)
            {
                var iId = instrument.Id;
                dataSeries = GetBarDataSeriesInCache(instrument, barType, barSize, false);
                if (barType == BarType.Time && barSize <= TimeSpan.TicksPerDay / TimeSpan.TicksPerSecond)
                {
                    this.byIId_BSize[iId][(int)barSize] = null;
                }
                else
                {
                    this.byType_IId_BSize[type]      = this.byType_IId_BSize[type] ?? new IdArray <Dictionary <long, DataSeries> >();
                    this.byType_IId_BSize[type][iId] = this.byType_IId_BSize[type][iId] ?? new Dictionary <long, DataSeries>();
                    this.byType_IId_BSize[type][iId].Remove(barSize);
                }
                this.dataFile.Delete(DataSeriesNameHelper.GetName(instrument, barType, barSize));
            }
            else
            {
                dataSeries = this.byType[type][instrument.Id];
                if (dataSeries != null)
                {
                    this.byType[type].Remove(instrument.Id);
                }
                this.dataFile.Delete(DataSeriesNameHelper.GetName(instrument, type));
            }
        }
All Usage Examples Of FastQuant.DataSeriesNameHelper::GetName