I have studied EA and one question is challenge me.
This EA is initialized with second argument "Period()" as showed below. I have tested with M1 chart. I supposed the refresh (check close and
open trade) is about each minute...
In the second block, I coded a signal, that is based each M5.
In the demo
account it works perfectly, but in the real account, the same EA open and close one trade for each minute! The broker is the same !
I updated the MT5 to the same version...
Any ideas to solve this mistery ?
Cheers,
inputENUM_TIMEFRAMES periodo=PERIOD_M5;
CExpert ExtExpert;
//+------------------------------------------------------------------+//| Initialization function of the expert |//+------------------------------------------------------------------+intOnInit()
{
//--- Initializing expertif(!ExtExpert.Init(Symbol(),Period(),Expert_EveryTick,Expert_MagicNumber))
{
//--- failedprintf(__FUNCTION__+": error initializing expert");
ExtExpert.Deinit();
return(INIT_FAILED);
}
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I have studied EA and one question is challenge me.
This EA is initialized with second argument "Period()" as showed below. I have tested with M1 chart. I supposed the refresh (check close and open trade) is about each minute...
In the second block, I coded a signal, that is based each M5.
In the demo account it works perfectly, but in the real account, the same EA open and close one trade for each minute! The broker is the same !
I updated the MT5 to the same version...
Any ideas to solve this mistery ?
Cheers,