Chapter 13

Backtest

Updated Nov 20, 2026Pulse 1.9.116 sections

In this chapter 16 sections
  1. What it is and how to open it
  2. Your first Backtest in five steps
  3. Starting point
  4. The control bar
  5. Step, step interval, speed, clock
  6. Trading in Backtest
  7. Backtest settings
  8. Mini journal
  9. Saving to the journal and the label
  10. Cursor jump
  11. Rewind
  12. Floating bar
  13. Exit and archive
  14. Someone else's backtest
  15. Second intervals
  16. Keys

Backtest is a walk through history with a paper account: you stand at a chosen point in the past, see only what came before it, move time forward and trade the same way as on a live chart. Orders go not to an exchange or a broker but to a paper account inside the terminal; your real accounts take no part in Backtest.

attentionBacktest physically cannot reach an exchange or a broker account. To keep this visible at all times, the trading module shows the BT tag, and the bottom bar on the right shows the BACKTEST label.

What it is and how to open it

Backtest opens in three ways — all of them lead to the same place:

  • the ⏪ button in the chart window header;
  • right-click the chart → “Backtest from here” — it starts right from the bar you clicked;
  • an archive row in the journal → the ▸ “Continue” button (more in “Exit and archive”).
The chart's context menu: 1 — the “Backtest from here” item.

While Backtest is running, several signs on the screen tell you that you are in the past, not on the live market:

Backtest is running: a position is open, there are no closed trades yet — the balance on the bar equals the deposit.
  1. 1 the BACKTEST label in the bottom bar: the exchange, ticker and interval the Backtest is built from;
  2. 2 the ⏪ button in the header is pressed;
  3. 3 the BT tag in the trading module — orders go to the paper account;
  4. 4 the position label on the chart;
  5. 5 the play and pause button on the control bar;
  6. 6 the paper account: balance, after “·” the number of open positions and position accounting (NETTING or HEDGE); the result against the deposit appears after the balance when it is not zero;
  7. 7 the current Backtest price label: there are no bars to the right of the backtest cursor.

Your first Backtest in five steps

The shortest way to try it. Each step is covered in detail below.

1. Press ⏪ in the header or choose 1 “Backtest from here” in the chart menu.
2. If you pressed ⏪, click the bar to start from. The line follows the mouse. In the shot: 1 ⏪ in the header, 2 the bar's date and time, 3 the dimmed future, 4 ⏪ and ▾ on the bar, 5 the hint.
3. The gear on the bar: 1 capital, 2 leverage, 3 commission, 4 spread, 5 swap, 6 history before the point, 7 costs per ticker, 8 “Repeat”, 9 template, 10 “OK”.
4. Play, step forward one bar, speed; trade with the BUY and SELL buttons of the module with the BT tag. In the shot: 1 the BACKTEST label in the bottom bar, 2 ⏪ in the header pressed, 3 the BT tag, 4 position, 5 play and pause, 6 paper account balance, 7 the Backtest price.
5. The results are in the mini journal; 3 “Save and exit” writes the run to the journal and returns the live chart, 2 “Exit” — without saving, 1 “Cancel” — stay.

Starting point

There are five ways to start. They are collected in the “Starting point” menu — the ▾ arrow next to the ⏪ button on the bar.

The “Starting point” menu: five ways.
  1. 1 “Bar” — click a bar on the chart (same as pressing ⏪);
  2. 2 “Date…” — a date and time picker;
  3. 3 “First available date” — the very beginning of the ticker's history at the broker;
  4. 4 “Random bar” — a random minute of the ticker's history;
  5. 5 “Continue last” — from the minute where you finished the previous Backtest, with the account and trades as they were. The item appears below the divider only when there is something to continue.

Bar — the selection line

The bar selection phase: the bar's buttons are dimmed, and a hint asks you to pick a bar.
  1. 1 ⏪ in the header is pressed;
  2. 2 under the line — the date and time of the bar where the cursor will land;
  3. 3 bars to the right of the line are dimmed: this is the future you are not supposed to see yet;
  4. 4 ⏪ and ▾ on the bar;
  5. 5 the hint “pick a bar on the chart”.

Click a bar — Backtest starts from it. Pressing ⏪ again removes the line without starting. The line works in any Backtest window, including to the left of the current starting point.

Date…

The “Select date” window.
  1. 1 the start date: typing it is faster than paging through months; Enter jumps to that month;
  2. 2 the start time — in the same time zone as the chart's axis labels;
  3. 3 the month and the paging arrows;
  4. 4 the day: a day with data has the hint “candles are there: a backtest from this day will start, inside a bar the price walks by minutes”; “no data” means there was no trading that day or the history is not loaded; future days are locked;
  5. 5 the “Start” button — “Start the backtest on …”.

If the broker did not return history for the chosen month, the window says “the broker did not return history for this month” and offers “Retry”.

First available date

The download estimate window.

While the terminal looks for the start of the history, the window says “looking for where the broker history begins”; then it shows how much of the ticker's history has to be downloaded, from which date, how many bars that is and roughly how long it will take. What is already on disk is not downloaded again. The “Download” button starts the download, “Cancel” closes the window. While the download runs, quotes and account replies from the broker may be delayed.

The “Downloading history” window: percentage, days downloaded, time remaining. “cancel download” stops it — what has been downloaded stays on disk.
  1. 1 “cancel download”.

Once the history is on disk, Backtest starts from the first date by itself. An interrupted download continues from the same place, not from the beginning. If the venue temporarily does not return history, the window offers “retry” or “another date”.

Random bar

Backtest started from a random minute in the past.
  1. 1 the cursor clock on the Backtest bar — the random minute chosen;
  2. 2 the account at the start — the deposit from the settings;
  3. 3 the BACKTEST label in the bottom bar.

The random minute is taken from the ticker's history no more than a few years back (the number is in the item's tooltip). It is handy for testing a system on a stretch you remember nothing about.

Continue last

Takes you back to the same minute where you left the previous Backtest, with the account, positions and trades as they were. The item's tooltip names the ticker, interval and time. If a Backtest is running on another ticker, the item tells you that you can “Continue” after leaving it. After the terminal restarts, a running Backtest comes back by itself from its saved state — “the terminal restarted — the backtest continues…”.

The control bar

The bar is a floating panel at the bottom of the chart. From left to right:

The left half of the bar.
#ButtonWhat it does
1⏪Bar selection line: move the cursor, including to the left of the starting point. Press again to remove the line
2▾The “Starting point” menu
3Step backStep back one bar. This is a rewind: the state is rebuilt, and the account is reset (see “Rewind”)
4Play / PauseMove forward on its own, or stop
5Step forwardStep forward one bar. The label next to it is the step interval (for example, 1m)
6SpeedA list of speeds in bars
7Cursor clockBacktest time. A click opens “Backtest settings”
8BalanceThe paper account balance and the result against the deposit in the account currency; next to it — the number of open positions and, when needed, “margin %” and “stop-out ×N”
The right half of the bar.
#ButtonWhat it does
9result · winrate · PF · DDResult in percent, share of winning trades, profit factor, drawdown. A click opens the mini journal
10Backtest mini journalThe result, the equity curve and trades right above the chart
11Write the backtest to the journalWrites the run to the journal at once, without waiting for exit
12▾ next to the floppy diskThe colour of the run's label in the journal
13Load a shared backtestThe window for loading an exchange file
14Cursor jumpAn hour, a day, a custom time, the nearest news
15Restart from the start pointStart the same Backtest again from its starting point
16Backtest settingsCapital, leverage, commission, spread, swap
17ExitLeave Backtest and return to the live stream

While Backtest is getting ready, the bar says “preparing the backtest…” and “reading history from the broker…”. When the data runs out — “end of history”. If there are no minute bars for some stretch anywhere, Backtest runs on larger bars — the label “on … bars”: there is no price movement inside a bar. If minute bars are still downloading — “minutes from … are still downloading — the backtest moves on by itself”.

Pause by alert

If you have a price alert set and it fires during Backtest, a popup “Paused by alert” with the signal time appears above the play button. The “Don’t stop on it” button stops this alert from pausing Backtest any more and resumes the run.

Step, step interval, speed, clock

Step forward moves the cursor to the boundary of the next bar of the chosen interval: from 11:02 a 5m step takes you to 11:05. By default the step interval follows the chart window you clicked last.

Step interval — right-click the step button

The “Step interval” menu.
  1. 1 the list of intervals of the Backtest windows — picking one fixes the step interval;
  2. 2 “Auto — by the active window” — the step follows the window you clicked last again. Picking an interval in the list turns “Auto” off.

Step inside the bar

A 5m step and a step inside the bar.
  1. 1 step forward one bar (5m here);
  2. 2 “Step inside the bar” — by one source minute; the button's tooltip is “Step forward one update interval (1m) — inside the bar”;
  3. 3 the cursor clock — you can see the time moved by a minute.

The “inside the bar” button appears only when the window's interval is larger than the interval the Backtest is built from.

Speed

Speeds: 1×, 3×, 5×, 15×, 30×, 60×, 120× and “max”.

Speed is how many bars per second pass during playback; the field's tooltip explains: “1× — one bar every N seconds”. “max” — no pause between bars.

Cursor clock

The clock shows Backtest time. Hover over it: “Backtest cursor” / “Backtest start bar” and the data window “Backtest window: from — to”. A click opens the settings.

Trading in Backtest

Backtest has the same tools as live trading (chapter 10, chapter 11, chapter 12): the BUY / SELL buttons and order lines on the chart, stop and target, position management. The differences:

  • the account is a paper one; the starting capital and leverage are set in the Backtest settings;
  • the “Send order” window opens with the BT tag; the “Send” button sends to the paper account;
  • you can close a position from its label on the chart (“…” → “Close position”) or in the mini journal;
  • the trailing stop (the “Trailing” tab of the trading module, chapter 10) uses the same calculation as live; an exit by it shows in the journal as “Trailing stop”;
  • commission, spread and swap are calculated from the Backtest settings (see below). The exchange commission is noticeable by default: on small moves it can turn a small profit into a loss;
  • at low margin the terminal shows “margin N %”; below 100 % it is a margin call, and at 50 % the backtest closes positions by itself, starting with the most losing one, and shows “stop-out ×N”. These levels are the same as on a MetaQuotes demo and are not a setting.

Several tickers in one Backtest

You can change the ticker in the window right during a Backtest: Backtest moves to the new ticker from the same minute, and the balance is kept. Positions of the previous ticker stay as separate “legs”. The mini journal says “2 instruments”, and the costs in the settings become a per-ticker table.

Two tickers in one Backtest: each position has its own cross, and the shared “all” button closes them all.

If the previous ticker has open positions or orders, in some modes the terminal offers the “Switch Backtest ticker” window: “Open positions and orders of … will be closed at the Backtest price, and Backtest moves to … from the same minute”. “Close and switch” closes the positions at the Backtest price, “Stay” cancels the switch. If the ticker is already running a Backtest in another window, the terminal refuses.

A window of another ticker joins the Backtest on a timeframe lower than the main one too. If a ticker cannot join, a line under the Backtest bar gives the reason and a “Remove ticker” button: the Backtest moves on without it, the ticker window stays.

  • The venue's history of the ticker starts after the Backtest start — the line names the date it starts: “… the venue history starts on …, while the backtest starts on … — this ticker has no earlier data”.
  • One history request on this timeframe does not reach the start point — next to it stands a “Higher TF: …” button: the ticker windows switch to the higher timeframe, whose history request goes deeper. Where a higher timeframe would not help, the button is not there.

Backtest settings

The gear on the bar or a click on the cursor clock. The window can be dragged by its header and closes with the “OK” button, the cross or Esc; fields apply at once, there is no separate save button.

The “Backtest settings” window.
  1. 1 Initial capital — the account currency is the ticker's quote currency. Quick values 1k, 5k, 10k, 100k;
  2. 2 Leverage — 1:10, 1:100, 1:200, 1:500;
  3. 3 Commission and how it is calculated (see below);
  4. 4 Spread, points;
  5. 5 Swap per lot per day;
  6. 6 History before the point — how many closed candles to show to the left of the starting point: a slider and a field, from 100 to 20000;
  7. 7 Costs of the running backtest — per ticker;
  8. 8 Repeat — “+ save current”;
  9. 9 Template;
  10. 10 OK.
CommissionThe method is a drop-down list: “Percentage” (percent of the turnover of both legs — entry at its own price, exit at its own), “Per contract” (an amount per lot, round turn: charged at close on the closed volume), “Fixed” (per whole trade, not per each partial close). 0 or empty — the broker's commission, as in live calculation: on MT5 — per lot from the ticker's trades, on an exchange — the account's taker rate as a percent of each leg's turnover
Spread, points0 — auto: the typical spread of the history. At an MT5 broker this is the median spread of minute bars over the Backtest week; MT5 stores the smallest spread of each minute, so the live spread is wider on average. Exchange candles have no spread — the order book spread at the moment the Backtest is created is used. If there is no history — the live spread (only on an open market with a fresh quote), otherwise the price step. What exactly was used is written in the tooltip of the BACKTEST label above the chart. Your own number overrides everything
Swap per lot per dayUsually negative. Charged at every server midnight the position lives through; on the Wednesday → Thursday rollover the rate is tripled. Saturday and Sunday nights cost nothing where the market is closed for the weekend: a week of holding on forex is seven rates, on round-the-clock venues — nine

If a Backtest is already running, capital, leverage and the costs in the top fields apply at the next start: the money of a running account is not recalculated retroactively. The window reminds you of this with the line “The backtest is already running”. Stop-out 50 % and margin call 100 % are set as on a MetaQuotes demo. The session hours of Asia, London and New York are in the application settings — they are shared by the whole terminal.

The “Position accounting” field — how the Backtest paper account keeps positions; the choice applies from the next start:

As the accountthe model of the venue's live account at the Backtest start: on MT5 — the broker's account mode, on exchange futures — “Whole position” (netting) or “Separate trades” (hedging, chapter 4), on spot — hedging. If the account was not read at the start, the Backtest keeps positions by hedging
Netting — one position per tickerlike a live netting account: an entry on the position side adds to it, an opposite one closes part of it, all of it or reverses it. The draft shows the new average and the “After the add” block, and “Rung at the average” works for a market add (chapter 10). After an add, the journal and the run report take the entry, levels and 1R from the add
Hedging — separate positionsevery trade is its own position with its own levels

The accounting of a running Backtest shows as the NETTING or HEDGE tag on the Backtest bar; for an account that was not read — “HEDGE · account not read”.

Costs per ticker

The “Costs of the running backtest — per ticker” table.
  1. 1 Spread, pt — 0 means the broker's history spread;
  2. 2 Commission;
  3. 3 the commission method — “Percentage”, “Per contract”, “Fixed”;
  4. 4 Swap per lot per day in the account currency.

These numbers take effect at once: spread — from the next price, commission — from the next close, swap — from the next midnight. If a value is not accepted, the reason appears under the row.

Repeat and Template

The “Repeat” list.
  1. 1 a saved set — starts the same Backtest in one click: exchange, ticker, interval, deposit, leverage, starting point;
  2. 2 the cross — remove the set from the list.

The “+ save current” button adds a set. The starting point in a set is either fixed to a date or floating — counted from “now”; the set's tooltip says which. The “Template” menu → “Defaults” restores a deposit of 10000, leverage 1:500, zero costs and a history of 5000.

Mini journal

A click on the results on the bar or the mini journal button opens a popup panel above the chart; the J key (held down) shows it while pressed.

The Backtest mini journal, the “Trading” section.
  1. 1 the “Trading” and “History” sections;
  2. 2 the Backtest result, ticker and date; “backtest account” is the source label;
  3. 3 the equity curve;
  4. 4 result %, winrate, PF, drawdown, number of trades, average R;
  5. 5 the table of open positions;
  6. 6 the account summary: balance, equity, margin, free margin, level, profit;
  7. 7 “Full” — open the full journal on the same source (chapter 14);
  8. 8 close.
The “History” section: closed trades — entry, exit, side, size, R, commission, result, reason, tags, note.

If the Backtest runs on two tickers, the header says “2 instruments”, and the “all” button on the right closes all positions at once.

Saving to the journal and the label

On exit the run is written to the journal by itself if it lasted at least 10 minutes and has at least 2 trades. If it falls short, the run is not written, but the floppy disk on the bar saves it at any moment (the threshold does not apply to manual saving) and the session goes on: exiting does not remove the row.

Label colour.
  1. 1 the label palette — any colour you like;
  2. 2 the floppy disk writes the run;
  3. 3 the arrow opens the palette. If the run is not saved yet, it is saved first.
After saving — the line “Backtest label: …”; in the journal the run is shown on the “Sources” tab.

Cursor jump

The “Move the cursor” menu.
  1. 1 “← hour” / “hour →” — to the start of the broker's hour: from the middle of an hour — to its start, from exactly on the boundary — one hour earlier;
  2. 2 “−1 day” / “+1 day”;
  3. 3 “Custom time” — an HH:MM field (type 0930, the colon is added by itself; Enter — forward, Shift+Enter — back); the time is remembered;
  4. 4 “news →” — the cursor jumps to the release time of the nearest calendar news, and Backtest pauses; “The cursor is at the end of data: there is no news to the right”.

The cursor lands on the nearest real bar. Forward, Backtest scrolls through: trades and the account are kept, the stop and target trigger along the way. Backward, the trading result is reset.

Rewind

Before the first account reset the terminal asks.

A step back and a jump back reset the account: you cannot trade in the past knowing the future. If the account has trades, the “Rewind” window says how many. The “Save to journal and rewind” button puts the run up to the rewind into the journal as a finished row (“before rewind”), and the account after it starts from the deposit. Cancel — “rewind cancelled — the account is intact”.

Floating bar

You can undock the bar by dragging the handle on its left: it becomes a floating bar over the chart. Double-clicking the handle puts it back at the bottom. A docked bar is always full; a floating one starts small — steps, play, speed.

The small floating bar: 1 — the handle, 2 — › “Expand the backtest bar”.
Expanded: clock, account, journal, jumps, settings and exit. ‹ “Collapse the backtest bar” — back to steps, play and speed.

Exit and archive

The “Exit Backtest” window.
  1. 1 “Cancel” — stay;
  2. 2 “Exit” — reset the Backtest cursor and account: the journal of N trades will be lost (there is no way to get them back after exiting);
  3. 3 “Save and exit” — first write the run to the journal; the label stays as it is.

If there are no trades, the window says: “The backtest cursor and account will be reset. The panel returns to the live stream”.

The archive in the journal

Journal → “Sources”: Backtest rows.
  1. 1 “Export” — an exchange file for another person: the window, trades and numbers, without the account number or keys; the path is shown in the message;
  2. 2 “Label →” — the label colour of the selected rows;
  3. 3 “Delete” — remove the selected rows (cannot be undone);
  4. 4 ▸ “Continue” — from where it stopped: the account, positions and orders as they were, trades go into the same row.

You cannot continue if the state was not saved, if the row is a “before rewind” snapshot, or if it was written before states were stored; the button tells you the reason. Row states: “running”, “interrupted” (the terminal closed without finishing it; trades up to that minute are saved), “before rewind”.

Someone else's backtest

A shared backtest is an exchange file that another person made with the “Export” button. You go through the same window blind and compare the trading. Until your own Backtest reaches the end of the window, their trades are hidden. A shared backtest can also come as a journal link: the “Play this stretch blind in Pulse” button on its page puts it here the same way as a file (chapter 14, “Someone sent you a Backtest link”).

The “Load a shared backtest” button on the bar, with a file loaded.
  1. 1 the file: ticker, interval, dates, number of trades and the author (“no name” if the author is not given);
  2. 2 “Show their trades” — a warning: you will see their entries before your own Backtest ends;
  3. 3 “Run this window” — the ticker, interval, start date, deposit and commission are taken from the author;
  4. 4 “Delete” — remove the file;
  5. 5 “Choose a file…”.
No file chosen yet.

If you don't have the author's ticker, the terminal takes your closest one (“The author ticker is missing — your closest one will be used”), and if nobody has it, the Backtest for this window cannot start. A file of the wrong kind is rejected: “File not read”.

Second intervals

The list of intervals in Backtest: a note at the top says which bars it is built from.

In Backtest you cannot show an interval finer than the bars it is built from. A deep second-level Backtest needs downloaded data: the broker has no second bars at all — the terminal builds them from ticks, and an exchange returns a thousand candles per request — about sixteen minutes. Download the period you need in the “Data” section (chapter 15); if there are no seconds for the period, the terminal says “There are no seconds for the selected period in the store” and suggests what to do. A minute-level Backtest goes deep without this.

Keys

They work when the cursor is over a Backtest window. Reassign them in Settings → Hotkeys (chapter 19).

The same buttons as on the bar (see “The control bar”): 1 ⏪, 2 ▾, 3 step back, 4 play and pause, 5 step forward, 6 speed, 7 cursor clock, 8 balance.
KeyAction
Spaceplay or pause
→ / ←step forward one bar / step back
↑ / ↓speed one step up / down
Shift+← / →jump to the start of the hour, back / forward
Ctrl+← / →jump to the “Custom time”, back / forward; if not set — by a day
J (hold)mini journal while pressed

Didn't find the answer? Write to us

13 · Backtest

  1. What it is and how to open it
  2. Your first Backtest in five steps
  3. Starting point
  4. The control bar
  5. Step, step interval, speed, clock
  6. Trading in Backtest
  7. Backtest settings
  8. Mini journal
  9. Saving to the journal and the label
  10. Cursor jump
  11. Rewind
  12. Floating bar
  13. Exit and archive
  14. Someone else's backtest
  15. Second intervals
  16. Keys
↑ ↓ selectEnter openEsc close