internal DataSeriesObject(DataSeries series, DateTime dateTime1, DateTime dateTime2, IEventQueue queue) { this.series = series; this.queue = queue; if (dateTime1 == DateTime.MinValue || dateTime1 < series.DateTime1) { this.index1 = 0L; } else { this.index1 = series.GetIndex(dateTime1, SearchOption.Next); } if (dateTime2 == DateTime.MaxValue || dateTime2 > series.DateTime2) { this.index2 = series.count - 1L; } else { this.index2 = series.GetIndex(dateTime2, SearchOption.Prev); } this.current = this.index1; this.obj = series[this.current]; this.progressDelta = (int)Math.Ceiling((double)this.Count / 100.0); this.progressCount = this.progressDelta; this.progressPercent = 0; }
public DataSeriesViewItem(DataSeries dataSeries, byte dataType, SmartQuant.BarType? barType = null, long? barSize = null) : base(new string[4], 0) { this.dataSeries = dataSeries; this.DataType = dataType; this.BarType = barType; this.BarSize = barSize; this.Update(); }
public static string Convert(DataSeries series) { byte dataType = DataSeriesNameHelper.GetDataType(series); if ((int) dataType != 6) return DataTypeConverter.Convert(dataType, new BarType?(), new long?()); BarType barType; long barSize; if (DataSeriesNameHelper.TryGetBarTypeSize(series, out barType, out barSize)) return DataTypeConverter.Convert(dataType, new BarType?(barType), new long?(barSize)); return string.Empty; }
public DataSeries GetSeries(string fileName, string seriesName) { DataFile file = this.GetFile(fileName, FileMode.OpenOrCreate); DataSeries dataSeries = (DataSeries)file.Get(seriesName); if (dataSeries == null) { dataSeries = new DataSeries(seriesName); file.Write(seriesName, dataSeries); } return dataSeries; }
public DataSeriesIterator(DataSeries series, long index1 = -1L, long index2 = -1L) { this.series = series; if (index1 == -1L) { this.index1 = 0L; } else { this.index1 = index1; } if (index2 == -1L) { this.index2 = series.count - 1L; } else { this.index2 = index2; } this.current = index1; }
public InstrumentDataSeries(Instrument instrument, DataSeries dataSeries, DataTypeItem dataTypeItem) { this.Instrument = instrument; this.DataSeries = dataSeries; this.DataTypeItem = dataTypeItem; }
public void SetDataSeries(DataSeries dataSeries) { this.dataSeries = dataSeries; }
public void SetDataSeries(DataSeries dataSeries, byte? dataObjectType) { this.dataSeries = dataSeries; this.dataObjectType = dataObjectType; this.Init(); }
public DataSeriesViewer() { this.InitializeComponent(); this.instrument = (Instrument) null; this.dataSeries = (DataSeries) null; }
public DataSeriesEventLogger(Framework framework, DataSeries series) : base(framework, "DataSeriesEventLogger") { this.series = series; }
public DataSeriesEventLogger(DataSeries series) : base(Framework.Current, "DataSeriesEventLogger") { this.series = series; }