Open Price Filter

 

Hi,

I'm new at MQL4 programming, and I can´t figure out how can I filter every tick from the open price.

I want that my indicators and EAs run their routines only at the bar opening price, ignoring all the rest of bar ticks.

The problem is that they continue to return me buy/sell signals on every tick that matches with indicator functions.

Does anyone have suggestions to do it?

Regards

 

asked 10000 times answerd 10000 times

static datetime current=0;
if(current!=Time[0]){
  current=Time[0];
  //NEW CANDLE
}else{ //OTHER TICKS  }
 
zzuegg:

asked 10000 times answerd 10000 times


thank you very much for your help.