- start function not working!!!
- How the Program Flow?
- MQL4 Learning
I have checked with broker(ibfx) and EA are enabled across tha board.
I tested this on EUR/USD - the result was a lot of Alerts but worked as expected.
int init() { //---- Alert("Function init() triggers"); //---- return(0); } //+------------------------------------------------------------------+ //| expert deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- Alert("Function deinit() triggers also."); //---- return(0); } //+------------------------------------------------------------------+ //| expert start function | //+------------------------------------------------------------------+ int start() { Alert("function start() is working.") ; return(0); }
I get plenty alerts too,,, but none from the start function,,,however when I embed the start() function within the init(),,,it works,,, but then that only happens at initialization phase
Works just as it should
I have coded the easiest, simplest EA,,, however the start () function does not trigger. The init() and deinit() functions work. The start will only work when called from within the init(),,, which only happens when loading the EA. What to do so to have the start function working well,,i.e upon an new tick!!! Kindly!!
Why not post the exact code you used. Or maybe try a simple condition before the Alert --> if (Bars > 1) Alert("it works!");
I did in the post that says "I tested this"
Ickyrus, Sorry but I was referring to Kenkajei's reportedly not working code. Not yours.
What Kenkajei typed/reported so far is not what we can verify. As said here by Kenkajei himself.
Its the same code, Just a few more comment lines added in from the initial code lay out normally presented.
Mine works too. Latest build 388. Kenkajel must've type/done something different. Something this simple should not cause any problem. As I said it would help if Kenkajel show the actual code he used - maybe it has been resolved?
//+------------------------------------------------------------------+ //| Init_deinit_start.mq4 | //+------------------------------------------------------------------+ int init() { Alert("====================================="); Alert("INIT() works!"); return(0); } int deinit() { Alert("DEINIT() works TOO!"); return(0); } int start() { Alert("START()...SAME HERE!"); return(0); } //+------------------------------------------------------------------+
Here's the screenshot :
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use