How to find max and min values with in a array

Hi all,

Can any expert guide me to find max and min values with in a array.
I tried max(array) but this is not working.

Thanks in advance.

To calculate an array of the min and max since the first bar:

y = Highest(array);
y = Lowest(array);

To calculate a scalar that looks into the future at all bars:

y = LastValue(Highest(array));
y = LastValue(Lowest(array));

See the docs:
https://www.amibroker.com/guide/afl/highest.html
https://www.amibroker.com/guide/afl/lowest.html

7 Likes