Page 1 of 1

How to get the combined minYValue from ADX?

Posted: Thu Oct 11, 2007 4:21 am
by 7665742
Hi:

We are trying to get a minYvalue from ADX function. The ADX gives 3 different FastLines (+ve, -ve, and ADX). What we try to dynamically figure out the minYvalue to draw a horizontal line. The problem we are facing is - the minYValue we are getting is from ADX line, but -ve line of ADX has minYValue less than ADX ... so, the horizontal line gets drawn in the midst of the indicator. This is not good. So, the question is - how can we get the correct minYValue out of +ve, -ve, ADX lines? Please give us any insights/help. Thanks.

regards,
vasu

Posted: Thu Oct 11, 2007 9:34 am
by narcis
Hi vasu,

You can get the minimum Y value of all the series in a chart doing something like this:

Code: Select all

                double min = tChart.getSeries(0).getMinYValue();
                
                for (int i=1; i<tChart.getSeriesCount(); i++)
                {
                    min = Math.min(min, tChart.getSeries(i).getMinYValue());
                }
Hope this helps!

Re: How to get the combined minYValue from ADX?

Posted: Fri Oct 12, 2007 2:47 am
by 7665742
Thanks, for the info Narcis.

But, we do not want to get the minYValue across all the series. We just want among three graphs of ADX (because these three are being drawn within a custom axis of it's own. That way we can better delineate that particular series from other series. I hope this gives you proper perspective on what we are trying to achieve. Thanks.

regards,
vasu

Re: How to get the combined minYValue from ADX?

Posted: Fri Oct 12, 2007 5:38 am
by 7665742
We got it work by using -

Code: Select all

Series.getVertAxis().getMinYValue(); << drawing a line below the least 

Series.getVertAxis().getMaxYValue(); << drawing a line above the highest 
Thanks.

regards,