Hello,
You can try this :
Code:
....
int highest=0, lowest=0, bar=WindowBarsPerChart();
for(int shift=0;shift<bar;shift++)
{
double indie=iCustom(.........,shift);
if(highest<indie) highest=indie;
if(lowest==0) lowest=indie;
if(lowest>indie) lowest=indie;
}
.....
note: this code calculating the current open candle too, if you want to calculate the closed candle only, use shift=1.
Hope this helps,
Ardie