Dicky Lam: Hi Expert, MQL5 reference has a standard library and contain a trade class, one of them is ctrade. However, Under same MQL5 reference, there are trade functions also. I found both can perform trade operation, but when programming, what is the difference, and which one is better? Can share your expert idea?
Both methods have their advantages and disadvantages. It depends on your coding style. Do you prefer to program in a procedural or functional way of logic, or do you prefer a more object oriented way?
Comparison of programming paradigms
Dicky Lam #: Hi Fernando Carreiro, Thanks your information. I prefer object oriented method, so trade class is it, right ?
That is up to you to decide.
I personally prefer procedural/functional as I have more control to make it more efficient and consume less resources.
On the few occasions I do use OOP, I write my own classes. I don't trust the Standard Library, due to its many bugs.
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
Hi Expert,
MQL5 reference has a standard library and contain a trade class, one of them is ctrade.
However, Under same MQL5 reference, there are trade functions also.
I found both can perform trade operation, but when programming, what is the difference, and which one is better?
Can share your expert idea?
Thanks.