darwinex / dwxconnect

Seamlessly link any Trading Strategy in ANY programming language to Darwinex liquidity via MetaTrader 4 or 5. DWX Connect is your very own, fully customizable Trading API!
BSD 3-Clause "New" or "Revised" License
166 stars 88 forks source link

Backtesting with commisions / execution costs, which settings for MT StrategyTester? #16

Closed Boscop closed 1 year ago

Boscop commented 2 years ago

I want to backtest my EA in MT5 with real world conditions, by following these articles: IMPORTING HIGH QUALITY TICK DATA TO METATRADER 5 CONFIGURING TRADING FEES IN THE MT5 STRATEGY TESTER WHEN BACKTESTING (CUSTOM SYMBOLS)

https://help.darwinex.com/execution-costs

In the case of both Forex and commodities, the gross commission always equals 0.005% of the nominal value of the base currency. For instance, should you want to buy 1 lot on the EURUSD, that is 100.000 €, the total round-trip cost would be 5 €.

https://help.darwinex.com/calculate-the-pl-and-the-cost-of-a-forex-trade

For currency pairs we charge 0.0025% of nominal value traded or a competitive 0.005% round trip. In MT4, the entire round trip commission gets charged at the opening of the trade and no additional commission is charged afterwards. However, in MT5 the commission is charged "per-side", half at the opening, half at the exit of the trade.

image

I want to enter the execution costs / commisions, which values should I enter?

Charge: Instant by deal volume or Instant by deal value? Entry: In/out deals? From: ? To: ? Commission: ? Minimal: ? Maximal: ? Mode: ? Type: per trade or per volume?

image

image

image

image


On that dialog, there's an Import button. It would be nice if the Darwinex Team could add a file to this repo that can be imported, that contains the right settings for Darwinex's execution costs.


Btw, how high is the quality of the tick data that comes from Darwinex (when I don't import external tick data)?

elvinex commented 2 years ago

Hi, This section is for issues with DWX connect. I am maintaining this repo, but I am not an employee of Darwinex. Regarding the MT5 settings, I think it would be best to ask in the mql5 forum.

About the tick data quality it could be worth writing to the Darwinex support. Not sure, who has this information.

With regards to commissions, I wouldn't bother too much about getting the exact same as in live trading. There are so many other factors influencing backtest (slippage etc.) that differences in commission are negligible. I would just choose an upper estimate.