Hello forum,
I have my entry and my stop-loss and I want to calculate the lot size according to my risk-management. It works fine and this is how I do it:
Now I want to include the commissions into this calculation. My broker charges $7 for a full roundturn. I wanted to convert the commission into pips and add them to the variable "pipRisk".
Because I have a Euro-based account I think I have to convert the commission into Euro first:
But now I am lost... I have no idea how to include the commission into my risk-calculation. Can anyone help me?
try OrderCommission()
try OrderCommission()

- docs.mql4.com
Hello Ahmet,
I can only use OrderCommission() if I have an existing order. But I need to calculate the lotsize including the commission before I place a trade.
I tried something like this but I don't really understand what I am doing here...
double commissionUSDPerLot = 7; double commissionEURPerLot = commissionUSDPerLot/MarketInfo("EURUSD", MODE_BID); double commissionPerLotInPips = (commissionEURPerLot/MarketInfo(_Symbol, MODE_TICKVALUE))*MathPow(10, -(_Digits-1));

- 2014.06.09
- www.mql5.com
basicly if your broker commission is 7 ( round turn ) your commission will be equal to 0,7 spread per 0,01 lot
I think =)
basicly if your broker commission is 7 ( round turn ) your commission will be equal to 0,7 spread per 0,01 lot
I think =)
Imagine if you want to trade GBP/NZD and you have a EUR-account. A roundturn of 100,000 GBP/NZD costs $7. But how do you integrate the commission-costs in USD into GBP/NZD when you have a EUR-account?
I guess you have to convert the $7 into NZD first and then convert the NZD amount somehow to the spread.
I think this is really complex. Or maybe it's easy but I don't know how to do...?!
Imagine if you want to trade GBP/NZD and you have a EUR-account. A roundturn of 100,000 GBP/NZD costs $7. But how do you integrate the commission-costs in USD into GBP/NZD when you have a EUR-account?
I guess you have to convert the $7 into NZD first and then convert the NZD amount somehow to the spread.
I think this is really complex. Or maybe it's easy but I don't know how to do...?!
lots=AccountBalance()*(riskPercent/100.0)/(commisionInMoney+slInPoints*MarketInfo(Symbol(),MODE_TICKVALUE));Given that your broker has properly set Tick value.
What do you mean with commissionInMoney? Which amount and which currency? I only know the general commission which is $7 per roundturn.
What do you mean with commissionInMoney? Which amount and which currency? I only know the general commission which is $7 per roundturn.
Commission round turn / lot in account currency. In your case commissionInMoney = 7.0
Commission round turn / lot in account currency. In your case commissionInMoney = 7.0
Because I have a EUR account I changed it to:
lots=AccountBalance()*0.01/(7/MarketInfo("EURUSD", MODE_BID)+slInPoints*MarketInfo(Symbol(),MODE_TICKVALUE));
But unfortunately that doesn't work correct. The calculated lotsize is too high for the 1% risk.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello forum,
I have my entry and my stop-loss and I want to calculate the lot size according to my risk-management. It works fine and this is how I do it:
Now I want to include the commissions into this calculation. My broker charges $7 for a full roundturn. I wanted to convert the commission into pips and add them to the variable "pipRisk".
Because I have a Euro-based account I think I have to convert the commission into Euro first:
But now I am lost... I have no idea how to include the commission into my risk-calculation. Can anyone help me?