Experts: Simplest Hedging EA ever

 

Simplest Hedging EA ever:

Only for hedge accounts. Opening two opposite positions on a new bar.

Author: Vladimir Karputov

 
I suggest that this
void OnTick()
  {
   static datetime prev_time=0;
   if(prev_time==iTime(0))
      return;
   prev_time=iTime(0);
replace it with this
void OnTick()
{
  static datetime prev_time = 0;
  static const int period = PeriodSeconds();
  const datetime NewTime = TimeCurrent() / period;
  
  if(prev_time == NewTime)
    return;
    
  prev_time = NewTime;
 
Hello this EA isnt working with me what time frame is used for it?
[Deleted]  
the ea is not working , please take a look at it and get back to us