Newbie question: Do I need to enable Alert() and Print() function before using them ?

 

I created an simple EA and only droped following two lines in the "Start()" function.


Alert("1111121");

Print("1111121");


compiled it and return back to MetaTrader terminal. then I added this EA on EUR/USD 1 min chart. wait for about 5 mins. no Alert pop out, checked "expert" tab, "1111121" didnt show up there.


Do I accidently changed some settings and disable those 2 functions?


Please help me.

 

FE

That should work - post all the code you are using & we'll have a look

-BB-

 
here's my code.
//+------------------------------------------------------------------+
//|                                                        alert.mq4 |
//|                      Copyright © 2009, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2009, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
   Alert("1111121");
   Print("1111121");
   
   return(0);
  }
//+------------------------------------------------------------------+
 

Have you got a smiley face beside the EA on the chart?


CB

 

yes, smiley face is there, next to the EA name. its at upper right corner.


I pretty sure code is correct. probably somewhere I messed up the setting.

 
nothing wrong with my code, i just reboot my computer. now, its working, alert box showed up. I didn't turn it off for about a week. this is weird.
 
feelexit:
nothing wrong with my code, i just reboot my computer. now, its working, alert box showed up. I didn't turn it off for about a week. this is weird.

i used a long time win98.

after 24 hours the system crashed.

later i found out, that this is a win98 bug, because a internal counter overflows.


if you dont use linux, is always a godd advise to reboot the system in regularly intervals.

sure there are other systems that are stable over month, but i only know of some linux distributions.


besides that, MT4 crash relativ often, but this may depend on my code (divison by zero or endless loops etc)

sometimes only a reboot helped in my case


greetings