Reputation: 4977
I am trying to get the maximum of 6 amibroker arrays A, B, C, D, E, F.
Below is my code;
maximum = Max(Max(A, B), Max(C, D) );
maximum = Max(Max(maximum, E), F);
I find the code somewhat ugly. What are some other ways to code this?
I am using Amibroker ver6.3
Upvotes: 0
Views: 579
Reputation: 601
You may have a look at Highest (if you need the highest value in the whole array), HighestSince (if you need the highest since a certain condition) or HHV (if you need the highest value in x bars).
MaxA = Highest(A);
MaxB = Highest(B);
MaxC = Highest(C);
MaxD = Highest(D);
MaxE = Highest(E);
MaxF = Highest(F);
Max = Max(MaxA,Max(MaxB,Max(MaxC,Max(MaxD,Max(MaxE, MaxF)))));
Upvotes: 1