# how to find ArrayMaximum() and Minimum() non-absolute values?

140

Hello.

Someone can help me to solve this "problem".

ArrayMinimum() and ArrayMaximum() just return respectively the index of most minimum(littlest) and the most maximum(biggest) value into the Array passed to it.

So it give absolute minumum and maximum, values, of an array.

But what if one search for relative min and max? The second minimum, the third etc.?

I mean not the littlest or biggest value, but the second little and second bigger(i.e. if the biggest value is 5, the second bigger is 3 etc..)

How to do this with just ArrayMaximum()/Minimum() function, or with just like few line of code, without turning crazy with 50 lines of code?

Thanks!

Documentation on MQL5: Array Functions / ArrayMaximum
• www.mql5.com
Array Functions / ArrayMaximum - Documentation on MQL5
506

Reaper:

Hello.

Someone can help me to solve this "problem".

ArrayMinimum() and ArrayMaximum() just return respectively the index of most minimum(littlest) and the most maximum(biggest) value into the Array passed to it.

So it give absolute minumum and maximum, values, of an array.

But what if one search for relative min and max? The second minimum, the third etc.?

I mean not the littlest or biggest value, but the second little and second bigger(i.e. if the biggest value is 5, the second bigger is 3 etc..)

How to do this with just ArrayMaximum()/Minimum() function, or with just like few line of code, without turning crazy with 50 lines of code?

Thanks!

Documentation on MQL5: Array Functions / ArraySort
• www.mql5.com
Array Functions / ArraySort - Documentation on MQL5