Advertisement IC Markets

Backtesting Basics: Testing an Idea Against History

Share, develop, and backtest custom MQL4/MQL5 Expert Advisors, Python data-scraping scripts, trading bots, and automated market alert systems.
Post Reply
Fairman
Posts: 3303
Joined: Tue Jul 21, 2026 7:11 am
Location: Abuja

Backtesting Basics: Testing an Idea Against History

Post by Fairman »

Backtesting Basics: Testing an Idea Against History

Backtesting means applying your rules to past data to see how they would have performed. Done carefully, it filters out weak ideas before they cost real money.

The manual version works for beginners. Scroll back on a chart, find each instance of your setup according to your written rules, record the entry, stop, target, and result, and continue forward bar by bar without looking ahead. Cover the right side of the chart if necessary.

Record a sufficient number of trades, at least 100 if possible, across different market conditions, including trends, ranges, and high-volatility periods. A test limited to one favorable stretch proves little.

Include costs. Subtract the spread and any commission from each trade. Many strategies that look profitable fall below zero after realistic costs.

Calculate metrics beyond total profit: win rate, average win and loss in R, expectancy, maximum drawdown, and the longest losing streak.

Be honest about limits. A backtest is an estimate. It cannot capture changing conditions, emotional pressure, or execution problems like slippage.

Treat positive results as a reason to move to forward testing on demo or very small live size, not as proof.

Automated backtesting tools exist and are faster, but they require clear rules and careful data, and they make overfitting easier.

Practical step: manually backtest fifty occurrences of your main setup, with costs included, and calculate expectancy.
It’s Fairman :geek:
Recommended broker for automated trading & scalping IC Markets
Fairman
Posts: 3303
Joined: Tue Jul 21, 2026 7:11 am
Location: Abuja

Re: Backtesting Basics: Testing an Idea Against History

Post by Fairman »

For the manual version, log it in a spreadsheet as you go, not afterwards from memory. Date, session, entry, stop, target, result in R, and one extra column: would I really have taken this live? That last column is humbling.
It’s Fairman :geek:
Fairman
Posts: 3303
Joined: Tue Jul 21, 2026 7:11 am
Location: Abuja

Re: Backtesting Basics: Testing an Idea Against History

Post by Fairman »

Worth splitting the results by period too. If 70 of your 100 trades came from one trending month, the overall number is mostly that month. Break it down by quarter and see if it holds up in each one.
It’s Fairman :geek:
Fairman
Posts: 3303
Joined: Tue Jul 21, 2026 7:11 am
Location: Abuja

Re: Backtesting Basics: Testing an Idea Against History

Post by Fairman »

Small thing, but take breaks when you test by hand. After an hour of clicking bar by bar you start seeing setups that aren't really there, and the sample quietly gets worse.
It’s Fairman :geek:
Post Reply