Strategy Backtest History
The Strategy Backtest History page shows a read-only report of the current strategy calculated over the current market data: the indicator chart and the trades history.
The page mirrors the market and the strategy of the Strategy Editor. It cannot modify the strategy, and it cannot change the market source. The balance chart and the backtest statistics live on the Strategy Backtest Stats page.
Layout
The page content is divided into two stacked sections by a horizontal splitter:
- Upper section: the indicator chart.
- Lower section: the deals and positions history table, with its own toolbar right above it.
Drag the splitter up or down to resize the upper section. The chosen height is remembered between visits.
The indicator chart
The chart draws the strategy indicators and the executed deals over the price chart of the current market. Every deal marks its bar, and the deal selected in the table is highlighted.
The Zoom in and Zoom out buttons at the right of the page toolbar re-scale the chart. They are disabled until data is loaded, and the zoom level is remembered between visits.
The chart also answers the mouse and the keyboard:
| To | Do this |
|---|---|
| Zoom in or out | Turn the mouse wheel, press + or -, or use the toolbar buttons |
| Pan the visible bars | Drag the chart left or right |
| Scroll the chart | Press the Left or Right arrow key, or PageUp / PageDown for a whole screen |
| Jump to the first or last bar | Press Home or End |
| Step from deal to deal | Press Ctrl + Left or Ctrl + Right |
Deals and positions history
The table is titled Deals and positions history in its section toolbar, which sits directly above it and also holds the paging controls. It lists every entry and exit order of the backtest. Its header names three groups of columns:
| Group | Columns |
|---|---|
| Deal | Time, Deal, Type, Dir, Amount |
| Position | Dir, Volume, Price, S / L, T / P |
| Account | Profit, Balance |
| Column | Meaning |
|---|---|
| Time | Order time with a direction icon: an entry points right, an exit points left |
| Deal | Deal number in the transaction order |
| Type | buy or sell side of the order |
| Dir (Deal) | in for an entry, out for an exit |
| Amount | The amount of this order in the base currency, shown in thousands: 10K is 10 000 |
| Dir (Position) | The direction of the position left open after the order: an up arrow for a long, a down arrow for a short, an empty square once the order closed it |
| Volume (Position) | The volume the position holds after the order, in the base currency and shown in thousands; empty when the position is closed |
| Price | Fill price |
| S / L | Stop Loss level; highlighted red when it closed the deal |
| T / P | Take Profit level; highlighted green when it closed the deal |
| Profit | Deal profit, colored by sign; empty for entries |
| Balance | Account balance after the order |
Two details are easy to misread:
- An order closed by its stop loss or take profit is stamped at the close of its bar, three seconds before the next bar opens (
…:57), while every other order carries its own time. - An exit repeats the stop loss and take profit levels of the entry it closed.
Selecting a deal
Click a row to select it: the row is marked active and the chart scrolls to center that order. The Up and Down arrow keys walk the selection through the rows of the current page, and opening this page from the editor's chart arrives with the first deal already selected.
Sorting by time
Click the Time column header to toggle the order:
- Oldest (the default): earliest orders first, the first deal at the top
- Newest: latest orders first
The Time header shows a sort arrow that reflects the current order. Changing the sort order resets paging to the first page.
Records per page and pagination
The toolbar above the table holds, from left to right:
- The table's title, Deals and positions history.
- Records per page: 10, 20, 30, 50, 100, 500, or 1000 records.
- Page navigation: first, previous, next, last, and numbered pages.
Two more buttons below the table, Previous and Next, step through the pages from the table itself. They drive the same paging as the toolbar's paginator: the page they open is the page the paginator marks, and a button is disabled while there is no page before or after the current one.
The two toolbar controls are right-aligned on the title's row, the records control immediately before the page navigation.
Changing records per page resets to page 1 and refreshes the paginator.
Export
The Export button, the last control at the right of the page toolbar, downloads the trades history as a CSV file named after the market and the strategy, for example EURUSDM15-1481221368-backtest-history.csv. It is disabled until the backtest has at least one deal.
The file holds every deal of the backtest — not only the page you are looking at — in the order the table is currently sorted in. It carries the table's ten columns, with these values:
| Column | Value |
|---|---|
| Time | The time the table shows, seconds included |
| Deal | The deal number |
| Type | buy or sell |
| Dir | in for an entry, out for an exit |
| Amount | The amount of the deal in the base currency: 100000 where the table shows 100K |
| Price | Fill price rounded to the market's digits |
| S / L | Stop loss rounded to the market's digits; empty when the deal carried none |
| T / P | Take profit rounded to the market's digits; empty when the deal carried none |
| Profit | Deal profit rounded to 2 decimals; empty for entries |
| Balance | Account balance after the order, rounded to 2 decimals |
The values are plain numbers, without currency symbols or thousands separators, so a spreadsheet reads them as numbers instead of text. An exit carries the levels of the entry it closed, exactly as the table shows them, and the amount is always positive, because the Type and Dir columns already say the side.
The file carries the table's ten deal columns. The Position group's two columns — the direction of the position after the deal and the volume it still holds — are not exported: a spreadsheet derives both from the Amount, Type and Dir columns.
Common problems
| Symptom | Cause |
|---|---|
| The chart is empty and the table says "There is no loaded data." | The market has no data for the signed-in account. A toast names the reason; the market is the Editor's, so fix it there and open the page again |
| Export does nothing | The button is disabled until the backtest has at least one deal. Nothing was downloaded |
| A price has a different number of decimals than another page | The page prints the market's own digits: a 5-digit symbol shows five, a 3-digit one shows three |
| An exit shows the entry's stop loss and an odd time | That is what happened: the exit closed the position at the level the entry set, and it is stamped at the close of its bar |
Saved user preferences
The page stores user state in local storage under strategy-backtest-history-state.
Saved values:
- Upper section height
- Indicator chart zoom level
- History sort order
- History records per page
State is restored when opening the page and saved when closing it.