Forex Backtesting
Find out whether a setup has worked before, on real data, before you put money behind it.
What backtesting is
Backtesting means taking a trading idea, writing it down as rules precise enough that there is no judgement left, and checking what would have happened every time those rules were met in the past. "Buy when the trend turns up" is an opinion. "Buy when the 1 hour trend is bullish and the squeeze score is 70 or more" is a rule you can test.
The point is not to find a strategy that never loses. It is to find out, before you risk anything, whether a setup you like has any edge at all, how often it comes up, and how bad the bad trades get.
How to backtest a forex strategy
- Write the entry as rules. Every condition must be a yes or no answer from the chart or the data: a trend direction, a reading above or below a level, a percentage move.
- Decide how long you hold. A fixed horizon (one hour, four hours, a day) keeps the test honest. Moving the exit after seeing the result is how backtests lie.
- Pick a test window and stick to it. Test across different conditions: a trending month and a choppy month can give opposite answers.
- Look at the spread of results, not the average. A positive average built on two huge winners and a long run of small losses is a very different strategy to trade than a steady one.
- Check the sample size. Twelve matches tell you almost nothing. A few hundred start to mean something.
You can do this by hand, scrolling back through charts and logging each signal in a spreadsheet. It works, but it is slow, and it is very easy to see the setups you expect and miss the ones that failed.
How the Markets Mastered backtester works
The backtester runs on the same data the platform uses for its live readings: a snapshot of every tracked instrument every 15 minutes, with trend, squeeze, volatility and currency strength. You build a rule set from those readings and it finds every past moment they lined up.
- Rules from the platform's own readings: squeeze score, percentage change over 15 minutes to a day, ATR in pips, base and quote currency strength, and trend direction on the 15 minute, 1 hour, 4 hour and daily charts.
- Up to five conditions, combined with AND (all must match) or OR (any can match).
- One pair or the whole universe, over the last 7, 30 or 90 days.
- A fixed horizon of 1 hour, 4 hours or 1 day, measured from each match.
For each test you get the number of matches, the win rate, the average, best and worst move over the horizon, a histogram of every outcome, and a sample of the individual matches so you can check them on a chart.
Example rule set
Tested on every tracked pair over 30 days, measuring the move 4 hours after each match. Asks one question: when a pair is coiled tight and the hourly trend is up, does it tend to break higher?
What a backtest cannot tell you
A backtest measures how price moved after the rules were met. It does not include spread, commission or slippage, and it does not know where you would have put your stop. Treat a good result as a reason to watch the setup live and log it in your journal, not as proof it will keep working. Markets change, and the last 90 days are only the last 90 days.
Once a setup earns a place in your plan, size every trade from the stop with the position size calculator, so a losing run costs what you expected and no more.