Hi Jasem,
Because ChartDirector is designed as a charting library, and not as a financial and technical indicator calculator, there is no API to return the technical indicator data series. (These are treated as internal values. ChartDirector will destroy them after creating the chart to save memory.)
If you need the indicator values, the followings are some options:
(a) Compute them with your own code.
(b) Copy the computation code from the FinanceChart source code. The source code is included in the ChartDirector download. Please refer to the ChartDirector documentation on FinanceChart for details. (You may look for "FinanceChart" in the ChartDirector documentation index.)
(c) Modify the FinanceChart so that it will keep a copy of the data after plotting them. (Hint: the best place to modify is the formatIndicatorLabel method.
public Hashtable dataSeries = new Hashtable();
private String formatIndicatorLabel(String name, double[] data)
{
//store the data series, so you can use them later
dataSeries.Add(name, data);
..... the original code in formatIndicatorLabel .....
}
Hope this can help.
Regards
Peter Kwan |