Skip to main content

Backtest

Test a trading rule on past prices

Pick a market and a rule (or build your own), set a stop and a target, and see what would have happened on real history: each trade, the results and a research report with checks that show how fragile the result is. No coding. Free to try.

Numbers from code, not AI. Checked against backtesting.py.

We ran the same rules on the same real prices in backtesting.py, a widely used open-source Python backtester: 2,960 of 2,982 trades (99%) had exactly the same result after costs when it closes timed-out trades the way we do (97% with its own rule). Every other one differs by a documented convention. See how we checked

Start from a well-known setup

Bullish engulfing above the 200 EMA is filled in below as a custom rule. A green candle whose body covers the previous red one, while the close is above the 200 EMA.

A candle shape with a trend filter. Candle shapes on their own appear often and mean little. Pick a market, a stop and a target, then run it. Past prices only; not a signal. How to read candlestick charts

1. Market

Market
Timeframe
History to test
Max = all the history we load: about 2 years of 1H candles.

2. Rule

Rule to test
Direction

3. Exits

Stop based on
Trailing stop
Optional: the stop follows price as it moves your way
Move stop to break-even
Optional: the stop moves to the entry price once the trade is in profit

Exit when… (optional)

Close the trade at the next candle's open when this is true on a candle close, like an entry rule in reverse. The stop and target still apply.

Hypothetical results from applying the rule you chose (your own or a ready-made example) to past prices. Not real trades, not a prediction and not advice. Past results do not guarantee future results.

How it works

  • Each rule is checked when a candle closes, and a test trade starts at the next candle's open, so it never uses prices that weren't known yet.
  • One trade at a time. It ends at the stop, at the target, or after the number of candles you set.
  • Optional exits work the same way: a trailing stop or a move to break-even is updated when a candle closes and only counts from the next candle, and an exit rule that is true on a candle's close exits at the next candle's open.
  • If one candle touches both the stop and the target, we can't know which came first, so we count the stop.
  • Results are in R (the amount risked per trade), after the costs you enter.
  • The research report (with any trailing stop, break-even or exit rule included) re-runs the same exits from random entry points, splits the history into earlier and recent parts, and tries nearby stop and target settings.

How we checked the numbers

The backtester is our own code, and no AI is involved in the trades or the results. To check that it simulates trades correctly, we ran the same rules on the same real prices in backtesting.py, a widely used open-source Python backtester, and compared every trade: entry and exit time and price, and the return after costs.

Cross-check run on 16 November 2026 with backtesting.py 0.6.6
RuleMarketTradesSame result*Same with our exit rule*
Breakout long, 2% stop, 2R targetBTC/USDT 4H, 2 years117117117
Same, with 0.05% costs per sideBTC/USDT 4H, 2 years117117117
Breakout short, 1% stop, 1.5R targetBTC/USDT 1H, 1 year248248248
RSI(14) back above 30, 1.5% stopETH/USDT 1H, 2 years226226226
EMA 20/50 cross, 1.5x ATR stopSOL/USDT 1D, 6 years191919
RSI(14) back above 30, 0.3% stopEUR/USD 1H, 2.8 years187162187
SMA 10/30 cross, 4% stopAAPL 1D, 10 years413739
Breakout long, 2% stop, 3% trailing stopBTC/USDT 4H, 2 years909090
Breakout short, 1.5x ATR stop, 2x ATR trailing stopBTC/USDT 1H, 1 year182182182
RSI(14) back above 30, 1% stop, break-even at +1RBTC/USDT 1H, 1 year127127127
SMA 10/30 cross, 4% stop, break-even at +1RAAPL 1D, 10 years413539
RSI(14) back above 30, exit when RSI is above 60EUR/USD 1H, 2.8 years187180187
EMA 20/50 cross, exit when close crosses below SMA 20BTC/USDT 4H, 2 years404040
Breakout long, 8% stop, 3R targetBTC/USDT 1W, 9 years323232
Breakout, trailing stop, break-even and exit ruleAAPL 1W, 20 years575656
Breakout short, 1.5x ATR stop, 2R targetETH/USDT 4H, 2 years102102102
Breakout long, 1.5% stop, 2x ATR trailing stopETH/USDT 1H, 1 year158158158
RSI(14) back below 70 (short), 1.5% stop, break-even at +1RSOL/USDT 1H, 2 years208207208
EMA 9/21 cross, 2x ATR stop, exit when RSI is above 70SOL/USDT 4H, 2 years888888
Breakout long, 0.25% stop, 2R targetGBP/USD 1H, 1 year119102119
RSI(14) back below 70 (short), 0.3% stop, 0.4% trailing stopUSD/JPY 1H, 2.8 years195195195
Breakout long, 2x ATR stop, break-even at +1RGold futures 1D, 10 years746871
EMA 20/50 cross down (short), 1% stop, 2R targetCrude oil futures 1H, 2.4 years120107118
Breakout long, 1.5x ATR stop, exit when close crosses below EMA 10MSFT 1D, 10 years1039597
Breakout short, 5% stop, 6% trailing stopNVDA 1D, 10 years595353
Breakout long, 10% stop, 2R targetETH/USDT 1W, 9 years454545
Total2,9822,888 (97%)2,960 (99%)

* Same return per trade after costs, within 0.01 percentage points. "Same with our exit rule" is the same test with one change: backtesting.py closes a trade that runs out of candles at that candle's close, as ChartNox does, instead of at the next candle's open.

No trade was missing or extra for an unexplained reason. Every difference comes from one of three documented conventions:

  • Time exit: when a trade runs out of candles, ChartNox exits at that candle's close and backtesting.py at the next candle's open. On crypto, which trades around the clock, that is almost always the same price; on forex, stocks and futures the market can be closed in between. With the same exit rule, all of these trades match.
  • Gap past the target: when a candle opens beyond the target, ChartNox books the target price and backtesting.py the better opening price. ChartNox is the more cautious one here.
  • Refused order: after a big gap at the open, backtesting.py won't accept an order whose stop is on the wrong side of the last close, so it skipped a trade ChartNox took (8 trades, on stocks and futures). In 4 of these it then took a later signal while ChartNox was still in the skipped trade.

backtesting.py isn't part of ChartNox; we only used it to check our engine. A matching simulation doesn't make a rule good: backtest results are still hypothetical and don't predict future prices.

Common questions

What is backtesting?

Backtesting means applying a fixed rule to past prices to see what would have happened: how many times the rule fired, how many trades reached the target or hit the stop, and the overall result. It shows how a rule behaved in the past. It does not predict the future.

Is the backtest done by AI?

No. The trades and numbers come from fixed code that applies your rule to real past prices one candle at a time, so the same rule on the same candles always gives the same result. AI is only used to explain the results (Basic and Pro) and, on Pro, to turn a rule written in words into conditions you check before running. We cross-checked our engine against backtesting.py, a widely used open-source Python backtester, on the same real prices: of 2,982 trades across crypto, forex, stocks and futures, 2,888 (97%) had the same return after costs (within 0.01 percentage points). Most of the others differ only in how a trade that runs out of candles is closed: with backtesting.py set to close those at that candle's close, as we do, 2,960 (99%) match. Every remaining difference comes from a documented convention about price gaps. The results are still hypothetical and don't predict future prices.

What does R mean in the results?

1R is the amount risked on one trade: the distance from the entry to the stop. A trade that reaches a target twice as far away as the stop is +2R; a trade stopped out is about -1R. Counting in R means the results do not depend on position size.

Is it free?

Yes. Without an account you get 1 backtest a day, and a free account gets 2 a day. Basic includes 5 a day and Pro 30, each with a short AI explanation of the results. Pro also includes the AI rule builder (30 builds a day).

Can I test my own rule?

Yes. Pick Custom and combine up to 4 conditions that must all be true on the same candle: RSI vs a level, close vs a moving average, moving-average crosses, breakouts, volume spikes, candle shapes or a fixed price. Stops can be a % of price or a multiple of ATR, and you can add a trailing stop, a move to break-even and an exit rule built from the same conditions. On Pro you can also describe the rule in words and the AI fills in the conditions for you to check before running.

Can I test a rule on several markets at once?

Yes. Pick a group (big tech stocks, major crypto or major forex) and the same rule runs on each market on its own, with a row per market. A rule that only holds up on one market may just fit that market's past. A group test counts as one backtest.

What do the dollar results mean?

They come from a hypothetical account: the starting balance and the % risked per trade that you enter, with each trade's R applied to the balance so results compound. They are illustrations to make the R results easier to picture, not money anyone made.

What does the research report show?

Checks that show how fragile a result is (passing them doesn't mean a rule will work on new prices): how the rule compares with the same exits from random entry points, how it did on earlier versus the most recent history, whether nearby stop and target settings give similar results, results by period, the spread of results, how far trades moved against you, and the price change over the same period.

Which markets and timeframes can I test?

Crypto pairs from Binance, and forex, US stocks, indices and commodities from Yahoo Finance, on 15-minute, 1-hour, 4-hour, daily and weekly candles.

How far back can I test? What does Max mean?

Max uses all the price history we load for that market and timeframe, and 3M, 6M, 1Y and 2Y use the most recent part of it. For the markets in the list it goes back about this far: crypto: about 6 months on 15m, about 2 years on 1H, about 2 years on 4H, about 9 years on daily and about 9 years on weekly; forex: about 85 days on 15m, about 3 years on 1H, about 3 years on 4H, about 10 years on daily and about 20 years on weekly; stocks, ETFs and indices: about 85 days on 15m, about 3 years on 1H, about 3 years on 4H, about 10 years on daily and about 20 years on weekly; gold and oil futures: about 70 days on 15m, about 2.5 years on 1H, about 2.5 years on 4H, about 10 years on daily and about 20 years on weekly. Coins and stocks listed more recently have less. For the markets and groups in the list, periods clearly longer than that are greyed out; for any market, the results show the dates tested (for a group, the date each market starts from).

Why can the results be misleading?

Past results come from one stretch of history. A rule tuned until it looks good on past data often does worse on new data, small samples (under about 30 trades) are mostly luck, and real trading has costs and fills that a simulation simplifies.

Read this before using results

  • Backtest results are simulated with hindsight on historical prices. They are not actual trading and have built-in limits.
  • Costs are simplified to the percentage you enter. Slippage, spreads, gaps, liquidity and order fills in real markets may differ.
  • Funding, borrowing and overnight costs, and taxes, are not included.
  • Price data comes from third parties (Binance and Yahoo Finance) and can have gaps or errors.
  • Our ready-made markets and groups (for example big tech stocks) are markets that are well known and still trade today. Markets that failed or were delisted are not in them, so results across a group can look better than they would on a list chosen in the past.
  • When one candle touches both the stop and the target, we cannot know which came first, so we count the stop.
  • Adjusting settings until they look good on past data (overfitting) makes results look better than they would be on new data.
  • Dollar amounts come from a hypothetical starting balance and risk per trade that you enter. They are illustrations, not money anyone made.
  • No account will necessarily achieve results similar to a backtest. Results are not a track record and must not be presented as actual or expected performance.

Keep learning

Educational only. Not financial advice, not a signal and not a recommendation to trade any rule.

Analyze your chartFree calculators

Cancel a subscription: on our Cancel subscription page (no login needed), in Settings (Plan & billing), with the links in Paddle's emails, or by email to [email protected] from the email address on your account (from another address, tell us your account email).