Find Last Fractal Function MQL4
double findFractal(int nbr, int mode, int timeframe)
{
int i=3, n;
for(n=0;n<=nbr;n++)
{
while(iFractals(Symbol(),timeframe,mode,i) == 0)
i++;
if(n<nbr)
i++;
}
return(iFractals(Symbol(),timeframe,mode,i));
}