Reply

Question: MT4 Backtest Commissions – Is This Possible To Do?

3 replies

SimpliTrade

Subscriber, bbp_participant, community, 5 replies.

Visit profile

6 years ago #117872

Hi there,

I am importing multiple MT4 backtest reports  into QA, creating a portfolio with them,  then re-simulating via Money Manager using a % of account balance, effectively simulating 3 different systems running on one account all compounding off one another.

 

Can i make a snippet code to deduct a given % from the profit amounts, or put into the Commission column instead? I would use this to simulate a broker commission being charged,

 

I have looked at lots of other ways of handling commission charged by the broker in such circumstances but the other methods all have flaws, which I can go into detail on, but this would by far be the easiest way..

 

Best regards,

 

Alan

0

SimpliTrade

Subscriber, bbp_participant, community, 5 replies.

Visit profile

6 years ago #145043

Hi Mark Fric & Everyone!

 

Just to update, yes it is possible via a What-If snippet,

 

I will edit this post later and provide the code so others don’t have to endure the struggle I have had with it all 🙂

 

—–

 

e2a: Ok, please find the what-if plugin attached.

 

Deduct Broker Commissions Snippet (MT4)

How It Works / How To Use:

 

1. Run all your backtests on MT4. Do not include any commissions at all.

 

2. Place the attached snippet file in your QA’s WhatIf folder: i.e. C:\QuantAnalyzer4\extend\Snippets\com\strategyquant\extend\WhatIf

 

3. Load MT4 reports into QA. Merge them using Create Portfolio button.

 

4. Run MM Simulation however you like via Money Management tools (Risk Fixed % Of Account Balance, for example)

 

5. Then goto What-If’s and you should see “Deduct Broker Commissions” in the list. You can set the parameter Commission / RTL (Round Turn Lot) as desired. Apply the what-if and hey-presto!

 

6. Commissions will get calculated and placed in the correct CommSwap column, and be deducted from every trades Profit amount.

 

I hope this is useful for others!

 

The outcome is a nice clean & accurate method of simulating multiple EAs running on a single MT4 account, with broker commissions taken off. If you use this method together with Tick Data Suite (using Variable Spreads/Slippage) your backtests will be as close to the real thing as you’re going to get.

 

Regards,

 

Alan

0

Karish

Customer, bbp_participant, community, sq-ultimate, 444 replies.

Visit profile

6 years ago #145047

You can also do that with TickStory / TickDataSuite.

0

SimpliTrade

Subscriber, bbp_participant, community, 5 replies.

Visit profile

6 years ago #145049

You can, however if you are running multiple EAs and want to re-simulate via QA’s money management feature, the regenerated profits ‘forget’ about the broker commissions. Which is why this is required.

0

Viewing 3 replies - 1 through 3 (of 3 total)