How to include commission fees in backtest of an EA in MT4?

 
Someone can Help please?
[Deleted]  

Forum on trading, automated trading systems and testing trading strategies

Are swaps and commissions included in backtest?

William Roeder, 2019.12.07 01:58

Don't know about all brokers, but every one I've used, the tester has simulated commission and/or swap.

However, do not count on OrderCommission and OrderSwap. Some brokers don't use those fields. (Maybe related to Government required accounting/tax laws.)
          please help: Mt4 commission - Trading Accounts - MQL4 programming forum
          "balance" orders in account history - Day Trading Techniques - MQL4 programming forum

Broker History
FXCM
Commission - <TICKET>
Rollover - <TICKET>

>R/O - 1,000 EUR/USD @0.52

#<ticket>  N/A
OANDA
Balance update
Financing
 
Mickael Bensimon:
Someone can Help please?

If I understood your question correctly:

In MT4 (MQL4) during backtesting:

  • Only the spread can be changed.
  • Commission and swap cannot be adjusted in the Strategy Tester and are not reflected automatically.

In MQL5 (MT5):

  • The Strategy Tester is much more advanced.
  • You can directly adjust spread, swap, commission, and even slippage, making backtests much more realistic.
  • Equity graphs and reports accurately reflect all costs.