Download MetaTrader 5

ArrayMinimum of an array

To add comments, please log in or register
Are you a real pro? Share your knowledge with millions of traders!
samjesse
205
samjesse 2011.09.05 01:31 

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
Alexey Da
Moderator
6606
Alexey Da 2011.09.05 11:34  
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
To add comments, please log in or register