Candle serie - Open and Close bars size issue

TeeChart for ActiveX, COM and ASP
Post Reply
GLSWG
Newbie
Newbie
Posts: 39
Joined: Fri Jan 09, 2004 5:00 am

Candle serie - Open and Close bars size issue

Post by GLSWG » Tue Aug 03, 2004 12:08 pm

Hi,

For some reason an open bar is drawing shorter size than close one. How I can make them of the same size, i.e. open would be the same size as close?

Thank you in advance.

Michael.

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Aug 04, 2004 2:20 pm

Hi Michael,

how can I see what you mean ?

GLSWG
Newbie
Newbie
Posts: 39
Joined: Fri Jan 09, 2004 5:00 am

Post by GLSWG » Thu Aug 05, 2004 12:21 pm

Hi Josep,

Please see the screenshot of what I'm talking about. You should see that an open bar (the one to the left) is shorter than close bar (the one to the right).

http://www.softasap.net/candle_bars_issue.gif

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Tue Aug 10, 2004 11:31 am

Hi Michael,

It appears that it may be a paint issue relating to the start pixel position of the open/close. We’ll take a closer look at the code to see what might need to be done. We’ll get back to you.

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Sep 06, 2004 11:56 am

Hi Michael,

it's a bug, we'll fix it for the next maintenance releases. It only happens using the default EndStyle of the Pen. Setting it to esSquare shows correct sizes :
TChart1.Series(0).asCandle.Pointer.Pen.EndStyle = esSquare

GLSWG
Newbie
Newbie
Posts: 39
Joined: Fri Jan 09, 2004 5:00 am

Post by GLSWG » Tue Sep 07, 2004 12:49 pm

Hi Josep,

Thank you for info and making research on it. It's appreciated!

Regards,
Michael.

GLSWG
Newbie
Newbie
Posts: 39
Joined: Fri Jan 09, 2004 5:00 am

Post by GLSWG » Tue Sep 06, 2005 12:32 pm

Hi Guys,

Have an issue been fixed yet? Thanks.

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Sun Sep 11, 2005 9:18 pm

Hi Michael,

it seems it's working fine using the latest v7.05 version. Could you please download it and check if it works fine for you ?

GLSWG
Newbie
Newbie
Posts: 39
Joined: Fri Jan 09, 2004 5:00 am

Post by GLSWG » Tue Sep 13, 2005 10:44 am

Thank you Josep for reply, I will try it just now.

GLSWG
Newbie
Newbie
Posts: 39
Joined: Fri Jan 09, 2004 5:00 am

Post by GLSWG » Tue Sep 13, 2005 12:39 pm

Hi Josep,

Well it looks like close/open bars are still different size.

GLSWG
Newbie
Newbie
Posts: 39
Joined: Fri Jan 09, 2004 5:00 am

Post by GLSWG » Thu Sep 15, 2005 3:29 pm

Hi Guys,

So any thoughts in which release it could be fixed? Thank you in advance.

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Sep 16, 2005 3:41 pm

Hi,

which code are you using to see the problem ? I just cannot reproduce it here now ?

GLSWG
Newbie
Newbie
Posts: 39
Joined: Fri Jan 09, 2004 5:00 am

Post by GLSWG » Sun Sep 18, 2005 11:03 am

Hi Pep,

The basic code to create OHLC chart, nothig's special. Here it is:

Code: Select all


	m_pChart->GetAspect().SetView3D(FALSE);  
		m_pChart->GetPanel().SetColor(RGB(0,0,0));
		m_pChart->GetPanel().SetMarginBottom(10);

  
		m_pChart->Series(nSeriesIndex).GetAsCandle().SetCandleStyle(1); //csCandleBar   
		m_pChart->Series(nSeriesIndex).GetAsCandle().SetCandleWidth(5);
		m_pChart->Series(nSeriesIndex).GetAsCandle().SetUpCloseColor(RGB(0,255,0)); 
		m_pChart->Series(nSeriesIndex).GetAsCandle().SetDownCloseColor(RGB(0,255,0));



		m_pChart->Series(nSeriesIndex).GetMarks().SetVisible(FALSE);
				

		m_pChart->Series(nSeriesIndex).SetColor(RGB(106,181,255));  
	  
		m_pChart->GetWalls().GetBack().GetPen().SetColor(RGB(128,128,128));    
		m_pChart->GetWalls().GetBack().GetPen().SetStyle(psSolid);
		m_pChart->GetWalls().GetBack().GetPen().SetWidth(2);

 
		//Setting for Bottom Axis
		//setting color
		CAxisLabels cBottomAxisLabels=cBottomAxis.GetLabels();   
		cBottomAxisLabels.GetFont().SetColor(RGB(255,255,255));   
		//setting value format
		//cBottomAxis.GetLabels().SetValueFormat("0.00");
		//setting ticks style
		cBottomAxis.GetAxisPen().SetStyle(psSolid);
		//setting ticks color
		cBottomAxis.GetAxisPen().SetColor(RGB(128,128,128));
		//setting ticks width
		cBottomAxis.GetAxisPen().SetWidth(2); 
		//setting grid style
		cBottomAxis.GetGridPen().SetStyle(psSolid);
		
		//setting grid color
		cBottomAxis.GetGridPen().SetColor(RGB(49,49,49));
		
		//setting grid width
		cBottomAxis.GetGridPen().SetWidth(2); 
		//setting minor len
		cBottomAxis.SetMinorTickLength(2);
		
		//Setting for Left Axis
		CAxis cLeftAxis=cAxes.GetLeft(); 

		//cLeftAxis.AdjustMaxMin(); 
		cLeftAxis.SetAutomatic(TRUE); 
	/*
		long nAxesNumber = cAxes.AddCustom(FALSE); 
		CAxis cLeftAxis = cAxes.GetCustom(nAxesNumber);
		
		//cLeftAxis.SetPositionPercent(50); 
	m_pChart->Series(nSeriesIndex).SetVerticalAxis(nAxesNumber);
	*/
		 
			
		//setting color
		cLeftAxis.GetLabels().GetFont().SetColor(RGB(255,255,255));   
		//setting value format
		cLeftAxis.GetLabels().SetValueFormat("0.00");
		//setting ticks style
		cLeftAxis.GetAxisPen().SetStyle(psSolid);
		//setting ticks color
		cLeftAxis.GetAxisPen().SetColor(RGB(128,128,128));
		//setting ticks width
		cLeftAxis.GetAxisPen().SetWidth(2); 
		//setting grid style
		cLeftAxis.GetGridPen().SetStyle(psSolid);
		
		//setting grid color
		cLeftAxis.GetGridPen().SetColor(RGB(110,110,110));
		
		//setting grid width
		cLeftAxis.GetGridPen().SetWidth(1); 
		//setting minor len
		cLeftAxis.SetMinorTickLength(0);

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Sep 19, 2005 8:53 am

Hi Michael,

ok, thanks but which data values are you adding in order to notice the problem ?

Post Reply