Report charts, trades list and Compare
The equity chart, the distributions, MFE and MAE, the trades list, the trade export and how Compare puts runs side by side.
The equity chart
The engine records a chart point at most once a minute:
- at the start;
- whenever a trade closes;
- when a position opens;
- while a position is held, whenever equity has moved at least max(0.01, 0.01% of the initial deposit) since the last point.
Nothing is recorded while no position is open. A last point at the end of the run carries the final balance.
Tick mode records the point on the first tick of a minute, at that tick's prices, stamped at the start of the minute. Bar mode records it at the bar's close price, stamped with the bar's open time.
The run's period is then divided into 2,000 equal time slices, and each slice that has at least one point becomes one chart point. That point holds the equity and balance of the slice's last point, plus the slice's lowest and highest equity and its highest deposit load. A chart therefore never has more than 2,000 points, and the line is straight between them.
The chart can miss moves smaller than the threshold above, the inside of a bar in bar mode, and detail inside a time slice. The statistics miss none of these: every equity drawdown figure is measured at full resolution. Max drawdown can therefore be deeper than any dip visible on the chart.
The balance line is the realised balance, drawn as steps. It moves only when a trade closes or a balance operation is charged, not when a position opens.
Under the chart, Equity and Balance are the last point's values, and Peak load is the highest deposit load of the run.
The Deposit load lane is used margin ÷ equity × 100. It reads 0 while no position is open, or when equity is 0 or less.
- Each point carries the highest load reached since the previous point, counting every step and bar mode's worst case. A spike between two points still shows, and Peak load is the exact maximum of the run.
- Used margin is, for each open position, its margin-bearing volume × contract size × current close price × exchange rate ÷ leverage. The leverage is the instrument's own when its virtual symbol sets one, otherwise the run's. Margin on hedged positions: margin.
The lane is hidden for runs recorded before margin was recorded.
To make the chart taller or shorter, drag the grip on its bottom edge, or focus the grip and use ↑ / ↓. A double-click puts it back to its usual height. The height is remembered in this browser. The same grip sizes Compare's chart, the Monte Carlo chart, and a portfolio's curves, margin chart and Monte Carlo chart, each remembered on its own.
Distribution charts
- The hour, weekday and month of every chart below are read in the strategy's time zone, and each chart names it under its title (UTC for a strategy set to UTC, and for runs recorded before the zone was used).
- Entries by hour, weekday and month count each position once, at its first open: hours 0 to 23, Monday to Sunday, January to December. The rows of one position count as one entry: a position closed in three partials, or a netting fill closed by several orders, is one entry. All 24 hours and all 12 months are shown. Weekdays with no entries are hidden; when no weekday has entries, Monday to Friday are shown.
- Profit / loss by hour, weekday and month adds each row's profit to the bucket of its open time. A profit of 0 or above goes to the profit bar, a negative profit to the loss bar, which is drawn by its size. The close time is not used.
- Profit vs MFE, MAE and holding time are 60 × 40 grids. The horizontal axis spans the lowest to the highest MFE (or MAE, or holding time in seconds) among the rows. The vertical axis spans the lowest to the highest profit. Each cell is the number of rows that fall in it. When all values on an axis are equal, they fall in one column or row.
MFE and MAE
- MFE is the best and MAE the worst floating P&L a position reached while open, in account currency. MFE is never below 0 and MAE never above 0, because both start at 0, the P&L at opening.
- Floating P&L is (close price − open price) × contract size × volume × exchange rate, reversed for a sell. It covers price only: no commission, swap or slippage. The close price is the bid for a buy and the ask for a sell, so a new position starts slightly negative by its spread.
- Tick mode samples it after every tick. Bar mode samples each bar's extremes: the bar's favourable extreme (a buy's high, a sell's low plus spread) for MFE and its adverse extreme (a buy's low, a sell's high plus spread) for MAE, the same worst case its drawdown reads — so a position opened and closed within one bar still shows the range it lived through.
- A partial close carries the whole position's running MFE and MAE so far, measured on the volume open at the time; it does not get a proportional share. The rest of the position keeps accumulating. On a netting account each fill keeps its own.
The trades list
Each row shows the symbol and side, the close time (UTC), the lots and the net profit. Opening a row shows:
- entry and exit price;
- volume, and how long it was held;
- MFE, MAE and "Closed by";
- commission and swap, or "commission and swap not simulated" when the run had no virtual symbol for that instrument (the trade's prices still carry the recorded spread).
Prices are the fill prices after slippage. They are shown at the instrument's digits recorded with the run; failing that, at the most decimals any of its prices carries (up to 8); failing that, at 2.
"Held" shows the two largest whole units, rounded down: 45s, 18m, 3h 12m, 2d 4h.
Filters: All; Winners (profit above 0); Losers (profit below 0). Trades with a profit of exactly 0 appear only under All.
Sort: newest or oldest first (by close time), largest win or loss (by profit), longest or shortest held.
While the run is still going, the list shows trades as they arrive, newest first. Sorting and filtering open when the run finishes.
Closed by takes one of these values:
- Take profit.
- Stop loss. A trailing stop or a break-even stop that closes the trade also reads Stop loss.
- Strategy signal: a close or reverse action.
- Forced close: the end of the run.
- Drawdown limit: a drawdown limit closing positions — a timed limit's pause, or the Overall or Static overall limit's halt.
- Stop out: equity below zero.
- Not recorded: trades from runs recorded before the reason was kept.
Export report
"Export report" downloads the trades, not the statistics. The file is backtest-{id}-trades.csv: a header row, then one row per trade in close order.
The columns are: ticket, instrumentId, symbol, direction, openTimeUtc, closeTimeUtc, volume, openPrice, closePrice, profit, totalCommissionAccountCcy, totalSwapAccountCcy, maxFavorablePnl, maxAdversePnl, exitReason.
Format:
- UTF-8 without a byte-order mark, with CRLF line ends;
- times as yyyy-MM-ddTHH:mm:ssZ, in UTC, with fractions of a second dropped;
- numbers at full precision (the shortest form that reads back exactly), with a point for decimals and no thousands separator;
- direction and exit reason as names: Buy or Sell; TakeProfit, StopLoss, Signal, ForceClose, DrawdownLimit, StopOut, Unspecified;
- only a symbol that contains a comma or a quote is quoted.
Live deployments have no export.
Compare
Video tutorial · D5 · on YouTubeCompare runsCompare shows up to 4 runs side by side, this one included, chosen from the same strategy's completed runs.
Equity, normalised plots each run's equity ÷ its own initial deposit × 100, where 100 is the start, on calendar time. The label reads "same period" when every run has the same start and end, otherwise "different periods". The vertical scale is comparable across runs, but runs over different periods are not shifted to a common start.
Before you add a run, Compare already shows this run's equity against the instruments it traded; adding a run puts its curve beside them and opens the Metrics table.
The Buy-and-hold switch in the chart's head (on by default) draws the price of each instrument the compared runs traded, also from 100, over the whole span the runs cover (from the earliest start to the latest end), so you can see whether the runs beat simply holding the asset. Switch it off to see the runs alone. It is the instrument's daily close, with no commission, spread, swap or financing (Buy-and-hold). The instruments are drawn dashed or dotted in grey, never in a run's colour, each with its last move in the legend; the first three are shown and any more wait in the legend, switched off.
The Metrics table rows, with the value that counts as best:
Row Best Strategy revision none Gross profit higher Gross loss smaller Net profit higher Return (net profit ÷ deposit) higher Max drawdown (% of peak) lower Win rate higher Profit factor higher Sharpe higher Expected payoff higher Recovery factor higher Largest win higher Largest loss smaller Worst losing streak (Max consecutive losses) lower Time in market none Trades none The best value is highlighted only when at least two runs have a value and they do not all tie. A missing value shows "—". A profit factor with no losing trade shows "— no losing trade" and counts as the best (highest) value.
Questions?support@algotradinghub.io