Get an Array out from a Structure
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); } //+------------------------------------------------------------------+
I am obviously not an expericenced programmer.. :-)