I am new to mql4 programming. I have watched alot of video of mql4 programming and i am ready to start developing my own but my challenge is that when I create a new file I dont see the Start() function as i saw it in the video but I am see OnTick(), OnInit(). Has the Start() function been removed and replaced with OnTick() function
- Activating MT4 EA functions on realtime tick
- Converting old custom indicators to new MQL4 language. - I need help pls
- How do I create a function to process each millisecond?
So you use the OnTick() or OnTimer() function instead.
Start() is depreciated except for in scripts.
So you have usually 3 elements.
OnInit() // this runs only once upon loading the EA
OnTick() // this runs on every new incoming tick
OnDeinit() // this runs only once upon unloading the EA
And a fourth is OnTimer() this runs upon a set interval.
Marco vd Heijden:
Thanks, your comment was very helpful.
So you use the OnTick() or OnTimer() function instead.
Start() is depreciated except for in scripts.
So you have usually 3 elements.
OnInit() // this runs only once upon loading the EA
OnTick() // this runs on every new incoming tick
OnDeinit() // this runs only once upon unloading the EA
And a fourth is OnTimer() this runs upon a set interval.
You should stop using the old event handlers and IndicatorCounted and
start using the new ones.
Event Handling Functions - Functions - Language Basics - MQL4 Reference
Event Handling Functions - Functions - Language Basics - MQL4 Reference

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register