High Array max

samjesse

Active Trader
Aug 30, 2011
118
0
27
Hi

Is there a function which returns the index of the highest high between a start and end indexs inside the OnCalculate?

thx
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,534
1,355
144
Odesa
www.earnforex.com
Should work:

MQL5:
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &High[],
                const double &Low[],
                const double &Close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
{
 int highest_index = ArrayMaximum(High);
 return(rates_total);
}
 
Last edited: