int indexmax = ArrayMax(tick_array2,0, WHOLE_ARRAY); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int ArrayMax(const MqlTick &array[],int start,int count=WHOLE_ARRAY) { int size=ArraySize(array); if(count==WHOLE_ARRAY) count=size-start; if(!size || start<0 || (count+=start)>size) return(-1); int max=start; //--- for(int i=start;i<count;i++) if(array[max].last<array[i].last) max=i; //--- return(max); } //+------------------------------------------------------------------+
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I am obviously not an expericenced programmer.. :-)