예제 #1
0
		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;
		}
예제 #2
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();
 }
예제 #3
0
 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;
 }
예제 #4
0
		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;
		}
예제 #5
0
		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;
 }
예제 #7
0
 public void SetDataSeries(DataSeries dataSeries)
 {
   this.dataSeries = dataSeries;
 }
예제 #8
0
 public void SetDataSeries(DataSeries dataSeries, byte? dataObjectType)
 {
   this.dataSeries = dataSeries;
   this.dataObjectType = dataObjectType;
   this.Init();
 }
예제 #9
0
 public DataSeriesViewer()
 {
   this.InitializeComponent();
   this.instrument = (Instrument) null;
   this.dataSeries = (DataSeries) null;
 }
예제 #10
0
		public DataSeriesEventLogger(Framework framework, DataSeries series) : base(framework, "DataSeriesEventLogger")
		{
			this.series = series;
		}
예제 #11
0
		public DataSeriesEventLogger(DataSeries series) : base(Framework.Current, "DataSeriesEventLogger")
		{
			this.series = series;
		}