How to obtain commission per lot in MQL5

 

I am trying to calculate lotsize for my EA - everything is fine except the commission per lot aspect.

Does anyone have idea of how to obtain commission per lot in mql5?

I have seen some EAs that developers are able to account for commission per lot for a symbol.

Anyone there to help?

 
Boyifx Boyifx:

I am trying to calculate lotsize for my EA - everything is fine except the commission per lot aspect.

Does anyone have idea of how to obtain commission per lot in mql5?

I have seen some EAs that developers are able to account for commission per lot for a symbol.

Anyone there to help?

Currently only possible by manual input.

You cannot read the value from symbol specs. MQ has not implemented that (yet).


 
You can build your own commission calculator just like some others did that is available on codebase 
OnTester Commission Calculator
OnTester Commission Calculator
  • www.mql5.com
Calculates Brokerage, Commission or Slippage based on the Input on the strategy Tester