Bug: MT4 Build 711: Wrong parameter order in array class CArrayDouble

 

Hello,

please see these official prototypes:

a)

int  ArrayMinimum(

   const void&   array[],             // array for search
   int           count=WHOLE_ARRAY,   // number of checked elements
   int           start=0              // index to start checking with

   );

b)

int CArrayDouble::Minimum(const int start,const int count) const
  {
   return(ArrayMinimum(m_data,start,count));

  }

Parameter order mismatch and it also applies to CArrayDouble::Maximum(...) calling ArrayMaximum(...).


Proof:

#property strict
#include <Arrays/ArrayDouble.mqh>

void OnStart()
{
    double d[10] = {8.0, 6.2, 1.1, 7.4, 9.1, 8.2, 4.4, 3.7, 5.3, 2.2};  // smallest element is on index 2
    CArrayDouble c;
    int d_pos, c_pos;
   
    c.AddArray(d);
   
    d_pos = ArrayMinimum(d, WHOLE_ARRAY, 0);
    c_pos = c.Minimum(0, c.Total());
    Print("Result: d_pos=", d_pos, " c_pos=", c_pos);

/*
Result: d_pos = 2 c_pos = 10
*/

}


Without proper tests this mistake will not be detected, because both parameters are "int".

Best regards

 
Please report this to Metaquotes ServiceDesk.
 

I've done this without any response from service desk.
MT4 Build 724 has this bug too.
Does MT4 or MT5 have an bug tracking system in place ?