please someone help me on this matter

olufemi
110

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 ?

Ubzen
5300
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:

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;
}
olufemi
110
olufemi  
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 ?