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

Message ListMessage List     Post MessagePost Message

  Financial Indicators
Posted by Jasem on Jan-26-2010 23:25
HI
It is nice to chart the extensive Financial Indicator library and graph it. I am using .Net and would like top know how to get an aary for the values plotted for a certain indicator. Let us say I chart the Simple Moving Average or the ATR how can I get an array of values so I can work with them withinthe program for further analysis.

Thank you
Jasem

  Re: Financial Indicators
Posted by Peter Kwan on Jan-27-2010 01:33
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

  Re: Financial Indicators
Posted by Jasem on Jan-27-2010 04:53
Thank you Peter
I think I will mix between approach 1 and 2 as per your suggestions.

Best Regards
Jasem