# Why does ilowest skip many matches in a loop

128

// This works,but ilowest below ,skips matches.
&&  iLow(NULL,PERIOD_M1,ee4t)< iLow(NULL,PERIOD_M1,ee4t+2)
&&  iLow(NULL,PERIOD_M1,ee4t)< iLow(NULL,PERIOD_M1,ee4t+1)
&&  iLow(NULL,PERIOD_M1,ee4t)< iLow(NULL,PERIOD_M1,ee4t-1)
&&  iLow(NULL,PERIOD_M1,ee4t)< iLow(NULL,PERIOD_M1,ee4t-2)

// ilowest skips many ee4t matches for the lowest
// ee4t in an +1 incremented loop search in a several hundred
// bars search for matches within specific price ranges and
// 2 bars before and 2 after, ee4t.But the 4  // ilow statements above // find every
// match every time. Have increased sleep time with no effect. And // have tested many examples.

&& iLowest(NULL,PERIOD_M1,MODE_LOW,ee4t+2,ee4t-2)==ee4t

Moderator
10369

What do you mean? Skips matches?

` && iLowest(NULL,PERIOD_M1,MODE_LOW,ee4t+2,ee4t-2)==ee4t `

Maybe you mean

` && iLowest(NULL,PERIOD_M1,MODE_LOW,5,ee4t-2)==ee4t `

?

15331

` && iLowest(NULL,PERIOD_M1,MODE_LOW,ee4t+2,ee4t-2)==ee4t `
Self documenting your code would generate a length of 5 as GumRai pointed out.
```int iLast  = ee4t+2;
int iFirst = ee4t-2;
int length = iLast - iFirst + 1;

&& iLowest(NULL,PERIOD_M1,MODE_LOW,length,iFirst)==ee4t ```
128

WHRoeder:
Self documenting your code would generate a length of 5 as GumRai pointed out.

It works now...thanks again...