Download MetaTrader 5
To add comments, please log in or register
All MQL5.community events are grouped together. Have a look at the Wall!
turtle1000
68
turtle1000 2016.06.14 14:34 
  // 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 

Keith Watford
Moderator
7887
Keith Watford 2016.06.14 18:57  

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 

?

whroeder1
13600
whroeder1 2016.06.14 21:12  
 && 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 
turtle1000
68
turtle1000 2016.06.15 08:14  
WHRoeder:
Self documenting your code would generate a length of 5 as GumRai pointed out.

It works now...thanks again...
/
To add comments, please log in or register