A simple question on realtime versus strategy testing

 
Just trying to get an answer as to why this code seems to work differently when run in the two different modes.
 What should happen here is an alert should occur the first time a price arrives on a new day.
This is what happens when run attached to a chart. However, when run in test mode a new day alert never occurs. 
What is going on here?
datetime Yesterday;
int LastDay = 0;
bool started = false;
//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
   Yesterday = 0;
   Alert("Init!");
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
//----
datetime Today;
Today = 0;

Today = TimeCurrent();

Alert( TimeToStr(Today),":",TimeSeconds(Today), " ",TimeToStr(Yesterday),":",TimeSeconds(Yesterday));
Alert (TimeDay(Today)," ",LastDay);

if (TimeDay(Today) != LastDay)
{
Alert("New Day");
}
Yesterday = Today;
LastDay = TimeDay(Today);

//----
   return(0);
  }
//+------------------------------------------------------------------+
 

Some functions don't work in the tester.

Alerts is one of those things that are disabled during test mode.

 

Thanks phy!

I do get the output from the snippet below

No matter what mode I am in - I don't get the alert for "New Day"

Alert (TimeDay(Today)," ",LastDay);

 

Go in your EA properties in the first tab and make sure that "Disable alarms" is unchecked.

.

Jon

 
Archael wrote >>

Go in your EA properties in the first tab and make sure that "Disable alarms" is unchecked.

.

Jon

Hi Jon and thanks!

It already has alarms enabled I only get the ones outside of the if statement.