如何使用Microsoft Chart Control绘制TEMA指示器

时间:2015-09-02 15:23:26

标签: .net winforms charts microsoft-chart-controls dundas

我添加了两个系列:Series1(CandeleStick),Series2(Line)。我添加了积分和FinancialFormula:

 public Form1() {
            InitializeComponent();
            chart1.Series[0].Points.Add(24.00, 25.00, 25.00, 24.875);
            chart1.Series[0].Points.Add(23.625, 25.125, 24.00, 24.875);
            chart1.Series[0].Points.Add(26.25, 28.25, 26.75, 27.00);
            chart1.Series[0].Points.Add(26.50, 27.875, 26.875, 27.25);
            chart1.Series[0].Points.Add(26.375, 27.50, 27.375, 26.75);
            chart1.Series[0].Points.Add(25.75, 26.875, 26.75, 26.00);
            chart1.Series[0].Points.Add(25.75, 26.75, 26.125, 26.25);
            chart1.Series[0].Points.Add(25.75, 26.375, 26.375, 25.875);
            chart1.Series[0].Points.Add(24.875, 26.125, 26.00, 25.375);
            chart1.Series[0].Points.Add(25.125, 26.00, 25.625, 25.75);
            chart1.Series[0].Points.Add(25.875, 26.625, 26.125, 26.375);
            chart1.Series[0].Points.Add(26.25, 27.375, 26.25, 27.25);
            chart1.Series[0].Points.Add(26.875, 27.25, 27.125, 26.875);
            chart1.Series[0].Points.Add(26.375, 27.125, 27.00, 27.125);
            chart1.Series[0].Points.Add(26.75, 27.875, 26.875, 27.75);
            chart1.Series[0].Points.Add(26.75, 28.375, 27.50, 27.00);
            chart1.Series[0].Points.Add(26.875, 28.125, 27.00, 28.00);
            chart1.Series[0].Points.Add(26.25, 27.875, 27.75, 27.625);
            chart1.Series[0].Points.Add(27.50, 28.75, 27.75, 28.00);
            chart1.Series[0].Points.Add(25.75, 28.25, 28.00, 27.25);
            chart1.Series[0].Points.Add(26.375, 27.50, 27.50, 26.875);
            chart1.Series[0].Points.Add(25.75, 27.50, 26.375, 26.25);
            chart1.Series[0].Points.Add(24.75, 27.00, 26.50, 25.25);
            chart1.DataManipulator.IsStartFromFirst = true;
            chart1.DataManipulator.FinancialFormula(FinancialFormula.TripleExponentialMovingAverage, "5", "Series1:Y4", "Series2:Y");
        }

但我无法得到预期的结果。只是排在零水平。我做错了什么?

1 个答案:

答案 0 :(得分:1)

您的数据实际上就在那里。您需要针对轴刻度以及每个系列使用的轴调整MinimumMaximumAxisYAxisY2

enter image description here

编辑:为了测试,如果您只是重复自己的价格模式:

enter image description here