Maximum Value within a list

 

Hi, I want to find the Maximum Value from a list of values. I've had a go but i'm not sure how to collate the values into an array.

   int BA[5];

   BA[0]= v1;
   BA[1]= v2;
   BA[2]= v3;
   BA[3]= v4;
   BA[4]= v5;
   


//We call a selfdefined calculation function
   int ReturnedResult=Add(BA);
   
   
   int Add( int& BA[])
   {
   int Result= ArrayMaximum(v1,v2,v3,v4,v5);
   return (Result);
   }
 
int Result= ArrayMaximum(v1,v2,v3,v4,v5);

Perhaps you should read the manual. ArrayMaximum - Array Functions - MQL4 Reference
   How To Ask Questions The Smart Way. (2004)
      How To Interpret Answers.
         RTFM and STFW: How To Tell You've Seriously Screwed Up.