Download MetaTrader 5

Is it necessary to build a start() function in an EA?

To add comments, please log in or register
newkitty
11
newkitty  
Is it necessary to build a start() function in an EA? If not, why I cannot find it when creating an EA using the MQL4 Wizard?
Marco vd Heijden
Moderator
5564
Marco vd Heijden  
no.
newkitty
11
newkitty  
Marco vd Heijden:
no.

Thank you! I'll appreciate that if you would like to explain it further more.

I guess that the OnTick() function take place of the start() function. Is that right or not?‌

Ex Ovo Omnia
3352
Ex Ovo Omnia  
newkitty:

Thank you! I'll appreciate that if you would like to explain it further more.

I guess that the OnTick() function take place of the start() function. Is that right or not?‌


In case of MT4, the start function may be still in use as a replacement for OnTick or OnCalculate. However none of the functions is necessary in the code, especially when you are not interested in the tick event.
whroeder1
15934
whroeder1  
newkitty: I guess that the OnTick() function take place of the start() function.
  1. Don't guess, read the documentation.
  2. Since February 3, 2014 (Build 600) Updated MQL4 - MQL4 Reference
  3. Handling Functions - Functions - Language Basics - MQL4 Reference
To add comments, please log in or register