Writing EA
- OnTick (and start) function in EA does not work on Weekend
- 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.
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.
Event Handling Functions - Functions - Language Basics - MQL4 Reference