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

Message ListMessage List     Post MessagePost Message

  Slow Stochastic returned incorrect value of the chart.
Posted by Googigg on Oct-18-2013 20:10
Attachments:
We have an issue of %K and %D dataSeries Object.
The %K returned incorrect value of the chart.

Could you please suggest for getting the right.
k.jpg

  Re: Slow Stochastic returned incorrect value of the chart.
Posted by Peter Kwan on Oct-18-2013 23:13
Hi Googigg,

It seems the dataSeries is created by your own code, which is probably used to keep a reference to the data arrays used to plot the chart. I remembered a few years ago, I might have posted a short example in the ChartDirector forum using this method.

The reference to the data array is correct when it is added to your dataSeries. However, if you use it later, the data array may have been changed, so it is no longer at its original value. If you intend to use the data array later, instead of adding a reference to the data array, please copy the data array (eg. using Object.clone to make a copy of the array). In this way, the array will still be containing the same data when you use it.

Hope this can help.

Regards
Peter Kwan

  Re: Slow Stochastic returned incorrect value of the chart.
Posted by Googigg on Oct-19-2013 00:22
Dear Peter,

Thank you for your quick support.
I have found your post on
http://www.chartdir.com/forum/download_thread.php?
bn=chartdir_support&thread=1264519533#N1264527203

I have traced inside method formatIndicatorLabel(String name, double[] data).
I founded exactly what you explain that original value had been replaced.

Thank you so much.