EA does not go into start() function, please help!!

 

Hi,

Made an EA and was wondering why it did not work if there were no errors i the code. And found a problem. Even if i put that rookie code(bellow) i get init() alert that function initialized and that's it! I do not get any alert from start() function! How should i reach that code in start function? When i remove EA from window i get that alert that denit() function triggered. So problem is with that code in start() function. Anybody knows why i can't reach it? Tried in M1,M5 charts, tried reload metatrader and nothing...


//--------------------------------------------------------------------
// simple.mq4
// To be used as an example in MQL4 book.
//--------------------------------------------------------------------
int Count=0;                                    // Global variable
//--------------------------------------------------------------------
int init()                                      // Spec. funct. init()
   {
   Alert ("Function init() triggered at start");// Alert
   return;                                      // Exit init()
   }
//--------------------------------------------------------------------
int start()                                     // Spec. funct. start()
   {
   double Price = Bid;                          // Local variable
   Count++;                                     // Tick counter
   Alert("New tick ",Count,"   Price = ",Price);// Alert
   return;                                      // Exit start()
   }
//--------------------------------------------------------------------
int deinit()                                    // Spec. funct. deinit()
   {
   Alert ("Function deinit() triggered at deinitialization");   // Alert
   return;                                      // Exit deinit()
   }
//--------------------------------------------------------------
 
orangutangas1:

Hi,

Made an EA and was wondering why it did not work if there were no errors i the code. And found a problem. Even if i put that rookie code(bellow) i get init() alert that function initialized and that's it! I do not get any alert from start() function! How should i reach that code in start function? When i remove EA from window i get that alert that denit() function triggered. So problem is with that code in start() function. Anybody knows why i can't reach it? Tried in M1,M5 charts, tried reload metatrader and nothing...

Did you start EAs ?

 
Of course i did
 
orangutangas1:
Of course i did
So you have a smiling face in the top right corner of your chart ?
 
orangutangas1:

Hi,

Made an EA and was wondering why it did not work if there were no errors i the code. And found a problem. Even if i put that rookie code(bellow) i get init() alert that function initialized and that's it! I do not get any alert from start() function! How should i reach that code in start function? When i remove EA from window i get that alert that denit() function triggered. So problem is with that code in start() function. Anybody knows why i can't reach it? Tried in M1,M5 charts, tried reload metatrader and nothing...



Where is saved this EA ?

Which MT4 build are you using ?

 
RaptorUK:
So you have a smiling face in the top right corner of your chart ?

The smiling face isn't needed for the posted code to run, it's only needed to trade.
 

Hi,

Once again. Mystery solved somehow. Have no idea how. Restarted just my pc and that's it, it started working...

Ty guys!

Reason: