Expert, What happen on Start() ? New comment [Deleted] 2009.03.13 16:11 I have a simple question, this is my code: //+------------------------------------------------------------------+ //| expert initialization function | //+------------------------------------------------------------------+ int init() { //---- Print("--init--"); Alert("init"); //---- return(0); } //+------------------------------------------------------------------+ //| expert deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- Print("--deinit--"); //---- return(0); } //+------------------------------------------------------------------+ //| expert start function | //+------------------------------------------------------------------+ int start() { //---- Print("--start--"); OpenBuy(); Alert("start"); //---- return(0); } //+------------------------------------------------------------------+ void OpenBuy(){ int Ticket=OrderSend(Symbol(),OP_BUY,1,Bid,1,0,0,"expert master",12345,0,Green); Print("OpenBuy"); } The result is that nothing happen on start(), no print, no alert, no OpenBuy call. Why?! Why does my start method never get called in an EA? [ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. OrderSend Issue blogzr3 2009.03.13 16:49 #1 The Expert Advisors button at the top is on or off? [Deleted] 2009.03.13 17:45 #2 This was very stupid matter! I sew init and deinit worked so i didn't check if expert was tured on, it was turned off LoL Now all work together ;-) Thanks New comment
I have a simple question, this is my code:
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
//----
Print("--init--");
Alert("init");
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
Print("--deinit--");
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
//----
Print("--start--");
OpenBuy();
Alert("start");
//----
return(0);
}
//+------------------------------------------------------------------+
void OpenBuy(){
int Ticket=OrderSend(Symbol(),OP_BUY,1,Bid,1,0,0,"expert master",12345,0,Green);
Print("OpenBuy");
}
The result is that nothing happen on start(), no print, no alert, no OpenBuy call. Why?!