Hi,
There is a problem in the attached image. The first data should be charted as a solid T shape, but the resulting vertical line turned out to shift 1 pixel downward that creates a disconnected gap. How can I fix that? thanks. (this one pixel gap gets even worse if I set Border.Visible := False)
A problem with candle series
A problem with candle series
- Attachments
-
- candle1.png (9.32 KiB) Viewed 8887 times
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: A problem with candle series
Hi SSWang,
Could you please attach a simple example project we can run "as-is" to reproduce the problem here and let us know the exact TeeChart version you are using?
Thanks in advance.
Could you please attach a simple example project we can run "as-is" to reproduce the problem here and let us know the exact TeeChart version you are using?
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: A problem with candle series
I'm using following version with D2010:Narcís wrote:Hi SSWang,
Could you please attach a simple example project we can run "as-is" to reproduce the problem here and let us know the exact TeeChart version you are using?
Thanks in advance.
===============================================
Release Notes 17th November 2011
TeeChart VCL version 2011
Build 2011.04.41118
===============================================
Please check the project's first data, thanks.
- Attachments
-
- CandleProblem.png (55.09 KiB) Viewed 8769 times
-
- CandleProblem.zip
- (66.25 KiB) Downloaded 566 times
Re: A problem with candle series
Hi,
The Candle series basically draws a line from High to Low values and a rectangle from Open to Close values. It assumes having a High&Low values both greater or smaller than both Open&Close has no sense.
https://en.wikipedia.org/wiki/Candlestick_chart
The Candle series basically draws a line from High to Low values and a rectangle from Open to Close values. It assumes having a High&Low values both greater or smaller than both Open&Close has no sense.
https://en.wikipedia.org/wiki/Candlestick_chart
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: A problem with candle series
Yes, but what you have mentioned is not the case that I reported. Allow me to explain this by taking the first attached image from top of this thread for example. First, the "Open value"=637 equals to "Close value", which is quite common in stock pricing, makes the rectangle part of OHLC look like a horizontal line. Second, the "High value" is also 637, which indicates that the "Open value" is also the highest among its period. This is again, frequently seen in stock pricing. Now the problem comes: If the top end of vertical line of OHLC, which is "High value", is disconnected to horizontal line and leaving a gap, it tells a story that the Open and Close values are even higher than defined "High value". That makes no sense to OHLC. So the chart must draw a perfect T in this case (and a perfect vertical inverted T for opposit case). Please correct me if there are mistakes, thanks.Yeray wrote:Hi,
The Candle series basically draws a line from High to Low values and a rectangle from Open to Close values. It assumes having a High&Low values both greater or smaller than both Open&Close has no sense.
https://en.wikipedia.org/wiki/Candlestick_chart
Re: A problem with candle series
Hi SSWang,
You are right. I misunderstood it.
A Candle with the same Open, Close and High values should be drawn as a perfect "T". But right now the is a pixel separating the horizontal and the vertical lines.
A Candle with the same Open, Close and Low values should be drawn as a perfect inverted "T". But right now the is an extra pixel drawn below the horizontal line.
I've added it to the defect list to be fixed asap (TV52016086). I've actually found a possible fix, but it should be studied if it could break something else.
However, feel free to apply the change to the sources if you are a source code customer.
In CandleCh.pas, in the TCandleSeries.DrawValue method, change this:
For this:
You are right. I misunderstood it.
A Candle with the same Open, Close and High values should be drawn as a perfect "T". But right now the is a pixel separating the horizontal and the vertical lines.
A Candle with the same Open, Close and Low values should be drawn as a perfect inverted "T". But right now the is an extra pixel drawn below the horizontal line.
I've added it to the defect list to be fixed asap (TV52016086). I've actually found a possible fix, but it should be studied if it could break something else.
However, feel free to apply the change to the sources if you are a source code customer.
In CandleCh.pas, in the TCandleSeries.DrawValue method, change this:
Code: Select all
if View3D then
VertLine3D(tmpX,yLow,yHigh,MiddleZ)
else
DoVertLine(tmpX,yLow,yHigh);
Code: Select all
if View3D then
VertLine3D(tmpX,yHigh,yLow,MiddleZ)
else
DoVertLine(tmpX,yHigh,yLow);
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: A problem with candle series
Hi SSWang,
We decided to implement Yeray's fix suggestion for the next TeeChart VCL maintenance release.
We decided to implement Yeray's fix suggestion for the next TeeChart VCL maintenance release.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |