Download MetaTrader 5

Is this an mql5 bug?

To add comments, please log in or register
abbeysworld
218
abbeysworld  
I recently tried to make Xupypr ea object oriented by attaching classes that perform trade executions. I found out that the initial optimization without the object oriented approach worked well. The results were good. Then, I proceeded by enabling the objects and it failed to achieve the former result. I thought this might be a result of programming error, then I stripped all the code from the attached class and still I got the same poor result. Could this be a bug or am I missing something?
Get in touch with developers using Service Desk!
Get in touch with developers using Service Desk!
  • www.mql5.com
We therefore attach great importance to all user reports about issues in our programs and try to answer each one of them.
Files:
mql5Error.zip 41 kb
Rashid Umarov
Admin
12075
Rashid Umarov  

Every class must have a constructor. See the article The Order of Object Creation and Destruction in MQL5
abbeysworld
218
abbeysworld  
Here is the updated version with a constructor and destructor added. The results of an ea should not change when you add an object that "does nothing"
Files:
mql5Error.zip 79 kb
To add comments, please log in or register