Reporting the bug related to capital management "Risk % of Balance (Volume size depending on Stop-Loss)" in the MQL5 language.
-
@fxDreema @l-andorrà
I built a robot using the MQL5 language and "Risk % of Balance (Volume size depending on Stop-Loss)" risk management that risks 0.5% of the balance. I tested it on a $100,000 account on EURUSD and it works correctly, and if the maximum loss is reached, I will lose $500. But on XAUUSD with the same 0.5% risk, if the maximum loss is reached, I will lose $5,000.I built the same robot using MQL4 and it works correctly, but unfortunately this bug exists when using MQL5. Please fix it.
-
Are you sure you are using the correct pip size rules? XAUUSD is not a standard forex symbol.
-
@l-andorrà Yes, I'm sure about that. It calculates the volume correctly for the XAUUSD symbol in MQL4. This problem only arises when you write the code with MQL5 or convert the MQL4 code to MQL5 using the conversion tool on this website.
-
@l-andorrà The problem was caused by the broker. I changed the broker and it got fixed. wanted to inform you.

-
Thank you for letting us know.
