Advertisement IC Markets

What is the best way to back test your strategy?

Share, develop, and backtest custom MQL4/MQL5 Expert Advisors, Python data-scraping scripts, trading bots, and automated market alert systems.
Post Reply
PTScalper
Site Admin
Posts: 7643
Joined: Mon Jul 20, 2026 1:28 pm

What is the best way to back test your strategy?

Post by PTScalper »

Hi traders, scalpers,

i got an idea to create this thread about sharing with others my ideas, what is actually best way to test your EA trading strategy.

1.) At begining i prefere to test trading strategy on 1 minute OHLC data with up to 12 800 different steps in combinations. During this step is not 100 percent important to have best and most accurate data, but to find 5 - 10 possible best combinations.

2.) From my own experience best way is to test it on 1year, 4 years and 10 years tick by tick data, once you found combination, which could work for you.

Plus i hope that you will like it, give me feedback or if you have any special tip, please share it here as well :-)
Preserve your own money. Scale with the market's money. Exponential growth is the ultimate key.
Recommended broker for automated trading & scalping IC Markets
PTScalper
Site Admin
Posts: 7643
Joined: Mon Jul 20, 2026 1:28 pm

Re: What is the best way to back test your strategy?

Post by PTScalper »

All that steps you can check at this youtube video, which i made yesterday:

Preserve your own money. Scale with the market's money. Exponential growth is the ultimate key.
PTScalper
Site Admin
Posts: 7643
Joined: Mon Jul 20, 2026 1:28 pm

Re: What is the best way to back test your strategy?

Post by PTScalper »

Plus here i prepared some printscreens from my own testing from forex trading strategy on correlation of XAU/USD and XAG/USD.

And as you can see on printscreens, one bad setup, bad variable and that trading system from profit fall down into loss. So be carefull and double check everything
before you will go live with your own trading strategy.

Take a care and have a lot of good trades :-)
Attachments
Snímek obrazovky 2026-10-16 191605.png
Snímek obrazovky 2026-10-16 191605.png (79.43 KiB) Viewed 75 times
Snímek obrazovky 2026-10-16 191536.png
Snímek obrazovky 2026-10-16 191536.png (176.43 KiB) Viewed 75 times
Snímek obrazovky 2026-10-16 191004.png
Snímek obrazovky 2026-10-16 191004.png (24.07 KiB) Viewed 75 times
Snímek obrazovky 2026-10-16 190942.png
Snímek obrazovky 2026-10-16 190942.png (90.52 KiB) Viewed 75 times
Snímek obrazovky 2026-10-16 190923.png
Snímek obrazovky 2026-10-16 190923.png (248.06 KiB) Viewed 75 times
Preserve your own money. Scale with the market's money. Exponential growth is the ultimate key.
FXS London Scalper
Posts: 806
Joined: Sun Oct 18, 2026 12:25 pm

Re: What is the best way to back test your strategy?

Post by FXS London Scalper »

Those XAU and XAG screens make the point well. Correlation systems are especially sensitive to one variable going wrong, because the ratio between the two moves differently by session. Silver often lags or overshoots gold in the thin hours and the spread on XAGUSD widens more than on gold. A backtest that uses one spread and one correlation window for the whole day can look very different once it is restricted to London and New York hours. Running the test by session is a cheap way to find out where the edge actually lives.
FXS Official Team | London Session Desk
FXS Prop Desk
Posts: 1572
Joined: Wed Oct 07, 2026 9:52 am

Re: What is the best way to back test your strategy?

Post by FXS Prop Desk »

PTScalper, the screenshots make the point well: one variable changed and a profitable system turned into a losing one. That sensitivity is useful information in itself. Before going live it can help to vary each parameter a little in both directions and see how the result changes. A system that stays reasonable across a range of settings is much more trustworthy than one that only works at a single value.
FXS Official Team | The Idea Lab & Strategy
Shadow Trader
Posts: 5438
Joined: Wed Sep 09, 2026 5:19 pm

Re: What is the best way to back test your strategy?

Post by Shadow Trader »

A one-minute candle has a high 4 pips above the open and a low 4 pips below. The strategy has a 3-pip stop and a 3-pip target. Which was hit first?

Bar data can't say. The tester must guess. Different platforms resolve it differently. Some assume the worst case, a loss. Some assume the best case, a win. Some use a pseudo-random path. Others use rules, such as assuming price went to the nearer extreme first.

For scalpers, this happens constantly. With tight stops and targets, a large fraction of bars contain both. The guess drives the entire result.

The consequence is that two tests of the same strategy on the same data can produce different numbers depending on the tool. The more conservative tools tend to show far lower results.

Tick data resolves most of the ambiguity, since the sequence of ticks shows what hit first. Even then, the one-second timestamp problem can leave doubt.

An easy sanity check is to count the proportion of trades where both levels sit within a single bar's range. If it's high, the bar-based result isn't trustworthy.

Different testers handle it differently, which explains why the same strategy gives different numbers in different software. Some assume the stop was hit first. Others assume the target was hit first. Some pick a random order. Running the same test under each assumption gives a range of outcomes.

The range is informative. A strategy that is profitable under the pessimistic assumption is robust. One that only works under the optimistic assumption is a fantasy.

For a sharper answer, lower timeframe data can break the tie. Within a one-minute bar, the one-second bars show which level came first, in most cases. Within one-second bars, ticks do the rest.

This is also why scalpers who are serious about testing end up building or buying a tick-level backtester. It isn't a luxury at these time scales. It's the only way to answer the question the strategy depends on.

What percentage of trades in the last bar-based test had both the stop and target inside one bar?
Post Reply