start() does not execute

 

Hi All,

This is my first post so please be kind.

I've done a search of the forum and can't seem to find anyone else who has had the same problem.

the issue is that my first program that I've ever written in MQL4 is that start() does not execute. (Code is Below)

Could someone please take a look at my code and tell me if there is something I've missed or if perhaps I need to change some setting in MT4 so that it will execute correctly.

Thank you so much in advance.

Cheers,

Oxx

//+------------------------------------------------------------------+

//| test.mq4 |

//| ############# |

//| |

//+------------------------------------------------------------------+

#property copyright "##########"



//--------------------------------------------------------------------

int Count=0; // Global variable

//--------------------------------------------------------------------

int init() // Special funct. init()

{

Alert ("Function init() triggered at start");// Alert

return; // Exit init()

}

//--------------------------------------------------------------------

int start() // Special funct. start()

{

double Price = Bid; // Local variable

My_Function(); // Custom funct. call

Alert("New tick ",Count," Price = ",Price);// Alert

return; // Exit start()

}

//--------------------------------------------------------------------

int deinit() // Special funct. deinit()

{

Alert ("Function deinit() triggered at exit");// Alert

return; // Exit deinit()

}

//--------------------------------------------------------------------

int My_Function() // Custom funct. description

{

Count++; // Counter of calls

}

//--------------------------------------------------------------------
 

what does the log say?

is the symbol right to the EA'name a smiling face?

 
Code is fine... have you enabled EA's tools/options/expert advisors ?
 
 
Viffer:
Code is fine... have you enabled EA's tools/options/expert advisors ?
Thanks Viffer, you are quite right, I hadn't.

ubzen:


Thanks Ubzen, I didn't know how to do it, I guess I shouldn't post when in a rush. Its fixed now.

zzuegg:

what does the log say?

is the symbol right to the EA'name a smiling face?


Not intentionally, but when I run the EA (now that I've enabled it) it does put a frown next to the name of the EA in the top right corner of my chart :-P
Reason: