Aaron Posted November 16, 2009 Report Posted November 16, 2009 For financial charts, we need to display candlestick bars (or OpenHighLow bars) and then lines on the same chart. The lines represent moving average calculations and need to be displayed within the same chart. When I set the Galary to HighLow, I cannot add the line data for the moving average. Is there a way to do this? Quote
rocioZ Posted November 17, 2009 Report Posted November 17, 2009 Please try with the following lines of code: chart1.Data.Series = 4; chart1.Data.Points = 10; Random r = new Random (); for ( int j = 0; j < chart1.Data.Points; j++) { chart1.Data[0, j] = r.Next(30); chart1.Data[1, j] = r.Next(0, 10); chart1.Data[2, j] = r.Next(10, 20); chart1.Data[3, j] = r.Next(20, 30); } chart1.Series[0].Gallery = Gallery .Lines; chart1.Series[1].Gallery = Gallery .HighLowClose; chart1.Series[2].Gallery = Gallery .HighLowClose; chart1.Series[3].Gallery = Gallery .HighLowClose; Quote
Aaron Posted November 17, 2009 Author Report Posted November 17, 2009 That helps. Your code doesn't appear to be java. But it did point me in the right direction. Thank you for your help. Aaron Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.