please someone help me on this matter

 

i want to my EA to place other base on this way but am confussed;


if ihigh(NULL,PERIOD_H4,1)-i high(NULL,PERIOD_H1,1)>20pips && iLow(NULL,PERIOD_H1,1)- iLow(NULL,PERIOD_H4,1) <20pips

is BUY ORDER While

if i high(NULL,PERIOD_H4,1)-i high(NULL,PERIOD_H1,1)>20pips && iLow(NULL,PERIOD_H1,1)- iLow(NULL,PERIOD_H4,1) <20pips is SELL ORDER

But if the pips between ihigh(NULL,PERIOD_H4,1)-i high(NULL,PERIOD_H1,1)< 20pips and iLow(NULL,PERIOD_H1,1)- iLow(NULL,PERIOD_H4,1) <20pips is still place order BUY order l and i do not want it to place it .Please can anybody help me ?

 

Try to simply the coding so you don't have to keep repeating the same things over and over again. That might help. Example:

Double H4_High=ihigh(NULL,PERIOD_H4,1);
Double H1_High=high(NULL,PERIOD_H1,1);
if(H4_High-H1_High>20pips){
  bool Buy_Trigger=true;
}
 
ubzen:

Try to simply the coding so you don't have to keep repeating the same things over and over again. That might help. Example:


Please wouldn't it affect the broker with less than four digits ?