ASE Home Page Products Download Purchase Support About ASE
ChartDirector General
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  finance chart / color of line
Posted by Gerard Isdel on Jun-29-2009 19:53
Dear Peter

Is it possible to change the color of the close line after a certain date in the finance chart.

Regards

Gerard

  Re: finance chart / color of line
Posted by Peter Kwan on Jun-30-2009 01:39
Hi Gerard,

You may use a zone color as the close line color. There is an example in the sample code "X Zone Coloring". (You may look for "X Zone Coloring" in the ChartDirector documentation index.)

For example, in VB/VBScript:

Set myMainPriceChart = myFinanceChart.addMainChart(300)

'use red color &Hff0000 before the 35th trading session, and green color &H008800 after it
Set myColor = myMainPriceChart.xZoneColor(34, &Hff0000, &H008800)

Call myFinanceChart.addCloseLine(myColor)


Note that the x-coordinates of a finance chart are the visible trading session. (The first point is 0, the second point is 1, ....). If you want to use date, you would need to convert the date to the visible trading session number (the index of the timeStamps array, minus the extraPoint argument, if any).

Hope this can help.

Regards
Peter Kwan