EA won't work after upgrade to 406

 

Hallo, since i have installed the 402 version, my EA works lika a charm, now it don't open orders 'cause MT4 don't reach the event 'Minute()'

try this:


int start()

{

bool time_signal;

string trade_min;

if(Minute()<20)
{
time_signal = true;
trade_min = "trade_min = true";
}
else
{
time_signal = false;
trade_min = "trade_min = false";

}

Comment(trade_min);

Is there a way to downgrade to 402?


Thanks a lot

 

Start your EA before 20 past the hour . . . and after the hour . . .

Minute()

"Returns the current minute (0,1,2,..59) of the last known server time by the moment of the program start (this value will not change within the time of the program execution)."

From: https://docs.mql4.com/dateandtime/Minute

Instead use TimeMinute(TimeCurrent());

Reason: