ProjectsForTest/WinForm.NET5TeeChart-NET-Pro-Samples/Functions/Function_SmoothedMovingAverage.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using Steema.TeeChart.Functions;
using Steema.TeeChart.Styles;
using System;
using System.Collections.Generic;
using System.Text;
namespace Steema.TeeChart.Samples
{
public class Function_SmoothedMovingAverage : BaseForm
{
private System.Windows.Forms.NumericUpDown numericUpDown1;
private System.Windows.Forms.Label label1;
public Function_SmoothedMovingAverage() : base()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Candle series = new Candle(tChart1.Chart);
series.FillSampleValues();
Line line1 = new Line(tChart1.Chart);
line1.Title = "Mov Avg";
Line line2 = new Line(tChart1.Chart);
line2.Title = "Smooth Mov Avg";
line1.DataSource = series;
line1.Function = new MovingAverage();
line1.Function.Period = 3;
line2.DataSource = series;
line2.Function = new SmoothedMovAvgFunction();
line2.Function.Period = 3;
}
private void numericUpDown1_ValueChanged(object sender, EventArgs e)
{
tChart1[1].Function.Period = Convert.ToInt32(numericUpDown1.Value);
tChart1[2].Function.Period = Convert.ToInt32(numericUpDown1.Value);
}
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Function_SmoothedMovingAverage));
this.label1 = new System.Windows.Forms.Label();
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.panel1.SuspendLayout();
this.chartContainer.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
this.SuspendLayout();
//
// textBox1
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。