How stats are calculated

The exact definitions behind win rate, profit factor, expectancy, averages, R and drawdown — with a worked example.

Updated Oct 27, 2026

Every win rate, profit factor and average in Ink comes from one function, computeDashboardMetrics (lib/pnl/dashboard-metrics.ts), so the Dashboard, Stats and strategies always agree.

Win, loss or breakeven

A trade is a win if its net P&L is above your breakeven band, a loss if it's below minus the band, and breakeven otherwise (classifyOutcome, lib/pnl/outcome.ts). The band is $0 unless you set one in Settings → Preferences → Breakeven band.

The definitions

  • Win rate = wins ÷ (wins + losses). Breakevens are left out — they're shown beside it as W · L · BE — so a scratch trade never moves your win rate.
  • Profit factor = total won ÷ total lost. With no losing trades it's "—" ("no losing trades").
  • Expectancy = net P&L ÷ trades — your average trade, breakevens included.
  • Avg win = total won ÷ wins. Avg loss = total lost ÷ losses.
  • R = a trade's net P&L ÷ its risk amount (the whole trade's risk, all contracts). Only trades that have a risk amount count; with none it shows "(no risk logged)".
  • R / trade = the average R of every trade with a risk amount — winners, losers and breakevens.
  • Avg RR (winners) = the average R of your winning trades only, shown as 1:X — how much you make for each $1 you risk when a trade works. Ink shows how many winning trades it's based on. A win is the same as in your win rate (your breakeven band applies).
  • Max drawdown = the largest drop from a high in your running P&L, starting from $0 at the beginning of the period — not from the account balance.

Example (made-up trades). Five trades: +$200, −$100, $0, +$300, −$50.

  • Wins 2, losses 2, breakeven 1. Win rate 2 ÷ (2 + 2) = 50%.
  • Profit factor $500 ÷ $150 = 3.33.
  • Expectancy $350 ÷ 5 = $70 a trade. Avg win $250, avg loss −$75.
  • Running P&L: $200, $100, $100, $400, $350. The biggest drop from a high is $200 → $100: max drawdown $100.

Example (made-up trades), R. Four trades, each risking $100: +$300, +$300, −$100, −$100 → +3R, +3R, −1R, −1R.

  • R / trade (3 + 3 − 1 − 1) ÷ 4 = +1.00R.
  • Avg RR (winners) (3 + 3) ÷ 2 = 1:3, on 2 winning trades.

With a $10 band: a +$5 trade is breakeven, not a win. +$200, +$5 and −$100 give 1 win and 1 loss: 50%.

Drawdown and recovery

On Stats → Overview, Max drawdown is the deepest fall from a high and Current how far below your high you are now. Recovery counts trading days from the deepest point until your P&L got back to its previous high, and Longest the longest stretch below a high. Both count days with trades on them (New York calendar days), and show "—" if you were never under water or haven't recovered yet.

This is your trading drawdown. The prop-rule drawdown against your account's floor is different — see Drawdown.