当前位置: 首页>>代码示例>>C#>>正文


C# DataSeries类代码示例

本文整理汇总了C#中DataSeries的典型用法代码示例。如果您正苦于以下问题:C# DataSeries类的具体用法?C# DataSeries怎么用?C# DataSeries使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DataSeries类属于命名空间,在下文中一共展示了DataSeries类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Initialize

        protected override void Initialize()
        {
			#region Chart Features
				Add(new Plot(Color.White, PlotStyle.Line, ".panel range min"));  // invisible            
				Add(new Plot(Color.White, PlotStyle.Line, ".panel range max"));  // invisible
				Add(new Plot(Color.Cyan, PlotStyle.Line, "Stoch"));
			
				Plots[2].Pen.Width = 2;
			
				Add(new Line(Color.Gray, -60, "Lower Line"));
				Add(new Line(Color.Gray, 60, "Upper Line"));
				Add(new Line(Color.Gray, 0, "Zero Line"));
			
				Lines[0].Pen.DashStyle = DashStyle.Dash;
				Lines[1].Pen.DashStyle = DashStyle.Dash;
				Lines[2].Pen.Width = 2;
				
				CalculateOnBarClose	= false;
				Overlay				= false;
				PriceTypeSupported	= false;
				#endregion
						
			#region Series Initialization
				stoch1 = new DataSeries(this);
				stoch2 = new DataSeries(this);			
				JMAstoch1 = new DataSeries(this);
				JMAstoch2 = new DataSeries(this);
				#endregion
		}
开发者ID:ssg100,项目名称:ninjaindicators,代码行数:29,代码来源:Jurik+JMA+Double+Stoch.cs

示例2: Initialize

		/// <summary>
		/// This method is used to configure the indicator and is called once before any bar data is loaded.
		/// </summary>
		protected override void Initialize()
		{
			Add(new Plot(Color.Orange, Name));

			cummulative		= new DataSeries(this);
			moneyFlow		= new DataSeries(this);
		}
开发者ID:redrhino,项目名称:NinjaTrader.Base,代码行数:10,代码来源:ChaikinOscillator.cs

示例3: AggregateByRange

        void AggregateByRange()
        {
            var keys = new string[] { "<4", "4-8", ">8" };

            for (int i = 0; i < 3; i++)
            {
                var ds = new DataSeries()
                {
                    ItemsSource = SampleItem.CreateSampleData(100),
                    ValueBinding = new Binding("Value"),
                    Aggregate = Aggregate.Count,
                    Label = "Sample Group " + (i + 1).ToString(),
                    AggregateGroupSelector = RangeSelector
                };
                chart.Data.Children.Add(ds);
            }

            chart.Data.ItemNames = keys;

            // style chart
            chart.View.AxisY.MajorTickThickness = 0;
            chart.View.AxisY.MinorTickThickness = 0;
            chart.View.AxisY.AxisLine = new Line() { StrokeThickness = 0 };
            chart.View.AxisX.MajorGridStrokeThickness = 0;
            chart.View.AxisX.MinorGridStrokeThickness = 0;
            chart.View.AxisX.MajorTickThickness = 0;
            chart.View.AxisX.MinorTickThickness = 0;
        }
开发者ID:mdjabirov,项目名称:C1Decompiled,代码行数:28,代码来源:AggregateRange.xaml.cs

示例4: Initialize

		/// <summary>
		/// This method is used to configure the indicator and is called once before any bar data is loaded.
		/// </summary>
		protected override void Initialize()
		{
			Add(new Plot(Color.Blue, "EaseOfMovement"));
			Add(new Line(Color.DarkGray, 0, "ZeroLine"));

			emv = new DataSeries(this);
		}
开发者ID:redrhino,项目名称:NinjaTrader.Base,代码行数:10,代码来源:EaseOfMovement.cs

示例5: Initialize

		/// <summary>
		/// This method is used to configure the indicator and is called once before any bar data is loaded.
		/// </summary>
		protected override void Initialize()
		{
			Add(new Plot(Color.Orange,  "HMA"));

			Overlay				= true;	// Plots the indicator on top of price
			diffSeries			= new DataSeries(this);
		}
开发者ID:redrhino,项目名称:NinjaTrader.Base,代码行数:10,代码来源:HMA.cs

示例6: Chart

        public Chart()
        {
            InitializeComponent();
            _chartByCountry.ChartType = ChartType.Line;
            _chartByProduct.ChartType = ChartType.Line;
            dataServiceClient = new DataServiceRef.NORTHWNDEntities(new Uri("http://localhost:50297/NorthWindDataService.svc/"));
            nwndQuery = dataServiceClient.Invoices;
            #region DataForCountry-Sales Chart
            var cntryslschrtdt = GetSalesByCountry(nwndQuery.ToArray().ToList());
            DataSeries amtsers = new DataSeries();
            amtsers.ValuesSource = cntryslschrtdt.ConvertAll(e => e.Amount).ToArray();
            _chartByCountry.Data.Children.Add(amtsers);
            var xvals = cntryslschrtdt.ConvertAll(e => e.Item).Distinct().ToArray();
            _chartByCountry.Data.ItemNames = xvals;
            _chartByCountry.View.AxisX.Title = CreateTextBlock("Countries");
            _chartByCountry.View.AxisX.AnnoAngle = 45;
            _chartByCountry.View.AxisY.Title = CreateTextBlock("Sales");
            #endregion

            #region DataForProduct-Sales Chart
            var pdctslchrtdt = GetSalesByProduct(nwndQuery.ToArray().ToList());
            DataSeries amtserspd = new DataSeries();
            amtserspd.ValuesSource = pdctslchrtdt.ConvertAll(e => e.Amount).ToArray();
            _chartByProduct.Data.Children.Add(amtserspd);
            var xvalspd = pdctslchrtdt.ConvertAll(e => e.Item).Distinct().ToArray();
            _chartByProduct.Data.ItemNames = xvalspd;
            _chartByProduct.View.AxisX.Title = CreateTextBlock("Product");
            _chartByProduct.View.AxisX.AnnoAngle = 45;
            _chartByProduct.View.AxisY.Title = CreateTextBlock("Sales");
            #endregion
        }
开发者ID:mdjabirov,项目名称:C1Decompiled,代码行数:31,代码来源:Chart.xaml.cs

示例7: GomOnStartUp

		protected override void GomOnStartUp()
		{
			dsOpen = new DataSeries(this, MaximumBarsLookBack.Infinite);
			dsHigh = new DataSeries(this, MaximumBarsLookBack.Infinite);
			dsLow = new DataSeries(this, MaximumBarsLookBack.Infinite);
			dsClose = new DataSeries(this, MaximumBarsLookBack.Infinite);
		}
开发者ID:ssg100,项目名称:ninjaindicators,代码行数:7,代码来源:GomCD.cs

示例8: Initialize

		/// <summary>
		/// This method is used to configure the indicator and is called once before any bar data is loaded.
		/// </summary>
		protected override void Initialize()
		{
			Add(new Plot(new Pen(Color.Blue, 2), PlotStyle.Bar, "BOP"));

			bop					= new DataSeries(this);
			Overlay				= false;
		}
开发者ID:redrhino,项目名称:NinjaTrader.Base,代码行数:10,代码来源:BOP.cs

示例9: Initialize

		/// <summary>
		/// This method is used to configure the indicator and is called once before any bar data is loaded.
		/// </summary>
		protected override void Initialize()
		{
			Add(new Plot(Color.Orange, "TSF"));
	
			y					= new DataSeries(this);
			Overlay				= true;
		}
开发者ID:redrhino,项目名称:NinjaTrader.Base,代码行数:10,代码来源:TSF.cs

示例10: Chart

        public Chart()
        {
            InitializeComponent();

            // Clear previous data
            C1Chart1.Data.Children.Clear();
            //IList<string> ProductNames = new List<string>();
            //IList<int> PriceX = new List<int>(); ;
            //using (var ctx = new FinancasDataContext(conn))
            //{               
            //    IQueryable<Cadastro> query = ctx.Cadastros.OrderBy(cadastro => Name);

            //    foreach (var item in query)
            //    {
            //        ProductNames.Add(item.Descricao);
            //        PriceX.Add(Convert.ToInt32(item.Valor));
            //    }
            //}
            //            // Add Data
            string[] ProductNames = { "Café", "Almoço", "Combustivel", 
     "Lazer", "Curso", "Condução", "Material", "Academia" };
            int[] PriceX = { 80, 400, 20, 60, 150, 300, 130, 500 };
            // create single series for product price
            DataSeries ds1 = new DataSeries();
            ds1.Label = "Price X";
            //set price data
            ds1.ValuesSource = PriceX;
            // add series to the chart
            C1Chart1.Data.Children.Add(ds1);
            // add item names
            C1Chart1.Data.ItemNames = ProductNames;
            // Set chart type
            C1Chart1.ChartType = ChartType.Bar;
        }
开发者ID:programadriano,项目名称:finance,代码行数:34,代码来源:Chart.xaml.cs

示例11: DataSeriesEvaluator

 public DataSeriesEvaluator(DataSeries series_)
 {
   m_name = series_.Name;
   m_dataType = series_.DataType;
   m_all = series_;
   Evaluate(series_.Dates[0], series_.Dates[series_.Dates.Length - 1]);
 }
开发者ID:heimanhon,项目名称:researchwork,代码行数:7,代码来源:DataSeriesEvaluator.cs

示例12: Initialize

		/// <summary>
		/// This method is used to configure the indicator and is called once before any bar data is loaded.
		/// </summary>
		protected override void Initialize()
		{
			Add(new Line(Color.DarkGray, 0, "Zero line"));
			Add(new Plot(Color.Orange, Name));
			
			smoothEma = new DataSeries(this);
		}
开发者ID:redrhino,项目名称:NinjaTrader.Base,代码行数:10,代码来源:PriceOscillator.cs

示例13: CalculateIndicators

 protected void CalculateIndicators()
 {
     // Init indicators
     momentumSeries = Momentum.Series(Close, momentumPeriod.ValueInt);
     DataSeries stochDSeries = StochD.Series(Bars, stochDSmooth.ValueInt, stochDPeriod.ValueInt);
     DataSeries stochKSeries = StochK.Series(Bars, stochKPeriod.ValueInt);
 }
开发者ID:eburtsev,项目名称:traderobotics,代码行数:7,代码来源:MomentumStoch.cs

示例14: OverlappingMarkedZones

        public OverlappingMarkedZones()
        {
            InitializeComponent();
            DataSeries series1 = new DataSeries()
            {
                new DataPoint(145),
                new DataPoint(132),
                new DataPoint(164),
                new DataPoint(187),
                new DataPoint(186),
                new DataPoint(131),
                new DataPoint(173),
                new DataPoint(172),
                new DataPoint(140),
                new DataPoint(129),
                new DataPoint(158),
                new DataPoint(149)
            };

            series1.Definition = new LineSeriesDefinition();
            series1.Definition.Appearance.Fill = new SolidColorBrush(Colors.Black);
            series1.Definition.Appearance.Stroke = new SolidColorBrush(Colors.Black);
            series1.Definition.Appearance.PointMark.Stroke = new SolidColorBrush(Colors.Black);
            radChart.DefaultView.ChartArea.DataSeries.Add(series1);
        }
开发者ID:JoelWeber,项目名称:xaml-sdk,代码行数:25,代码来源:OverlappingMarkedZones.xaml.cs

示例15: Initialize

        /// <summary>
        /// This method is used to configure the indicator and is called once before any bar data is loaded.
        /// </summary>
        protected override void Initialize()
        {
            Add(new Plot(new Pen(Color.LightSteelBlue, 2), "Macd"));					// plot 0
			Add(new Plot(new Pen(Color.RoyalBlue, 2), PlotStyle.Hash, "MacdUp"));		// plot 1 
			Add(new Plot(new Pen(Color.DarkRed, 2), PlotStyle.Hash, "MacdDn"));			// plot 2
			Add(new Plot(new Pen(Color.Yellow, 2), PlotStyle.Hash, "MacdNeutral"));		// plot 3
			Add(new Plot(new Pen(Color.DarkViolet, 2), "Avg"));							// plot 4
			Add(new Plot(new Pen(Color.DimGray, 2), PlotStyle.Bar, "Diff"));			// plot 5
			Add(new Plot(new Pen(Color.Teal, 2), PlotStyle.Line, "ADX"));				// plot 6
			
			Plots[0].Pen.Width = 3;
			Plots[1].Pen.Width = 6;
			Plots[2].Pen.Width = 6;
			Plots[3].Pen.Width = 6;
			Plots[4].Pen.Width = 1;
			Plots[5].Pen.Width = 2;
			Plots[6].Pen.Width = 2;
			
			Plots[4].Pen.DashStyle = DashStyle.Dash;
			
			fastEma = new DataSeries(this);
			macdAvg2 = new DataSeries(this);
			diffArr = new DataSeries(this);
			signal = new DataSeries(this);
			
			Overlay				= false;
            PriceTypeSupported	= true;
        }
开发者ID:redrhino,项目名称:NinjaTrader.Base,代码行数:31,代码来源:MACD_ZeroLag_Colors.cs


注:本文中的DataSeries类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。