Learn

Trading terms explained simply, and how to make the most of Backtest Lab.

Beginner: help and explanations everywhere

Your first backtest in 6 steps

  1. 1
    Pick a simple idea

    In “New strategy”, click the “Swing · RSI(2) bounce in an uptrend” template. It buys bitcoin when it has just dropped sharply, but only if the underlying trend is up.

  2. 2
    Read the rules

    In part 3, each line is a condition. In Beginner mode, click the underlined words or the “?” to understand each indicator.

  3. 3
    Keep a stop and a 1% risk

    Part 4: the stop cuts the loss if the trade goes wrong, and the risk per trade caps the loss at 1% of capital. Leave the rest alone for now.

  4. 4
    Choose the period and the fees

    Part 5: test over several years and pick your platform's fee profile. A test without fees is always too optimistic.

  5. 5
    Run the backtest

    The calculation takes from a few seconds to a minute. The report opens by itself.

  6. 6
    Read the guided reading, then the Robustness tab

    The guided reading turns the numbers into sentences. The Robustness tab says whether the result holds or comes from luck. Then change one thing at a time and run it again.

Run my first backtest

The 6 beginner mistakes

  • Trusting a test with few trades

    Under 30 trades, a good result can be pure luck.

  • Tuning to perfection

    Changing the settings until the past is perfect creates a strategy that fails afterwards. Look at the “nearby settings”.

  • Forgetting fees

    In scalping above all, fees and spread often eat the whole gain. Always keep a realistic fee profile.

  • Looking only at the win rate

    90% winning trades is useless if a single loss wipes out ten gains. Look at the profit factor and the average gain.

  • Ignoring the max drawdown

    A strategy that makes +200% but goes through −60% will be dropped long before the end. Ask yourself what you could have stood.

  • Going live too fast

    First follow the strategy live for a few weeks with “Follow live”, then start small.

Glossary

The basics

Backtest
Replaying a strategy on past prices to see what it would have made or lost.
Backtest Lab applies your rules candle by candle over the history, as if you had traded back then, fees included. It's a test on the past: it guarantees nothing for the future, but it quickly weeds out the ideas that don't work.
Symbol (pair)
What you trade: a crypto (BTCUSDT = bitcoin in dollars), a currency pair (EURUSD), gold (XAUUSD) or the Nasdaq 100 (NAS100).
Example: ETHUSDT = ether in dollars, GBPUSD = the pound in dollars.
Forex, gold and Nasdaq
On top of crypto: the major currency pairs (EURUSD…), gold (XAUUSD) and the Nasdaq 100: NAS100 (the future, around 28,000, nearly 24 hours a day on weekdays) or QQQ (the fund that tracks it, traded during New York market hours). These markets are closed at the weekend.
They're mostly traded as CFDs with a broker: no platform fee but a spread, and a small funding cost if the position stays open overnight. Pick the “Forex, gold, Nasdaq” fee profile. Live tracking of these markets refreshes every 5 minutes.
Example: EURUSD at 1.08 = 1 euro is worth 1.08 dollars. XAUUSD at 2,400 = an ounce of gold is worth 2,400 dollars.
Pip
The smallest usual price step in forex: 0.0001 on EURUSD, 0.01 on USDJPY. Backtest Lab works in %, ATR or R, not in pips.
Candle
The price summed up over a period: open, high, low and close.
A green candle closed higher than it opened, a red one lower. The “wicks” show how far the price went during the period.
Timeframe
How long one candle lasts: 1m = 1 minute, 1h = 1 hour, 1d = 1 day.
The shorter the timeframe, the more trades and the more fees weigh. To start with, 4h or 1d give steadier results.
Buy (long)
You buy betting that the price will rise. You win if you sell higher.
Short sell (short)
You sell without owning the asset, betting that the price will fall. You win if you buy it back cheaper.
It needs a futures or margin account. To start with, stick to buying only.
Scalping, day trading, swing
How long your trades last: a few minutes (scalping), within the day (day trading), several days (swing).
Time zone
Used by time rules (“no entry before 9am”) and the day's levels. Pick the zone you trade in, e.g. America/New_York or Europe/London.
Direction
Whether the strategy buys (bets on a rise), sells short (bets on a fall), or both.
Test period
The dates between which the strategy is replayed on past prices.

Rules and indicators

Signal and conditions
A rule such as “RSI 14 < 30”. When all the conditions of a group are true, the strategy enters a position.
Rules are checked at the close of each candle, and the order goes out at the open of the next one: never any peeking into the future.
AND / OR
AND: all the conditions must be true at the same time. OR: a single group of conditions is enough.
Example: “RSI < 30 AND close > SMA 200” is more selective than “RSI < 30” alone.
Crosses above / below
True only on the candle where one line moves to the other side of the other, not on the candles after.
Example: “EMA 20 crosses above EMA 50” fires only once, at the moment of the crossover.
Period
The number of candles used to compute an indicator. RSI 14 = computed over the last 14 candles.
Simple moving average (SMA)
The average price of the last N candles. It smooths the price and shows the trend.
Example: Close above the SMA 200 = trend rather up.
Exponential moving average (EMA)
Like the SMA, but it gives more weight to recent candles: it reacts faster.
RSI
Measures from 0 to 100 the strength of recent rises against falls. Below 30: the price has fallen a lot; above 70: it has risen a lot.
ATR
The average size of a candle (in price) over N candles. It measures how restless the market is.
A stop “at 2 ATR” adapts by itself: wider when the market moves a lot, tighter when it's calm. ATR in % is the same thing relative to the price.
Bollinger Bands
A moving average with two bands around it. The price stays between the bands most of the time; it leaves them during big moves.
MACD
The difference between a fast EMA and a slow EMA. Positive in an uptrend, negative in a downtrend.
The signal line is an average of the MACD; the histogram is the gap between the two. The MACD / signal crossover is a classic signal.
Stochastic
Places the close between the low and the high of the last N candles, from 0 to 100. Close to 0: near the low.
ADX
Measures the strength of a trend, not its direction. Above 25: the market is in a real trend.
Rate of change (ROC)
How much the price has changed, in %, over N candles.
IBS
Where the candle closed between its low (0) and its high (1). Below 0.2: a close right near the low.
VWAP
The day's average price, weighted by the volume traded. Many day traders use it as a reference.
Volume
The quantity traded during the candle. A move with a lot of volume is often more reliable.
Highest / lowest over N candles
The highest (or lowest) price reached over the last N candles. Used to spot breakouts.
Previous day levels
The high, the low and the close of the previous day, often used as support and resistance.
Last week's levels
The high and the low of the previous week (Monday to Sunday). Levels swing traders watch.
High and low of a time range
The high and the low reached between two times you choose, for example the first 15 minutes of the New York session, or the night.
The level only exists once the range is over: before that, the rule doesn't fire. It stays valid until the end of the day. Candles must be shorter than the range, otherwise it covers the whole candle.
Example: Opening range: America/New_York time zone, 09:30 to 09:45, then “close crosses above the range high”.
Pivot points
Levels computed each day from the previous day's high, low and close: the central pivot, then R1, R2 above and S1, S2 below.
Above the pivot, the day leans up; below it, it leans down. R1 and S1 are often reached, R2 and S2 on busy days.
Camarilla pivots
A variant of the pivots, tighter around the previous close. Traders often play the return to the centre at R3 and S3, and the breakout beyond R4 and S4.
Supertrend
A line a few ATR from the price: below the price in an uptrend, above it in a downtrend. It switches sides when the trend turns.
Example: “Close > Supertrend(10, 3)” = uptrend.
Parabolic SAR
Dots that follow the price and close in on it faster and faster during a trend. Often used as a trailing stop.
Ichimoku
A complete Japanese system: two balance lines (Tenkan, fast, and Kijun, slow) and a cloud made of two edges. Above the cloud, the trend is up.
Inside the cloud, the market hesitates. The Tenkan / Kijun crossover above the cloud is a classic signal. The 9, 26, 52 settings are the author's and remain the most followed.
Keltner Channels
An EMA with two bands a few ATR away. Smoother than Bollinger Bands.
Bollinger %B and width
%B places the close between the Bollinger Bands: 0 on the lower band, 1 on the upper band. The width measures the gap between the bands, in % of the price.
Squeeze
Equals 1 when the Bollinger Bands move inside the Keltner Channels: the market is unusually calm, and a big move often follows.
The squeeze doesn't say which way the price will go. Wait for it to release (1 on the previous candle, 0 now) and follow the direction of the breakout.
Choppiness
From 0 to 100: close to 100, the price goes back and forth without getting anywhere; close to 0, it moves in a straight line. Above 61.8: avoid trend following.
OBV (on-balance volume)
Adds the volume of rising candles and subtracts that of falling ones. Only its direction matters: an OBV rising while the price stalls can signal quiet buying.
MFI (money flow index)
An RSI that takes volume into account, from 0 to 100. Above 80, buying has been very strong; below 20, selling.
Z-score
How many standard deviations the price is from its average. Beyond 2 or below −2, the gap is unusual.
Inside bar
A candle entirely contained in the previous one: the market pauses. The break out of the previous candle often gives the next direction.
Engulfing
A candle whose body engulfs the previous one's, of the opposite colour. Equals 1 for a bullish engulfing, −1 for a bearish one.
Example: “Engulfing = 1” on a support after a fall: buyers take back control.
Pin bar
A candle with a very long wick (at least two thirds of the candle): prices on that side were rejected. Equals 1 for a long lower wick, −1 for a long upper wick.
Narrowest candle (NR7)
Equals 1 when the candle has the smallest range of the last N (7 for NR7). Calm often comes before a move.
Candle patterns
Shapes of one or two candles that traders watch. On their own they predict little: they matter mostly on a key level and in the direction of the trend.
Higher timeframe
Computing an indicator on longer candles than the strategy's, to filter by the underlying trend.
Example: 15m strategy, filter “close > SMA 200 on 1d”.
Offset
Reading an indicator's value N candles back. Offset 1 = the previous candle.
Fixed value
A number you choose, to compare an indicator with a threshold: “RSI < 30”, “ADX > 25”.

Risk management

Stop (stop loss)
The price where you cut your loss if the trade goes the wrong way. Essential so as not to lose everything on one trade.
In %, in ATR or below the recent low. In Backtest Lab, the distance to the stop is also used to size the position.
Target (take profit)
The price where you take your profit automatically.
R (multiple of risk)
Your gain or loss compared with the risk taken. 1R = the loss if the stop is hit. A 2R target makes twice what you risk.
Example: You risk $100: a +2R trade makes $200, a −1R trade costs $100.
Trailing stop
A stop that follows the price when it goes your way, to protect part of the gain.
Breakeven stop
Moving the stop up to the entry price once the trade is a certain number of R in profit: at worst, you exit at zero.
Max duration
Closing the trade after N candles if it has hit neither the stop nor the target.
Risk per trade
The % of your capital lost if the stop is hit. 1% is a good starting point: 10 losses in a row only cost about 10%.
Position size
The amount committed to a trade. With a stop, it's computed to match your risk per trade; without one, it's a fixed % of capital.
Leverage
Borrowing to take a bigger position than your capital. It multiplies gains and losses alike.
Max leverage caps the computed size. Beyond it, a small drop can liquidate the position.
Liquidation
With leverage, if the loss eats your margin, the platform force-closes your position and you lose the margin.
Kelly criterion
A formula giving the risk per trade that would grow capital fastest, if the future looked exactly like the test. Too aggressive in practice: it's a ceiling, not a setting.
It starts from the win rate and the ratio of average gain to average loss. As those numbers are estimated on the past, most traders take only a quarter of it, or stay between 0.5 and 2% per trade.
Entry hours
Opening trades only between two times (local time), for example during the New York session.
Entry days
The days of the week when the strategy may open a trade.
Close everything at
The time at which any position still open is closed, whatever happens.

Costs

Fees
What the platform takes on every buy and every sell, as a % of the amount. Paid on entry and on exit.
Spread
The gap between the buy price and the sell price at the same moment. You pay half on entry and half on exit.
Slippage
A market order often fills a little worse than the price shown, especially when things move fast.
Funding
On perpetual contracts (futures), a small cost paid every 8 hours while the position is open.
Breakeven win rate
The % of winning trades needed not to lose money, given your average gain and average loss. Fees push it up: each gain is smaller, each loss bigger.
Example: An average gain of 2 R for a 1 R loss: one winning trade in three is enough.

Reading the results

Starting capital
The make-believe amount the test starts with. Gains add up trade after trade.
Total return
How much the capital made or lost over the whole test period, fees included.
Buy and hold
What you would have made buying at the start and holding to the end, doing nothing. The strategy must do better, or risk much less.
Annual return
The return brought back to an average year, to compare tests of different lengths.
Max drawdown
The worst fall of capital from a peak. It's the pain you would have had to bear without giving up.
Example: −20% on $10,000: at some point, your account went from $10,000 to $8,000.
Number of trades
How many times the strategy entered a position. Under 30 trades, the result may be luck.
Win rate
The % of trades closed in profit. It's not enough on its own: 30% winners can be very profitable if each gain is worth 3 losses.
Profit factor
Total gains divided by total losses. Above 1: the strategy makes money. Above 1.5: it's solid.
Average gain per trade
What a trade makes on average, winners and losers mixed. It must be positive, otherwise the strategy loses over time.
Sharpe and Sortino
Return compared with the swings of the capital. The higher, the smoother the curve. Above 1 is good.
The Sortino only counts downward swings.
Losses in a row
The longest streak of losing trades. Ask yourself whether you would have kept following the strategy after that many losses.
Time in market
The % of time you had an open trade. Less time in the market = less risk for the same gain.
Equity curve
How the account changed trade after trade. A curve that rises steadily beats a roller coaster.
Trade analysis
Your trades grouped by hour, by day, by side, by exit reason and around economic announcements, to see whether losses always come from the same place.
A group that loses throughout the test is a real weak spot. A group that lost only during one stretch may be luck: removing it makes the past look better without promising anything for the future.
Economic announcements
The events that move every market at once: Fed and ECB rate decisions, US inflation (CPI) and jobs (NFP) figures.
On those days, prices can jump in a few seconds: the spread widens, stops fill further than planned, and a strategy that works on quiet days can lose. A trade counts if it was open at some point on the day of the announcement (New York time, or Frankfurt time for the ECB). The dates come from the official calendars of the Fed, the ECB and the Bureau of Labor Statistics, since 2017.
Example: Fed decision at 2pm New York time, CPI and NFP at 8:30am New York time, ECB at 2:15pm Frankfurt time.
Fed (FOMC)
The US central bank. Its committee (FOMC) sets the policy rate eight times a year, and sometimes in an emergency, as in March 2020.
CPI and NFP
Two US figures published every month: inflation (CPI, consumer price index) and job creation (NFP, non-farm payrolls). They change what markets expect from the Fed.
Worst and best moment (MAE / MFE)
How far each trade went against you (MAE) and in your favour (MFE) before closing, in R. It helps place the stop and the exits.
Example: If almost no winner drops below −0.5 R, a stop at −1 R may be too far.

Robustness

Overfitting
Tuning a strategy until it fits the past perfectly. It looks brilliant in the test and fails afterwards.
The beginner's number one trap. The checks in the Robustness tab are there to catch it.
Real edge
The test checks whether the average gain could come from luck, by drawing trades at random thousands of times.
Study then validation
The first 70% of the history on one side, the last 30% on the other. The strategy must win on both.
Monte Carlo
Shuffling the order of the trades thousands of times to see the worst and best possible scenarios with the same trades.
Nearby settings
Running the test again with each setting changed a little (RSI 12 or 16 instead of 14…). A good strategy also wins with close settings.
Doubled fees
The same test with costs twice as high. If the strategy turns into a loser, its margin is too thin.
Prop firm challenge
Firms hand capital to traders who pass an exam (a profit target without exceeding a max loss). This tab estimates your chances.
The tab replays your trades with the rules of FTMO, FundedNext and The5ers taken from their websites, and with standard models you can edit. It also counts how many attempts, and so how much in fees, it would take on average to get funded.
Trailing max loss
A max loss that rises with your account: it locks onto your highest end-of-day balance and never moves back down. Tougher than a fixed max loss.
Example: $100,000 account, 10% max loss: the limit is at $90,000. If you end a day at $104,000, it moves to $94,000.
Winning day (prop firm)
For some prop firms, a day only counts if it makes at least 0.5% of the account. The5ers asks for 3 per step.