Page 1 of 1

Candlestick incorrect high-low line after adding data

Posted: Mon May 14, 2007 2:36 pm
by 9644971
Hello,

After adding data to my Candlestick the high-low line is incorrecly shown in front of the open-close bar. If you fill the candlestick with the fillsamplevalues, then the high-low line is behind the open-close bar as one would expect from a candlestick. How can I get the open-close bar in front of the high-low line after adding my own data?

Best regards,

Marc

Posted: Mon May 14, 2007 2:43 pm
by narcis
Hi Marc,

I'm not able to reproduce the problem here using latest TeeChart for .NET v2 build available at the client area. Which exact version are you using?

If the problem persists could you please send us a simple example project we can run "as-is" to reproduce the problem here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroups or at our upload page.

Thanks in advance.

Posted: Mon May 14, 2007 3:56 pm
by 9644971
Hello narcĂ­s,

I'm using teechart .net v2.0.50727
A sample project was uploaded via your uploadpage.
I also uploaded 2 screenshots.

Best regards,

Marc

Posted: Tue May 15, 2007 8:08 am
by narcis
Hi Marc,

Thanks for the example.

The problem in the example is that you should populate series using Add's method override which has the following parameters: Date, Open, High, Low and Close. If you look at the data you used to populate your series you'll notice that it didn't make sense as you inverted high and low values.

Populating candle series as shown in the code below works fine. Please notice that I only inverted high and low values.

Code: Select all

        private void button1_Click(object sender, EventArgs e)
        {			
					candle1.Clear();
					
					candle1.Add(DateTime.Today.AddDays(-2), 10.0, 11.0, 9.0, 10.5);
					candle1.Add(DateTime.Today.AddDays(-1), 7.5, 9.0, 7.0, 8.5);
					candle1.Add(DateTime.Today, 10.5, 11.0, 9.0, 10.0);
        }
BTW: Please notice there are newer versions available at the client area.