Page 1 of 1

ADX financial indicator

Posted: Mon Oct 08, 2007 9:44 am
by 7665742
Hi:

For ADX (Average Directional Index) - we get three charts (showing -DI, +DI, and ADX). The question is - how do we control so they all show up within their custom axis. The ADX shows up within it's bounds. But, the other two get mixed up with the rest of the chart. Is there anyway, we can get ADX, +DI and -DI using the same axis (as it supposed to)? Any tips are appreciated. Thanks.

regards,
vasu

Re: ADX financial indicator

Posted: Mon Oct 08, 2007 10:17 am
by 7665742
Never mind. We found the solution. We just had to associate series with the custom axis before we started working with the function.

Posted: Mon Oct 08, 2007 6:55 pm
by Marjan
Hi.

Yes, that will work ok. Ideally this should be done automatically inside function. We'll try to implement this for next maintenance release.

Posted: Tue Nov 13, 2007 6:52 am
by 7665742
Hi:

Thanks for the response. I have a followup question on ADX. I guess this could be related to any financial indicator where multiple series are being displayed (in ADX case - you have 3 series being to differentiate the fluctuations). The question is - how can we get the last value of the other two series? ie, we can the last value of the middle line ... but not the other two which are showing +ve, and -ve variants. I would appreciate any information you can provide on this.

best regards,

Posted: Tue Nov 13, 2007 10:56 am
by narcis
Hi cdn,

You can retrieve each series values using their index in the chart, for example:

Code: Select all

                double lastVal;
                
                for (int i=0; i<tChart.getSeriesCount(); i++)
                {
                    lastVal=tChart.getSeries(i).getYValues().getValue(tChart.getSeries(i).getCount()-1);
                }