I am currently building a financial application, which uses Point and Figure Charts.
I would like to know is more about how TChart calculates Point and Figure Charts.
We would like to provide three charts in a variety of ways based on:
-Closing Price.
-High or low price for upward movements and downward movements respectively.
-Typical price (calculated as: (High + Low + Close) / 3.)
I would like more information on how TChart calculates the point and figure chart and what it is based on.
Point and Figure Charts
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi,
The following example should be sufficient to ascertain if TeeChart's Point and Figure series satisfies your needs:
The following example should be sufficient to ascertain if TeeChart's Point and Figure series satisfies your needs:
Code: Select all
private DataTable dt;
private void InitializeDB() {
dt = new DataTable();
DataColumn date = new DataColumn("Date", System.Type.GetType("System.DateTime"));
DataColumn open = new DataColumn("Open", System.Type.GetType("System.Double"));
DataColumn high = new DataColumn("High", System.Type.GetType("System.Double"));
DataColumn low = new DataColumn("Low", System.Type.GetType("System.Double"));
DataColumn close = new DataColumn("Close", System.Type.GetType("System.Double"));
dt.Columns.Add(date);
dt.Columns.Add(open);
dt.Columns.Add(high);
dt.Columns.Add(low);
dt.Columns.Add(close);
DateTime now = DateTime.Today;
Random rnd = new Random();
double dopen, dhigh, dlow, dclose;
for(int i=0;i<10;++i) {
DataRow dr = dt.NewRow();
dr[date] = now;
dopen = rnd.Next(1000);
dhigh = dopen + (dopen * 0.10);
dlow = dopen - (dopen * 0.20);
dclose = dlow + (dlow * 0.10);
dr[open] = dopen;
dr[high] = dhigh;
dr[low] = dlow;
dr[close] = dclose;
dt.Rows.Add(dr);
now = now.AddDays(1);
}
}
private void Form1_Load(object sender, System.EventArgs e) {
InitializeDB();
tChart1.Aspect.View3D = false;
//Steema.TeeChart.Styles.Candle candle1 = new Steema.TeeChart.Styles.Candle(tChart1.Chart);
Steema.TeeChart.Styles.PointFigure pointFigure1 = new Steema.TeeChart.Styles.PointFigure(tChart1.Chart);
pointFigure1.BoxSize = 25;
pointFigure1.DataSource = dt;
pointFigure1.OpenValues.DataMember = dt.Columns["Open"].ToString();
pointFigure1.HighValues.DataMember = dt.Columns["High"].ToString();
pointFigure1.LowValues.DataMember = dt.Columns["Low"].ToString();
pointFigure1.CloseValues.DataMember = dt.Columns["Close"].ToString();
pointFigure1.DateValues.DataMember = dt.Columns["Date"].ToString();
pointFigure1.CheckDataSource();
tChart1.Axes.Bottom.Labels.DateTimeFormat = "dd/MM/yy";
}
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Hi,
Also the TeeChart for Net uses the :
-High or low price for upward movements and downward movements respectively.
I think with a minor changes can be added the other options you say C(losing price i Typical price).
If you want you can send us the formula you're using or you want to use with some data with which we can check that the formula is done correctly. You can send this to me directly to pep@steema.com
Also the TeeChart for Net uses the :
-High or low price for upward movements and downward movements respectively.
I think with a minor changes can be added the other options you say C(losing price i Typical price).
If you want you can send us the formula you're using or you want to use with some data with which we can check that the formula is done correctly. You can send this to me directly to pep@steema.com
Pep Jorge
http://support.steema.com
http://support.steema.com