Building and Testing a Forex Trading Strategy

A forex trading strategy needs more than an entry signal. It needs written rules for when to trade, how much to risk, when to exit and when to do nothing. Testing then asks whether those rules produced acceptable results after costs, without relying on information that was unavailable at the time.

The useful outcome is not a perfect historical profit chart. It is a documented reason to reject an idea, revise it or move it into further testing. Within forex trading in the UK, that means separating the behaviour of a currency pair from the pricing, funding and execution of the product used to trade it.

Start with a hypothesis, not an indicator collection

Write down why the strategy might work before choosing its settings. A hypothesis could be that a move beyond an established morning range sometimes continues far enough to cover trading costs. Another might be that unusually large moves reverse during otherwise quiet conditions. These are ideas to investigate, not established sources of profit.

Keep the first version narrow: one currency pair, one timeframe and one entry method. Adding indicators whenever a losing trade appears can turn a simple hypothesis into a collection of exceptions. Every extra rule should have a purpose beyond improving yesterday’s results.

Define success before running the test. Your research plan might require positive returns after estimated costs, acceptable drawdowns and results that do not depend on one exceptional month. Set those standards around the intended use of the strategy, rather than adjusting them to accommodate whatever the backtest produces.

Turn the idea into rules another person could follow

“Buy a strong breakout” leaves too much room for hindsight. Define the price reference, the completed candle that creates the signal and the earliest executable entry. Exit rules need the same precision.

The following is an illustrative research specification, not a recommended or validated strategy.

Example specification for a GBP/USD breakout test
Component Rule to test
Market and data GBP/USD, using 15-minute midpoint candles for signals and bid/ask quotes for simulated execution.
Reference range The highest and lowest midpoint prices recorded from 08:00 up to, but excluding, 10:00 London local time.
Entry Buy after the first later candle closes above the range high, provided it closes before 12:00. Execute at the next available ask price.
Exit Place a stop 20 pips below the actual entry and a target 30 pips above it, evaluated against bid prices. Close any remaining position at 16:00.
Trading restrictions One trade per day. Skip the day if the spread exceeds 1.5 pips at the first qualifying entry or required data is missing.
Sizing Size the position so the planned loss across the 20-pip stop distance equals 0.25% of current account equity, before costs and slippage.

The numbers are placeholders for research, not evidence that these settings work. The risk percentage also describes a planned loss, not a guaranteed maximum. Costs and a worse stop execution can increase the realised loss.

Fix the sizing method before comparing strategy versions. Otherwise, a larger position can make a weaker entry rule look better in cash terms. The calculations belong in a separate process covering pip values and forex position sizes, including conversion into the account currency and rounding to permitted trade sizes.

Choose data that can answer the question

Match the data resolution to the decision being tested. Daily observations cannot establish whether a stop or target was reached first during a morning trade. Even 15-minute candles may be insufficient when both exit levels fall inside the same candle.

The Bank of England’s daily spot exchange-rate database provides historical currency observations and explicitly notes that its rates are not official rates. Such a daily series is not an executable intraday bid/ask history. Institutional provenance does not make a dataset suitable for every trading test.

Before testing, inspect timestamps, missing periods, duplicate observations and unusual price spikes. Establish whether candles use bid, ask or midpoint prices. Preserve the original data and record any corrections so the result can be reproduced.

For a London-time strategy, define whether the schedule follows London local time or fixed UTC. Do not treat those as interchangeable. Store timestamps consistently and apply the intended clock conversion throughout the dataset.

Also document the product being simulated. A currency price series alone does not contain an account’s commissions, funding adjustments, minimum order size or margin requirements.

Model costs and execution before judging profitability

Build costs into the test from the start. Include the spread, commissions, funding where applicable and charges for converting realised profits or losses into the account currency. Do not assume that an overnight credit or charge is identical across providers. The FCA’s review of CFD pricing and value found wide differences in overnight funding charges and shortcomings in their disclosure.

A hypothetical strategy averaging three pips per trade before costs retains only one pip if its average total trading cost is two pips. One more pip of execution friction removes that estimated advantage. This arithmetic is why small apparent edges need particularly careful cost assumptions.

Where historical bid/ask quotes are available, simulate purchases at the ask and sales at the bid. Avoid subtracting a second full spread if it is already reflected in those execution prices. With midpoint-only data, label the spread model as an assumption and test several plausible cost levels.

Do not give every stop its requested price or assume that touching a limit price guarantees a fill. If a candle reaches both the stop and target, use finer data or apply a declared conservative assumption. Keep the detailed treatment of order execution, slippage and broker pricing separate from the signal logic, so each can be checked independently.

Prevent hindsight from entering the backtest

Use only information available at the decision time

A signal calculated from a candle’s closing price cannot automatically receive a fill earlier within that candle. Model the decision after the candle closes and the trade at the next executable opportunity.

Apply the same discipline to other inputs. A strategy using economic releases needs the figures available at publication, rather than later revisions. An indicator that changes earlier signals when new prices arrive needs to be reconstructed as it appeared at each decision point.

For manual testing, reveal the chart progressively and record the decision before exposing later prices. Otherwise, an apparently obvious setup may owe more to the visible outcome than to the written rules.

Keep a record of every variation tested

Trying many combinations and reporting only the winner creates a selection problem. A profitable result may reflect repeated searching rather than a repeatable advantage. Research on the probability of backtest overfitting examines this problem and the weaknesses of relying on a simple holdout sample alone.

Maintain a research log containing each rule change, parameter set and result. Include discarded versions. “One winning strategy” means something different when it was selected from five candidates rather than five thousand.

Separate development, validation and final testing

Use an earlier chronological period to develop the rules, a later period to compare a small number of justified alternatives, and a final untouched period to evaluate the frozen version. There is no universally correct percentage split; the periods must contain enough relevant opportunities to be informative.

Do not randomly shuffle individual time observations into training and testing groups. Keep future information out of earlier decisions, and handle trades crossing dataset boundaries consistently. Where trades or outcome windows overlap, leave enough separation to prevent the same outcome information appearing on both sides.

Once you inspect the final period and change the strategy because of its results, that period has become development data. Renaming it “out of sample” does not restore its independence.

For a strategy intended to be recalibrated, consider walk-forward testing: choose settings using past data, apply them to the next unseen block, then advance the process. Record the combined results from those unseen blocks, including recalibration costs and any interruptions.

Read the results beyond the win rate

A useful report should show net returns, trade count, average win and loss, maximum drawdown, longest losing streak, time spent below the previous equity peak and exposure to the market. Report open-position losses as well as closed trades; an attractive balance curve can hide uncomfortable floating losses.

Expressing outcomes in units of planned risk can help comparison. If one unit, or 1R, is the initial planned price risk, a realised loss may exceed 1R after slippage and costs.

Estimated expectancy = win probability × average win − loss probability × average loss.

For illustration, a 45% win rate with average net winners of 1.5R and average net losers of 1R gives an estimated expectancy of 0.125R per trade. This is sample arithmetic, not a forecast. The distinction between estimated advantage and survival under losses is covered further in trading expectancy and risk of ruin.

Break results down by year, direction and market conditions. Check whether profits depend on a handful of trades. There is no magic minimum trade count: hundreds of closely related entries during one trend may offer less independent evidence than the headline number suggests.

Stress-test the assumptions

Ask how easily the result breaks. Repeat the test with wider spreads, worse fills and modest execution delays. Change nearby parameter values without searching for a new winner. A strategy that works only at one exact setting deserves more scrutiny than one with reasonably consistent neighbouring results.

Useful checks include:

  • Increasing assumed costs and measuring when estimated expectancy becomes negative.
  • Removing the largest winning trades to reveal profit concentration.
  • Testing quieter, faster-moving and directionless periods separately.
  • Simulating overlapping positions, available margin and account close-outs.

Reordering or resampling trade outcomes can help investigate alternative drawdown paths, but state what the simulation assumes. Randomly shuffling independent trades can understate risk if losses arrive in clusters. No resampling method creates market events absent from its inputs.

Forward-test the frozen rules

Forward testing applies the strategy to incoming prices without rewriting decisions afterwards. Use it to check signal timing, order handling, data interruptions and whether the written instructions are practical to follow.

Keep simulated performance separate from actual trading. Hypothetical results do not reproduce all liquidity, slippage or behavioural effects of risking money, limitations addressed in the NFA notice on hypothetical performance results. A demo account is useful for checking operation, not certifying future profitability.

Log every qualifying signal, including missed and rejected trades. Compare the modelled entry with the available quote, record the spread and preserve the reason for any deviation. Repeated mismatches may reveal a faulty execution model rather than a faulty signal.

If real-money testing is considered, first set an affordable research loss limit and a small exposure ceiling. Live trading is not a compulsory graduation step. Rejecting a strategy after careful testing is a valid result.

Set review and stopping rules in advance

Write down what would trigger a pause: broken data, repeated execution errors, costs exceeding the tested range or drawdown beyond the research budget. Distinguish an operational failure, which may require immediate action, from ordinary losing trades that the test already anticipated.

UK retail protections do not validate a trading strategy. The FCA’s CFD restrictions, including rolling spot forex provide protections such as account-level negative balance protection, but these remain high-risk products. Those safeguards do not prevent losses within the account.

Keep each strategy version, dataset and review decision together. The standard is not whether a chart looks convincing. It is whether the rules remain reproducible, the assumptions withstand challenge and the evidence justifies taking any further risk.