ArrayMinimum of an array

 

Hi

I am trying to get the index of the lowest low of a range of bars. The following idea is not working. Could you please suggest.  thx


//--- code heading
MqlRates rates[];

//--- insdie the OnInit

   ArraySetAsSeries(rates,true);
   CopyRates(name,myPeriod,0,200,rates);
  
//--- inside the OnCalculate

    ArrayMinimum(rates, 1, 22);  

Documentation on MQL5: Standard Constants, Enumerations and Structures / Data Structures / History Data Structure
  • www.mql5.com
Standard Constants, Enumerations and Structures / Data Structures / History Data Structure - Documentation on MQL5
 
Function ArrayMinimum/ArrayMaximum can not be implemented to arrays of structure. You should use CopyLow/CopyHigh to get arrays of doubles or make your own realization of function ArrayMinimum to use MqlRates array.
Documentation on MQL5: Timeseries and Indicators Access / CopyLow
  • www.mql5.com
Timeseries and Indicators Access / CopyLow - Documentation on MQL5