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.
How to draw a yearly chart(data points)
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
You can do any of those, it is up to you.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


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.
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.
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.