MQL4参考 预定义变量 High

double High[]

Series array that contains the highest prices of each bar of the current chart.

Series array elements are indexed in the reverse order, i.e., from the last one to the first one. The current bar which is the last in the array is indexed as 0. The oldest bar, the first in the chart, is indexed as Bars-1.


//---- maximums counting
   if(counted_bars>KPeriod) i=Bars-counted_bars-1;
      double max=-1000000;
      k = i + KPeriod-1;
         if(max<price) max=price;

See also