I have this question also, which is specifically: My broker charges 1.X pip round-trip for trades. How do I implement this in MT5 so that commissions are included in the backtest profit calculations?
At current I have to go in and implement manually in the spreadsheet file, which can make what appears to be a profitable strategy a loser. In fact, there is no simple formula for accurately predicting the commission impact with precision, especially if your EA uses different lot sizes in the trading strategy.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
At current I have to go in and implement manually in the spreadsheet file, which can make what appears to be a profitable strategy a loser. In fact, there is no simple formula for accurately predicting the commission impact with precision, especially if your EA uses different lot sizes in the trading strategy.
Thank you for your return Andrei. I forgot to mention, I use MT5 for the Brazilian market.
I understand that using the code below I can recover the commission amount.
But can I define it? This is my problem. In the code, or in the terminal, I don't think where to do this. Exist a setComission function?
Tks all
No, you can not define it.
No, you can not define it.
hum.. ok. Thank you