We checked your sample code with our sample values, but we still find value mismatch. FYI we have attached excel file with new values. Following is the source code we used:
Code: Select all
public Form2()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Candle candle = new Candle(tChart1.Chart);
candle.Add(DateTime.Parse("11/07/1994"), 1283, 1283, 1283, 1283);
candle.Add(DateTime.Parse("11/08/1994"), 1281, 1281, 1281, 1281);
candle.Add(DateTime.Parse("11/09/1994"), 1259, 1259, 1259, 1259);
candle.Add(DateTime.Parse("11/10/1994"), 1241, 1241, 1241, 1241);
candle.Add(DateTime.Parse("11/11/1994"), 1223, 1223, 1223, 1223);
candle.Add(DateTime.Parse("11/14/1994"), 1210, 1210, 1210, 1210);
candle.Add(DateTime.Parse("11/15/1994"), 1208, 1208, 1208, 1208);
candle.Add(DateTime.Parse("11/16/1994"), 1232, 1232, 1232, 1232);
candle.Add(DateTime.Parse("11/17/1994"), 1247, 1247, 1247, 1247);
candle.Add(DateTime.Parse("11/21/1994"), 1248, 1248, 1248, 1248);
candle.Add(DateTime.Parse("11/22/1994"), 1236, 1236, 1236, 1236);
candle.Add(DateTime.Parse("11/23/1994"), 1221, 1221, 1221, 1221);
candle.Add(DateTime.Parse("11/24/1994"), 1230, 1230, 1230, 1230);
candle.Add(DateTime.Parse("11/25/1994"), 1246, 1246, 1246, 1246);
candle.Add(DateTime.Parse("11/29/1994"), 1252, 1252, 1252, 1252);
candle.Add(DateTime.Parse("11/30/1994"), 1246, 1246, 1246, 1246);
candle.Add(DateTime.Parse("12/01/1994"), 1240, 1240, 1240, 1240);
candle.Add(DateTime.Parse("12/02/1994"), 1233, 1233, 1233, 1233);
candle.Add(DateTime.Parse("12/05/1994"), 1229, 1229, 1229, 1229);
candle.Add(DateTime.Parse("12/06/1994"), 1215, 1215, 1215, 1215);
candle.Add(DateTime.Parse("12/07/1994"), 1194, 1194, 1194, 1194);
candle.Add(DateTime.Parse("12/08/1994"), 1177, 1177, 1177, 1177);
candle.Add(DateTime.Parse("12/09/1994"), 1182, 1182, 1182, 1182);
candle.Add(DateTime.Parse("12/12/1994"), 1153, 1153, 1153, 1153);
candle.Add(DateTime.Parse("12/13/1994"), 1136, 1136, 1136, 1136);
candle.Add(DateTime.Parse("12/14/1994"), 1147, 1147, 1147, 1147);
candle.Add(DateTime.Parse("12/15/1994"), 1161, 1161, 1161, 1161);
FastLine fast = new FastLine(tChart1.Chart);
fast.VertAxis = VerticalAxis.Right;
tChart1.Axes.Right.Grid.Visible = false;
RSIFunction rsi = new RSIFunction(tChart1.Chart);
rsi.Style = RSIStyle.Close;
rsi.PeriodStyle = PeriodStyles.NumPoints;
rsi.Period = 14;
fast.Function = rsi;
fast.DataSource = candle;
fast.CheckDataSource();
tChart1.MouseDoubleClick += new MouseEventHandler(tChart1_MouseDoubleClick);
}
void tChart1_MouseDoubleClick(object sender, MouseEventArgs e)
{
tChart1.ShowEditor();
}
private void button4_Click_1(object sender, EventArgs e)
{
Steema.TeeChart.Export.TextFormat text = tChart1.Export.Data.Text;
text.IncludeHeader = true;
text.IncludeIndex = true;
text.IncludeLabels = true;
text.IncludeSeriesTitle = true;
text.Save(@"D:\tmp\testData.txt");
}