My EA is not expert and cannot be executed

To add comments, please log in or register
Osama Hussein
331
Osama Hussein  

Hi.

After last update build 1147 of MT4 , I want to make some modification to my EA and as you see bellow everything is OK after compiling the EA but when I try to drag it to the chart I got this message "the EA is not expert and cannot be executed"

Could you help me to know what happen with the last update.?????


This is bellow the result after compiling!!!!

'Golden Core V1.08.mq4' Golden Core V1.08.mq4

0 error(s), 0 warning(s), compile time: 373 msec


Regards

Osama

Keith Watford
Moderator
20312
Keith Watford  
Maybe it is an indicator?
Shahrokh Firouzi
205
Shahrokh Firouzi  

Hi Osana

That's right, some of function orders are changed. 

Osama Hussein
331
Osama Hussein  
Keith Watford:
Maybe it is an indicator?

Of course not it is EA and was working for more than a year

Osama Hussein
331
Osama Hussein  
Shahrokh Firouzi:

Hi Osana

That's right, some of function orders are changed. 

Nice tell we found some one from Meta Quote reply us and explain what changes we back to build 1601

Regards

Alain Verleyen
38646
Alain Verleyen  
Shahrokh Firouzi:

Hi Osana

That's right, some of function orders are changed. 

What do you mean ?
Alain Verleyen
38646
Alain Verleyen  
Osama Hussein:

Hi.

After last update build 1147 of MT4 , I want to make some modification to my EA and as you see bellow everything is OK after compiling the EA but when I try to drag it to the chart I got this message "the EA is not expert and cannot be executed"

Could you help me to know what happen with the last update.?????


This is bellow the result after compiling!!!!

'Golden Core V1.08.mq4' Golden Core V1.08.mq4

0 error(s), 0 warning(s), compile time: 373 msec


Regards

Osama

Don't use a function OnStart() or start().
Fernando Carreiro
4980
Fernando Carreiro  
Osama Hussein: After last update build 1147 of MT4 , I want to make some modification to my EA and as you see bellow everything is OK after compiling the EA but when I try to drag it to the chart I got this message "the EA is not expert and cannot be executed"

Could you help me to know what happen with the last update.?????

Forum on trading, automated trading systems and testing trading strategies

MetaTrader 4 platform beta build 1145

Fernando Carreiro, 2018.11.17 16:39

Probably the very old style event handlers init(), deinit() and start() are now considered obsolete and no longer supported.

If that is the case, you will have to update to the MQL4+ version of using OnInit(), OnDeinit() and OnTick() which have been the standard for many years now.

Osama Hussein
331
Osama Hussein  
Fernando Carreiro:

Hello,

I do as you said and I change all old style to be as you mentioned and compile it with zero errors and when I attach to the chart I got the same message 

This is bellow the result after compiling!!!!

'Super Rock V3.mq4' Super Rock V3.mq4

'stdlib.mqh' stdlib.mqh

'stderror.mqh' stderror.mqh

0 error(s), 0 warning(s), compile time: 498 msec


here the new version as your advice

void OnStart()

  {

   if(MarketInfo(Symbol(),MODE_DIGITS)==4 || MarketInfo(Symbol(),MODE_DIGITS)==2)

     {

      slippage=user_slippage;

     }

   else if(MarketInfo(Symbol(),MODE_DIGITS)==5 || MarketInfo(Symbol(),MODE_DIGITS)==3)

     {

      slippage=10*user_slippage;

     }


   if(IsTradeAllowed()==false)

     {

      Comment("Copyright © 2020, www.golden4xeg.blogspot.com\nTrade not allowed.");

  //    return;

     }


// Updating current status

   if(ShowTitle)

     {

      Display_Title();

     }

   if(ShowTradeComment)

     {

      Display_Info();

     }

   if(ShowStats)

     {

      DrawStats();

     }

   InitVars();

   UpdateVars();

   SortByLots();

   ShowData();

   ShowLines();

   Robot();

//   return;

  }


Osama Hussein
331
Osama Hussein  
Alain Verleyen:
Don't use a function OnStart() or start().

Ok what i have to use instead ? which function I have to replace ?

Keith Watford
Moderator
20312
Keith Watford  
Osama Hussein:

Ok what i have to use instead ? which function I have to replace ?

OnStart() is for scripts

OnTick() is for EAs

12
To add comments, please log in or register