Jump to content
Software FX Community

Combining OpenHighLow and Lines on the same chart ?


Aaron
 Share

Recommended Posts

 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?

Link to comment
Share on other sites

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;

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...