- "iCustom" Alternative
- A newbie question
- MT5 Script
You are mixing things up. The old "start()" event handler is from the old (almost obsolete) ways of coding MQL4 and has nothing to do with the newer "OnStart()" of MQL4+/MQL5.
"OnTick()" handles tick events in an Expert Advisors (EA) and is called on new ticks to be processed (in MQL4+/MQL5), while the "OnStart()" is called only once when running a Script (MQL4+/MQL5) or Service (only available on MQL5).
"OnTick()" is not used in Scripts, Services nor Indicators, while "OnStart()" is not used in EAs nor Indicators.
You should not be using the old ways to code in MQL4. Stick with the more modern MQL4+ which is more compatible with MQL5.
- docs.mql4.com
You are mixing things up. The old "start()" event handler is from the old (almost obsolete) ways of coding MQL4 and has nothing to do with the newer "OnStart()" of MQL4+/MQL5.
"OnTick()" handles tick events in an Expert Advisors (EA) and is called on new ticks to be processed (in MQL4+/MQL5), while the "OnStart()" is called only once when running a Script (MQL4+/MQL5) or Service (only available on MQL5).
"OnTick()" is not used in Scripts, Services nor Indicators, while "OnStart()" is not used in EAs nor Indicators.
Wow! Just imagine me. Now I understand. Thanks to you Fernando. I used to think that start() and OnStart() can be used interchangeably on EA and that I preferred using start(), not knowing that OnStart() can't even work in an EA. Now I know that start() is an old version of OnTick(). What an evolution!
But they should discontinue the use of start() to avoid confusion with Start.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use