Newbie request

 

Hey guys,

I'm wondering if I had made any set up mistakes. I am learning MQL4 just now and was trying one of those simple sample programs (see below). I am getting alerts during init() and deinit(). But no alerts are popping up at all during start(). Am I missing to do some set up? Or what do u think is the reason for ticks not invoking start() function? I'm dumb-struck.

FYI, when I call start() from init(), the alert is working fine though. So I dont see an issue with the function but its just not being called when a new tick comes. What could be the prob?

Pls help out.

Cheers

Manoj


//--------------------------------------------------------------------
// 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()
}
//--------------------------------------------------------------------

Reason: