Page 1 of 1

How to draw a yearly chart(data points)

Posted: Mon Jul 03, 2006 3:02 am
by afa654321
Hello all,

I am trying to draw various charts from a set of full historical data(2 years worth). My question is what data pionts should I be using to darw, say, a yearly chart? Should I be using HLOC and average for each day(5 tick data/day) and collect 5x256 data points to draw a yearely chart? How about monthly, weekly chart?

Thx.

Posted: Mon Jul 03, 2006 5:36 pm
by david.gilbert
You can do any of those, it is up to you.

Posted: Wed Jul 05, 2006 6:47 pm
by afa654321
DG, thx for the reply.

My question is that, e.g., for MSFT, I have 300 trades/day for the entire year(roughly 8000 trades/tick data). How can I(how many ticks/day should I choose) to draw a yearly chart so that it truly represents the nature of the actual trades that have taken place in that year. I have used the Hour class with 8760(1 year) entries and it slows down somewhat(also mentioned by DG in the demo code).

Many thanks.

Posted: Fri Jul 07, 2006 10:09 pm
by skunk
A yearly chart by definition contains one bar per year. You will need to scan through all your shorter interval data (daily should be fine) and track the highest high and lowest low of each bar -- use these for your high and low values for the year. The open will be the open of the first day, the close will be the close of the last day. The volume will be equal to the sum of the volume of each individual day.