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
I like the idea of having dedicated classes for money management within MQL5: CExpertMoney and derived classes, especially CMoneyFixedRisk, which allows to defined a percent of risk for a trade (e.g. 2%).
I though that these classes are meant as "ready to go" but now it seems to me that they are not really mature.
E.g. I found out that while in the parent class, CExpertMoney, there is a check for the available margin:
but in the derived class, CMoneyFixedRisk, there is no such check, only static, balance-independent min and max volumes are checked, which means that at OrderSend(...) there will be an 10019 error thrown (TRADE_RETCODE_NO_MONEY, "There is not enough money to complete the request").
(both functions MaxLotCheck() and OrderProfitCheck() are defined within CAccountInfo class).
I'm a bit dissapointed since it means that for real use I cannot take those classes and use (it was my naive expectation), but I need to derive my own class for fixed percent risk money management and the provided classes are nothing more than just very simplistic examples.
Also this gives me a feeling, that I cannot rely on any of the provided object oriented classes but need to be very careful and double check each line of their framework code, instead of focusing on the EA logic only.
Am I right or did I misunderstand something?