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

Message ListMessage List     Post MessagePost Message

  Area Chart similar to Bollinger Band?
Posted by chuck on Jul-08-2020 09:54
Peter,

I have 2 sets of 3 data points; High, Median, Low with a common, recurring X Axis interval shared between the 2 sets.

I would like to present this data (possibly) as a type of a Shaded Area Chart... such that the final look looks similar to a Bollinger Band (where High and the Low of my data form the Bands and the Median is a Line in between the bands).

Lastly, these 2 sets need to overlay (sharing the common X Axis interval) with shaded area with TRANSPARENCY such that the common areas have a combined color.

Ideally, all lines should be splines...

Another way I conceptualize this could be... 3 splines (lines) forming the High, Median, and Low of each Set... however,  the High Line and Low Line AREA must be SHADED with TRANSPARENCY...

Could this be done? All help/examples (in VB.NET) would be greatly appreciated.

Thank you for your help and opinion.

Best,
Chuck

  Re: Area Chart similar to Bollinger Band?
Posted by Peter Kwan on Jul-08-2020 19:37
Hi Chuck,

The followings are some examples:

https://www.advsofteng.com/doc/cdnet.htm#linefill.htm

https://www.advsofteng.com/doc/cdnet.htm#linecompare.htm

https://www.advsofteng.com/doc/cdnet.htm#binaryseries.htm

You can fill between any two lines in a LineLayer, including its derived types (such as StepLineLayer and SplineLayer). The fill color can be a semi-transparent color.

Hope this can help.

Regards
Peter Kwan

  Re: Area Chart similar to Bollinger Band?
Posted by chuck on Jul-08-2020 21:05
Thank you Peter, this is very helpful.
Best,
Chuck

  Re: Area Chart similar to Bollinger Band?
Posted by chuck on Jul-09-2020 01:00
Hi Peter,

(FOLLOW-UP)

I reviewed the links you provided and looks like everything will work!

Question, using the Line Compare found here... https://www.advsofteng.com/doc/cdnet.htm#linecompare.htm

Can Chart Director return some type of value of criteria that defines or identifies the results of the Compare? In the link above, from the example... is there a way to get some value back that desires the result red and blue areas?

I think the “value” would be easy work for the Chart as opposed to trying to calculate it from the data... so, wondering if I could get some result from the Compare?

Thank you!
Chuck

  Re: Area Chart similar to Bollinger Band?
Posted by Peter Kwan on Jul-09-2020 14:00
Hi Chuck,

Unluckily, there is no output of the InteLineLayer that fills the region.

Although ChartDirector can draw many things, it does not keep track of everything it has  ever done. After ChartDirector draws some parts of the chart (such as some pixels in the InterLineLayer), it may "forget" that part. This saves memory and increases speed, as it does not need to maintain complex data structure to keep track of all things. That means at the end, the InterLineLayer has no output other than drawing the chart. ChartDirector does not even remember it has drawn the layer.

If the two lines are regular lines (not splines), and there x-coordinates are synchronized like in a typical financial chart, and the lines never cross over (eg. the high and low lines never cross over), it should be trivial to computer the area by using the data. I think it needs around 3 lines of code.

Regards
Peter Kwan

  Re: Area Chart similar to Bollinger Band?
Posted by chuck on Jul-09-2020 19:41
Thanks for your reply Peter,

I recall the Tracker returns interpolated values from a Trendline, so it would be a nice feature to get something back from the Line Compare Function as well.

Chuck