Preface
Most trading plans fail in the follow-through, not the setup. A trade gets a sound entry, a stop and an idea of where to take profits. Then the position moves, attention goes elsewhere, and the plan gives way to whatever the price did today. A few weeks later it's hard to say whether the system worked or just the market did.
Trailhead addresses that problem. It's a desktop app that records the plan you set when you enter a trade, watches your positions against it, and tells you when the plan calls for action.
The plan is expressed in R multiples. R is what you stand to lose if your initial stop is hit, and every result is measured in it: a trade that makes twice its risk is a 2R winner. Measuring in R makes trades of any size comparable, lets your risk per trade set the position size, and shows whether your system has an edge: the average R of your closed trades says what a typical trade earns for each dollar risked.
On top of R, Trailhead uses an exit ladder: a fixed schedule for taking profits and raising the stop as a trade reaches 1R, 3R, 6R and beyond. When a milestone is reached or a stop is hit, Trailhead tells you what to sell and where the stop goes. It does not place trades or connect to a broker; every action is a suggestion until you confirm it.
The same app tracks long-term holdings, dividends and cash accounts, so all of your portfolios appear together on one Dashboard.
The manual is organized as follows:
- Chapter 1 covers R multiples and the exit ladder. Everything else builds on it.
- Chapter 2 sets up portfolios and prices and introduces the Dashboard.
- Chapter 3 follows a trade from entry to exit: sizing, the positions table, acting on the ladder, and alerts.
- Chapter 4 covers the statistics and the Performance view for reviewing closed trades.
- Chapters 5 and 6 cover long-term holdings, dividends and cash accounts.
- Chapter 7 covers stock splits, spin-offs and symbol changes.
- Chapter 8 covers backups, restore, import and export.
- The appendix lists every shortcut, setting, column and command.
If R multiples are new to you, start with Chapter 1. If you already trade this way, start with Chapter 3.
1. R-multiple Trading
Trailhead measures every trade in R and manages every exit with a ladder. This chapter explains both, along with the rules Trailhead follows when it decides that a milestone has been reached or a stop has been hit. The rest of the manual assumes them.
R: the risk you set at entry
R is the amount you stand to lose on a trade if your initial stop is hit. It's fixed the moment you enter:
- R per share is your entry price minus your initial stop.
- R in dollars is R per share times the number of shares you bought.
Buy 100 shares at $50 with an initial stop at $47 and R is $3 a share, or $300 for the position.
Every result is then expressed as a multiple of R. Sell at $56 and you've made $6 a share, which is 2R. Get stopped out at $47 and you've lost 1R. Sell at $48.50 and you've lost 0.5R.
R stays the same for the life of the trade. Raising the stop later doesn't change it, because R measures the risk you accepted when you entered, not the risk that's left. That's what makes it a fair yardstick across trades: a 2R gain on a $20 stock and a 2R gain on a $400 stock are the same result.
Expectancy: whether the system works
Once your trades are in R, their average tells you what your system earns per trade, for each dollar you risk. That average is the expectancy. An expectancy of +0.5R means a typical trade makes half of what it risks; across 50 trades risking $1,000 each, that's about $25,000.
A positive expectancy over enough trades is evidence that your system has an edge. A good month isn't. Chapter 4 covers expectancy and the other statistics Trailhead keeps, including the System Quality Number (SQN), which also accounts for how consistent your results are.
Position size follows from risk
Each Stock Trading portfolio has two settings that decide how much you risk per trade:
- Max amount: the most you plan to have invested in the portfolio at once.
- Risk per trade %: the share of the max amount you're willing to lose on one trade.
Their product is your risk budget per trade. With a max amount of $100,000 and 1% risk per trade, every trade may risk $1,000.
The stop then determines the size. With a $1,000 budget and $3 of risk per share, you can buy 333 shares. Trailhead suggests 332, because it rounds down to a multiple of 4: profits are taken in quarters, and 332 shares sell in four whole tranches of 83.
A wide stop gives you fewer shares and a tight stop gives you more, but the dollar risk stays the same. That's the point: the chart decides where the stop goes, and the budget decides how many shares you buy.
Lots and positions
Each buy is a lot, with its own entry, initial stop, R and exit ladder. If you add to a position later, the add-on is a new lot with its own R; it doesn't change the first one.
A position is all the lots of one symbol from your first buy until you've sold every share. Trailhead shows positions as rows and their lots, sales and stop changes underneath.
The exit ladder
The ladder is a fixed schedule for taking profits and moving the stop up as a trade works. Each step is a milestone: a price level, measured in R from your entry, where the plan says to act. You choose one of two plans when you enter a trade.
1-3-6: the default, for trades with room to run
Sell a quarter at 1R, 3R and 6R, and let the last quarter ride with a trailing stop.
| Price reaches | Sell | Move the stop to |
|---|---|---|
| 1R | ¼ of the shares | entry − 0.5R |
| 2R | nothing | entry (break-even) |
| 3R | ¼ | entry |
| 6R | ¼ | 3R |
| 9R, 12R, 15R … | nothing | 3R below the new level |
1-2-3: for shorter trades
Sell a quarter at 1R, 2R and 3R, and trail the last quarter 1R behind the price.
| Price reaches | Sell | Move the stop to |
|---|---|---|
| 1R | ¼ | entry (break-even) |
| 2R | ¼ | 1R |
| 3R | ¼ | 2R |
| 4R, 5R, 6R … | nothing | 1R below the new level |
The last quarter, the runner, stays open until its trailing stop is hit. If the share count doesn't divide by 4, the first three tranches are equal and the runner takes the remainder.
For the 332-share trade at $50 with a $47 stop and the 1-3-6 plan, that works out as:
| Milestone | Price | Sell | New stop |
|---|---|---|---|
| 1R | $53 | 83 | $48.50 |
| 2R | $56 | — | $50.00 |
| 3R | $59 | 83 | $50.00 |
| 6R | $68 | 83 | $59.00 |
| 9R | $77 | — | $68.00 |
When a milestone counts, and when a stop is hit
The two sides of the ladder follow different rules, on purpose.
Milestones count on the daily close. A milestone is reached when a day closes at or above its level, not when the price touches it during the day. Trailhead tracks the highest close since you entered; once that close passes a milestone, the milestone stays reached even if the price falls back. Today's close counts after the market closes at 4 PM New York time. This keeps you from selling into an intraday spike that doesn't hold.
Stops are checked against the live price. A stop exists to protect you, so Trailhead flags a stop hit as soon as the current price is at or below it, without waiting for the close.
Short trades
A short works the same way, upside down. You sell borrowed shares first and buy them back later, so your initial stop sits above the entry, and R per share is the stop minus the entry. Short 100 shares at $50 with a stop at $53 and R is $3 a share, as before. Cover at $44 and you've made 2R; get stopped out at $53 and you've lost 1R.
The ladder is mirrored. The 1R milestone is $47, 3R is $41, and each stop move brings the stop down towards the price. A milestone counts when a day closes at or below its level, Trailhead tracks the lowest close instead of the highest, and a stop is hit when the price is at or above it. Position size comes from the same risk budget.
Suggestions, not orders
Trailhead never acts for you. When a milestone is reached it suggests a sale, a stop raise or both; when a stop is hit it suggests selling the shares that are left. Each suggestion appears in the position's Action column and in the detail pane, and as an alert in the app's bell; you can also have alerts sent as desktop notifications or to Discord.
Nothing changes until you confirm it. You record the sale you actually made, at the price you actually got, and confirm the stop you actually set. If you deviate from the plan, sell fewer shares or skip a step, Trailhead keeps going from what you recorded and shows how far you are from the ladder.
Chapter 2 sets up your portfolios and prices. Chapter 3 takes a trade through these steps in the app.
2. Getting set up
Before you record a trade, Trailhead needs two things: at least one portfolio to put it in, and prices to measure it against. This chapter covers both, then walks through the Dashboard, the page that brings every portfolio together.
Portfolios
A portfolio is a group of positions that you want to track together. It isn't a brokerage account: one portfolio can hold positions from several accounts, and one account can feed several portfolios. Organize them the way you think about your money, for example one for swing trades and one for long-term holdings.
Each portfolio has a type, and the type decides how its positions are measured:
| Type | For | Measures |
|---|---|---|
| Stock Trading | Trades with an initial stop and an exit plan | R multiples, the exit ladder, open risk, win rate, expectancy |
| Long-term Holdings | Buy-and-hold stocks, ETFs, income investments and precious metals | Total return, dividends, yield on cost, expected income |
| Cash | Savings accounts and money market funds | Balances, interest, APY |
Chapters 3 and 4 cover Stock Trading, Chapter 5 Long-term Holdings and Chapter 6 Cash.
Create a portfolio
Create one portfolio for each way you manage money. The type can't be changed later, so pick it with the table above in mind.
- Choose File ▸ New portfolio…, or + New portfolio in the sidebar.
- In Name, type a name. It appears in the sidebar and on the Dashboard.
- Choose a Type.
- For a Stock Trading portfolio, fill in Max amount and Risk per trade %. Together they set your risk budget per trade, as described in Chapter 1, and the dialog shows the amount as you type. Max amount is also the ceiling for the portfolio's Deployed / Max figure; Trailhead warns you when a buy would take you past it.
- If you have a Cash portfolio, choose the account this portfolio's money moves through in Settles in, and the date it starts in From. Chapter 6 explains how that works. Otherwise leave it at No cash account.
- Click Create portfolio.
Trailhead opens the new portfolio, ready for its first trade.
Edit or archive a portfolio
- Right-click the portfolio in the sidebar.
- Choose Rename / edit settings… to change its name, max amount, risk or cash account, or Archive to hide a portfolio you no longer use.
An archived portfolio disappears from the sidebar and the Dashboard, but its data stays in your database and in your backups.
Move between pages
The sidebar lists the Dashboard and your portfolios. You can also:
- choose a page from the menu under the page title;
- press Ctrl+0 for the Dashboard, or Ctrl+1 to Ctrl+9 for your portfolios in sidebar order;
- press Ctrl+\ to collapse the sidebar to icons, which leaves more room for the positions table.
Prices
Trailhead gets prices from Yahoo Finance by default. It's free and needs no account, but it's an unofficial source and occasionally fails or changes; when it does, you can always enter prices by hand.
The chip beside the page title (the open portfolio's name) shows when prices were last updated. It turns to a warning when they're more than one trading day old, and to an error when the last refresh failed; hover over it for the details.
Refresh prices
Press F5, or click the refresh button next to the price chip.
A refresh covers every symbol you hold, plus positions you closed in the last 30 days:
- Every time: the current quote and any new daily price bars.
- Once a day: the company name, sector and next earnings date, and the dividend and split history.
Refresh automatically
Trailhead refreshes prices when it starts. To change that, or to refresh during the day as well:
- Open Settings (Ctrl+,).
- Under Market data, tick or untick Refresh prices on startup.
- In Auto refresh, choose how often: every 5, 15 or 30 minutes, or every hour.
- Click Save.
Auto refresh only runs on weekdays between 9:30 AM and 4:00 PM New York time.
Fix a symbol Yahoo doesn't recognize
Some symbols are spelled differently at Yahoo: Berkshire Hathaway's class B shares are BRK-B, not BRK.B. A position Yahoo doesn't recognize shows a No price badge.
- Double-click the No price badge, or choose Change symbol… from the position's right-click menu. (Long-term Holdings also shows a Find symbol button in the Action column.)
- Type the symbol or the company name and click Search.
- Pick the right match and click Use symbol.
Trailhead renames the symbol everywhere it appears, in every portfolio, and fetches its prices.
Enter a price by hand
- Choose Data ▸ Manual price…, or Override price… from a position's right-click menu.
- Enter the Symbol (already filled in from the right-click menu), the Price and, if it isn't now, the time in As of.
- To keep this price even when a fresh quote arrives, tick Pin.
- Click Set price.
A manual price is marked with an M badge. Without Pin, the next fresh quote replaces it.
To work without Yahoo at all, set Provider in Settings to Manual prices only (offline). Trailhead then never goes online, and every price is one you've entered.
Change a sector
Trailhead uses Yahoo's sector for each symbol in the positions table and in the allocation charts. If a sector is missing or you'd classify a stock differently:
- Double-click the position's Sector cell, or choose Edit sector… from its right-click menu.
- Choose a sector from the list, or type your own.
- Click Save.
A sector you set yourself is kept when prices refresh.
Read the Dashboard
The Dashboard shows all of your portfolios on one page. Press Ctrl+0 to open it. The period buttons at the top right (MTD, QTD, YTD, 12M, All) set the time span for every figure on the page that depends on one.
The band at the top shows:
- Total value of all portfolios, with today's change.
- P/L for the period: realized and unrealized gains and losses plus income.
- Income for the period: dividends and interest received.
The Cumulative P/L chart shows how your P/L built up over the period: a white line for all portfolios together, and a colored line for each portfolio. The area under the total is green while you're ahead and red while you're behind.
- The legend above the chart shows each line's P/L for the period. Click an entry to hide or show its line; Trailhead remembers your choice.
- Hover over the chart to read every line's value on that day.
- The heading shows the period's high and low for the total, with their dates.
The Portfolios table has one row per portfolio, plus a total, with its value, share of the total, today's change, P/L and income for the period, current unrealized P/L, open risk, and a trend line of P/L over the period. Double-click a row to open the portfolio.
Three panels sit below the table:
- Today's biggest moves: the holdings that moved most today, by percentage, across all portfolios.
- Needs attention: everything the portfolios' tables would show in their Action columns, across all portfolios, most urgent first. Red is urgent (a stop hit, a cash balance below zero); amber is due (a sale or stop raise, a dividend or interest to confirm, a split to review, a missing price, open risk above your limit); muted items are to watch (near a stop, earnings within your Earnings within days setting, an ex-dividend date coming up). When nothing is urgent or due, it says so.
- Allocation: how your total value splits by portfolio or, with the switch, by sector.
Chapter 3 takes a Stock Trading position from the first buy to the last sale.
3. Working a trade
This chapter follows a Stock Trading position from the first buy to the last sale: entering it, reading it in the positions table, acting when the ladder calls for it, and getting told when that happens.
Enter a buy
Enter a buy when you've placed the order with your broker and know the price you got. Trailhead sizes the position from your risk budget, so give it the stop before the share count.
- Open the portfolio and choose + New Trade (Ctrl+N). The dialog opens on ▲ BUY. (▼ SHORT and ▲ COVER are for short trades; see "Trade a short" below.)
- In Symbol, type the ticker. Trailhead shows the company name and fetches the current price into Price.
- In Initial stop, enter the stop the chart gives you. It's required: without it there's no R.
- Next to Shares, click Use suggested to fill in the most shares your risk budget allows, rounded down to a multiple of 4. The cursor moves to Price.
- In Price, type the price you actually got. The suggestion was based on the quote; the fill is what counts.
- Choose a Strategy (Pullback, Breakout or Reversion), a Timeframe (Monthly/Weekly, Weekly/Daily, Daily/Hourly or Intraday) and an Exit plan (1-3-6 or 1-2-3, as described in Chapter 1). Strategy and Timeframe are optional, but the Performance view (Chapter 4) groups your results by them.
- If you're entering an older trade, change the Date. It defaults to today.
- Click Save trade.
The position appears in the table, selected, and a message confirms how many shares you bought.
The panel under the fields shows R per share, the dollar risk and its share of your max amount, the cost, and the price of each R level. It also warns you if:
- the stop isn't below the price (you can't save until it is);
- the risk is more than your per-trade budget;
- the buy would take the portfolio's Deployed figure past its Max amount.
The last two are warnings, not rules. The button changes to Save anyway, and the trade is yours to make.
Add to a position
An add-on is a new lot with its own entry, initial stop, R and ladder; the original lot is unchanged.
- Right-click the position and choose Add-on buy….
- Fill in the dialog as for a new buy, from step 3 above.
Read the positions table
Each row is a position. Use the filter above the table to show Open, Closed or All positions, and the search box (Ctrl+F) to narrow it to a symbol.
The columns that matter most while a trade is open:
- Shares: open shares / original shares.
- Stop: the current stop and its distance from the last price. The chip turns amber when the price is near the stop and red when the stop is hit.
- Next target: the next whole R above the highest close, and its distance. The chip fills in when the price is above it during the day (see Chapter 1).
- R now: the open shares' unrealized gain or loss in R.
- Open risk: what you'd lose if the price fell to the current stop now.
- Action: what the ladder says to do next, such as Sell 12 sh @3R or Raise stop → $104.00.
Two row markings tell you where to look first. A red tint and red bar on the left mean a stop has been hit. An amber bar means an action is due.
To see a position's trades, click the arrow at the start of its row, or press Enter or Space. Underneath are its trades, oldest first: ▲ BUY rows for each lot, ▼ SELL rows for each sale, and ▲ STOP rows for each stop change, with where it came from. To hide the stop rows, turn off View ▸ Show stop changes. Columns above the table shows or hides columns.
Act on the ladder
When a row has an amber bar, the ladder wants something from you. Hover over the row and its Action cell turns into a button for the next step. The same actions are in the row's right-click menu.
Record a sale
- Sell at your broker.
- Click Record sell in the position's Action cell. The dialog opens on ▼ SELL with the lot, the tranche size and the last price filled in.
- Change Price to what you actually got.
- If you sold a different number of shares, change Shares. The Suggested tranche link puts the ladder's amount back.
- Click Save trade.
You can sell at any time, not only when the ladder says so: right-click the position and choose Record sell…. If you sell more shares than the chosen lot has open, Trailhead offers to split the sale across lots, oldest first.
Confirm a stop raise
- Move the stop at your broker.
- Click Confirm stop in the position's Action cell.
Trailhead records the new stop. If it's behind by more than one milestone, it records one raise per milestone, each dated the day the price first closed there, so the stop history stays accurate even if you confirm a few days late.
Set a stop by hand
Use this for a stop that isn't on the ladder, such as a tighter one after an earnings warning.
- Right-click the position and choose Set stop….
- Enter the new stop and click Set stop.
Stop changes appear as ▲ STOP rows. To undo one, right-click it.
Record a stop-out
When a stop is hit, the row turns red, the Action column shows Stop hit — sell N sh, and the button is Record stop-out.
- Sell at your broker, if the stop order hasn't already.
- Click Record stop-out.
- Enter the price you actually sold at and click Record sale.
The sale is recorded with a Stop-out badge, so the trade history shows which exits the stop made for you.
Fix a mistake
- Edit a trade: double-click its row, or select it and press Ctrl+E.
- Delete a trade: select it and press Del, or choose Delete trade from the right-click menu. A buy can't be deleted while it has sales; delete those first.
Trade a short
A short makes money when the price falls. Trailhead handles it as the mirror image of a long trade: the initial stop sits above the entry, R is the distance up to it, and the ladder's targets step down, 1R below the entry, then 2R, and so on. A ladder stop is lowered rather than raised. Everything else in this chapter applies, with "cover" in place of "sell".
Open a short
Enter the short once your broker has filled the short sale.
- Choose + New Trade (Ctrl+N) and click ▼ SHORT, or press H.
- In Symbol, type the ticker.
- In Initial stop, enter a stop above the price. The dialog won't save a stop below it.
- Click Use suggested next to Shares. The size comes from your risk budget, as for a buy, with R measured from the price up to the stop.
- In Price, type the price you actually got, and fill in the rest as for a buy.
- Click Save trade.
The position appears with a SHORT badge next to its symbol. The panel under the fields shows Proceeds, what the sale brought in, where a buy shows its cost, and the R levels below the price.
Read a short in the table
- The opening trade is a ▼ SHORT row and each buy-back a ▲ COVER row. The arrow shows whether you sold or bought, as it does for BUY and SELL.
- Mkt value is negative: it's what buying the shares back would cost. The portfolio's value nets shorts against longs, while Deployed, Open risk and % port. count a short at its full size.
- Stop is above the price, so its distance is positive. Next target is below it.
- R now and the P/L columns are positive when the price has fallen.
- Day % is the stock's own move, so a falling price shows in red even though it's a gain for you. Hover over the cell to see which it is.
Cover a short
- Buy to cover at your broker.
- Click Record cover in the position's Action cell, or right-click the position and choose Record cover…. The dialog opens on ▲ COVER with the lot, the tranche size and the last price filled in.
- Change Price to what you actually paid, and Shares if you covered a different number.
- Click Save trade.
The rest of the ladder works as for a long position, with short wording:
- Lower the stop: the Action cell says Lower stop → $24.75. Move the stop at your broker, then click Confirm stop.
- Stop-out: the Action cell says Stop hit — cover N sh. Click Record stop-out, enter the price you paid and click Record cover.
- Add to the short: right-click the position and choose Add to short….
A few things work differently in money terms:
- Dividends: if a stock goes ex-dividend while you're short, you owe the dividend to the lender. Trailhead proposes it as a negative amount; confirm it as usual, and it lowers the position's P/L.
- Linked cash account: the short sale adds its proceeds to the account and a cover takes its cost out (Chapter 6).
- Not tracked: borrow fees and margin interest, like commissions.
- Spin-offs can't be recorded on a short position (Chapter 7).
Open the detail pane
The detail pane shows one position's chart and ladder. Double-click a position, or press Ctrl+J, to open it below the table. Press Ctrl+J again to close it.
The chart on the left shows daily candles with an 18-day moving average and volume, and the trade's levels: the entry, the current stop, the next target and the R ladder. Buys and sells are marked on the candles, an E marks the next earnings date, and small ticks mark dividend ex-dates. Hover over the chart to read a day's prices.
On the right is a card for each open lot:
- the current stop and next target;
- the ladder as a checklist: ✓ for milestones reached, ◆ for the next one, ○ for the rest, each with its price, the shares to sell and the stop that follows;
- how many shares you've sold against how many the ladder expects by now;
- Confirm and Record buttons when an action is due.
The price peek
For a quick look without opening the pane, hover over a symbol in the table. After a moment, a small card shows about three months of candles, the last price and day's change, and how far the price is from the stop and the next target.
Alerts
Trailhead checks every portfolio whenever prices refresh or your data changes, and raises an alert when:
- a stop is hit;
- the price is near the stop, within the Near stop % set in Settings (2% by default);
- a target is reached, either with a sale suggested or with only a stop raise;
- earnings are coming up, within the number of days set in Settings (7 by default).
An alert says the same thing as the position's Action cell, for example Stop hit — sell 9 sh. Each alert is raised once, so a stop that stays hit doesn't keep alerting. Dividends, split reviews and cash interest show in the tables and on the Dashboard, but don't alert.
Work through your alerts
The bell at the top right shows how many alerts you haven't acknowledged.
- Click the bell. The list is grouped by urgency: a stop hit first, then targets, then near-stop and earnings warnings.
- Click an alert to jump to its position, and act on it as described in "Act on the ladder".
- Click Ack to clear the alert.
Get alerts on your phone
New alerts appear as desktop notifications, so you see them while you're in another app. (Turn them off under Settings ▸ Alerts ▸ Desktop notifications.) To get them on your phone as well, send them to Discord:
- In your Discord server, create a webhook for a channel: Server settings ▸ Integrations ▸ Webhooks.
- Copy the webhook's URL and paste it into Settings ▸ Discord.
- Choose which kinds of alert to send.
- Click Send test to check the connection.
Check for alerts while Trailhead is closed
Trailhead can also check for alerts with no window open, so they reach Discord while you're away from your desk. The command
trailhead --check-alerts --market-hours
refreshes prices, checks every portfolio, posts new alerts to Discord and exits. With --market-hours it does
nothing outside weekdays 9:25 AM to 4:30 PM New York time, so you can run it every 15 minutes around the clock. The
appendix shows how to schedule it with a systemd timer.
Chapter 4 looks back at closed trades: the statistics and the Performance view.
4. Reviewing your trading
Chapter 3 was about the trade in front of you. This chapter is about the trades behind you: whether your system has an edge, which setups earn it, and whether you have enough trades to tell. Everything here is in R, so results from different position sizes and different stocks add up fairly.
Choose what the statistics count
Two controls at the top right of a Stock Trading portfolio decide which closed trades every figure in this chapter counts, and what counts as one trade. Set them before you read anything else.
- In Period, choose the trades closed in the month, quarter or year to date (MTD, QTD, YTD), the Last 12 months, or All. Open positions don't count until they're closed.
- In Stats by, choose Lot or Position:
- Lot: each buy counts as one trade, closed when its last share is sold. An add-on buy is a separate trade.
- Position: all the lots of one symbol count as one trade, closed when the whole position is. Its R is the total P/L divided by the total initial risk of its lots.
Lots are the default because each lot has its own entry, stop and plan. Switch to positions to see how your trades did as you'd describe them: "the NVDA trade", add-ons included.
Read the summary strip
The cards at the top of a Stock Trading portfolio fall into two groups: where things stand now, and how the closed trades did in the period.
Where things stand now:
- Portfolio value: the market value of open positions, with today's change. A short counts as negative, so shorts are netted against longs. Cash isn't included; it lives in a Cash portfolio (Chapter 6).
- Unrealized P/L: open positions' gain or loss, and as a share of their cost.
- Open risk: what you'd lose if every open position moved to its current stop, and that as a share of the value. It turns amber above the limit in Settings ▸ Alerts ▸ Open risk warn %. With shorts open, the share is of the gross value, where a short counts at its full size.
- Deployed / Max: the cost of your open lots against the portfolio's max amount. A short counts at the value you sold it for.
How closed trades did in the period:
- Realized P/L: from every sale in the period, including partial sales of positions that are still open.
- Dividends: received on this portfolio's stocks.
- Win %: the share of closed trades that made money, with the win–loss count.
- Profit factor: gross profit divided by gross loss, in dollars. Above 1, the winners outweigh the losers.
- Expectancy: the average R of closed trades (Chapter 1).
- R / StDev: expectancy divided by the standard deviation of the R results; higher means more consistent.
Read the R distribution
The card beside the summary is a histogram of the closed trades in the period, in half-R steps: red bars for losses, green for wins, and a dashed line at the expectancy. It shows what the averages hide. An expectancy of +1R built on many small wins is a different system from one built on a single 10R trade.
To see your open positions by sector instead, click the pie-chart icon in the card's corner. The donut shows at a glance whether you're carrying several trades in the same part of the market. The bar-chart icon brings the histogram back.
Compare setups in the Performance view
The Performance view puts groups of closed trades side by side, so you can see which setups earn your edge and which don't.
- Above the positions table, click Performance.
- In Group by, choose how to group the trades:
- Strategy: Pullback, Breakout, Reversion.
- Time frame: Monthly/Weekly, Weekly/Daily, Daily/Hourly, Intraday.
- Exit plan: 1-3-6 or 1-2-3.
- Strategy × TF: each strategy, with its time frames listed under it.
- Direction: long trades and short trades.
- To see one group's trades in the R distribution card, click its row.
- To go back to the positions, click Positions.
Trades you didn't tag appear as (none), and the last row totals every group. The columns:
| Column | Shows |
|---|---|
| Closed / Open | Trades closed in the period, and trades still open |
| Win % | Share of winners, with the win–loss count |
| Avg win / Avg loss | Average R of the winning and of the losing trades |
| Profit factor | Gross profit ÷ gross loss |
| Expectancy | Average R, with its ± range underneath |
| R range | Every trade's R, and the expectancy with its range (below) |
| StDev | How widely the R results vary |
| SQN | System Quality Number, with its rating underneath |
| P/L | Realized dollars from the closed trades |
| Avg days | Average time from entry to close |
Read the R range
The R range column draws each group's results on one scale. The top lane has a dot for every closed trade at its R, green for wins and red for losses, so you can see the spread at a glance. The bottom lane has a diamond at the expectancy and a line across the range where the true expectancy probably lies (about 95% likely: the expectancy plus or minus two standard errors).
That range is the honest answer to "is this setup working?":
- If the whole line is above 0, the group has a measurable edge.
- If the line crosses 0, there's no evidence of an edge yet, however good the average looks.
- If two groups' lines overlap a lot, you can't yet tell which is better.
The range narrows as trades accumulate. A group with fewer than 10 closed trades is marked LOW SAMPLE. In the screenshot above, Breakout's and Reversion's lines cross 0, so neither has shown an edge yet. Pullback's sits above 0, but on four trades it's still marked LOW SAMPLE: a promising start, not a proven edge.
Read the SQN
The System Quality Number, introduced by Van Tharp, combines expectancy, consistency and the number of trades into one figure: the square root of the number of trades (up to 100) times the expectancy, divided by the standard deviation. Trailhead shows Tharp's rating with it:
| SQN | Rating |
|---|---|
| below 1.6 | Poor |
| 1.6 | Below avg |
| 2 | Average |
| 2.5 | Good |
| 3 | Excellent |
| 5 | Superb |
| 7 and up | Holy grail |
An SQN above 2 means the expectancy's range clears zero. Tharp considered fewer than 30 trades too few for the number to mean much, and Trailhead shows it muted until a group has 30.
Chapter 5 turns to long-term holdings, where the questions are total return and income rather than R.
5. Long-term holdings and income
Not everything you own is a trade. Stocks you plan to hold for years, dividend funds and bullion don't have an initial stop or an exit ladder, and measuring them in R would make no sense. A Long-term Holdings portfolio measures them the way you think about them: what they've returned and what they pay you.
What's different from Stock Trading
A Long-term Holdings portfolio has no max amount, no risk per trade and no R. Instead, each holding is measured by:
- Total return: unrealized gain, plus realized gains from sales, plus dividends received while you held it.
- Income: what it pays you in a year at the current dividend rate.
Stops and targets are optional. Set them if you want a warning when a holding falls or rises to a level, and leave them blank otherwise.
Add a holding
Enter each holding once with the date and price you bought it at, even if that was decades ago. Trailhead keeps the price you paid and asks about any stock splits since then (Chapter 7).
- Open the portfolio and choose + New Trade (Ctrl+N).
- Fill in Symbol and Date.
- Choose the Investment type: Equity, ETF, Income (REITs, bond funds, preferreds and the like), Precious metals or Other. The type groups your holdings in the allocation card and the table.
- Fill in Shares and Price. The price is filled in with the last quote; change it to what you paid.
- If you want a warning at a level, fill in Stop and Target.
- Click Buy.
Buy more or sell part of a holding
- Right-click the holding and choose Buy more… or Sell….
- Fill in the shares and price. When selling, the All link next to Shares (for example All 150) fills in everything you hold.
- Click Buy or Sell.
Each buy is a separate lot; a sale is taken from the oldest lots first.
Add precious metals
For physical gold, silver, platinum or palladium:
- In the New trade dialog, choose Precious metals as the Investment type.
- Under Held as, choose Bullion (oz).
- Enter the troy ounces of pure metal in Shares, and the price you paid per ounce, premium included.
Trailhead values the holding at the metal's front-month futures price, which tracks the spot price closely. A metals ETF or a mining stock is an ordinary ticker: choose Ticker symbol under Held as instead.
Set a stop or target
- Right-click the holding and choose Set stop & target….
- Enter a Stop, a Target or both, and click Save. Leave a field empty to remove it.
When a holding reaches its stop or target, its status changes to STOP HIT or TARGET HIT and the Action column offers Record sell. Nothing else happens: Trailhead won't sell a long-term holding for you, or nag you to.
Read the portfolio
The summary cards cover both halves of the picture:
- Portfolio value, Unrealized P/L and Realized P/L.
- Total return for the period you pick at the top right, with the all-time figure underneath.
- Est. annual income: what your holdings would pay over the next year at their current dividend rates.
- Yield on cost: that income as a share of what you paid. A stock bought years ago can yield far more on your cost than on today's price.
- Dividends received in the period.
- Next dividend: the next ex-date across your holdings, and the expected amount.
Beside them, Allocation by type shows how your value splits between equities, income investments, metals and the rest.
In the table, each holding shows its shares, average cost, value and share of the portfolio, unrealized P/L, dividends, total return in dollars and percent, yield, yield on cost, income per year and the next dividend date. A ~ before a date means the company hasn't announced it yet and Trailhead has projected it from the payment history.
Unfold a holding to see its history: buys, sales, reinvested dividends (▲ DRIP), dividends received (◆ DIV), and any splits or spin-offs.
Dividends
Trailhead downloads each holding's dividend history with its prices. When a dividend's ex-date passes while you hold the stock, it proposes the payment: the shares you held the day before the ex-date times the amount per share. Nothing is recorded until you confirm it.
Confirm a dividend
A proposed dividend shows as Confirm div in the Action column, and in Needs attention on the Dashboard.
- Click Confirm div in the holding's Action column.
- Check the Amount against your statement, and change it if your broker paid something different, for example after withholding tax.
- Set Received on to the date the money arrived.
- Click Confirm dividend.
If a holding has several dividends waiting, Trailhead asks about each in turn.
Reinvest a dividend
If your broker reinvests a holding's dividends:
- In the dividend dialog, tick Reinvest this dividend (DRIP).
- Enter the Shares received and the Price per share.
- Click Confirm dividend.
Trailhead records the dividend and adds the new shares to the holding as a buy. Reinvested shares count in your cost basis but not in the money you've put in, so total return isn't inflated by your own dividends.
Review or dismiss pending dividends
Data ▸ Pending dividends… lists every pending dividend in every portfolio in one place. A proposal you don't recognize, for example one for shares you'd already sold elsewhere, can be dismissed there with Dismiss.
Record a dividend Trailhead doesn't know about
To record a dividend that isn't proposed, such as a special distribution, right-click the holding and choose Record dividend…, or use Data ▸ Manual dividend…. Enter the amount and dates and confirm.
Dividends work the same way in Stock Trading portfolios: they're proposed, you confirm them, and they count toward the position's total P/L. Reinvesting is only offered for long-term holdings.
Open the detail pane
Double-click a holding, or press Ctrl+J, for its chart and a summary card. The chart shows the candles with your average cost, any stop or target, every buy, sale and reinvested dividend, and the dividend ex-dates. The card shows how many shares you've held and for how long, the value and return figures, the income, the next dividend and your open lots.
Chapter 6 covers cash: savings accounts, money market funds, and how the other portfolios' money moves through them.
6. Cash accounts
A Stock Trading or Long-term portfolio tracks positions, not the cash beside them. That's deliberate: a trading portfolio's performance shouldn't depend on how much idle cash happens to sit in the account. But the cash is still yours, and it earns interest. A Cash portfolio tracks it, and can follow the money your other portfolios move.
Accounts
A Cash portfolio holds one or more accounts, each of which is either:
- Savings: a savings or high-yield account. You enter its APY.
- Money market fund: a fund such as SWVXX or VMFXX, entered by its symbol, where one share is worth $1. Trailhead takes the fund's yield from Yahoo with each price refresh.
Add an account
Trailhead starts every account from today's balance, so you don't need to enter its history.
- Open the Cash portfolio and choose + New Account (Ctrl+N).
- Choose Savings or Money market fund at the top.
- Fill in the Name and the Institution. For a fund, enter its Fund symbol.
- For a savings account, enter the APY %. A fund's yield comes from Yahoo; if Yahoo's yield is missing or out of date, tick Enter the yield myself and type it in.
- In Interest paid on, choose the day the account pays interest each month. It's the last day of the month unless you choose another.
- Enter the Balance today and click Add account.
Change the rate
- Right-click the account and choose Change rate….
- Enter the new APY % (or Yield % for a fund) and the date it took effect in From.
- Click Save.
Trailhead keeps the rate history, so interest for each day uses the rate in force that day.
Close an account
- Right-click the account and choose Edit account….
- Tick Account closed and click Save.
Closed accounts keep their history but stop proposing interest, and they're hidden unless you choose All above the table.
Move money
To record a deposit, a withdrawal or a transfer between two of your accounts:
- Choose Move Money (Ctrl+D).
- Choose Deposit, Withdrawal or Transfer. Transfer appears once you have two accounts.
- Choose the Account (and the To account for a transfer), the Date and the Amount.
- Click Record.
A transfer appears in both accounts; delete either side and both go.
Unfold an account to see its ledger, newest first, with the running balance after each entry.
Interest
Trailhead never posts interest on its own. Each month, on the account's payout day, it works out what the account should have earned, compounding daily on each day's balance at the day's rate, and proposes it in the Action column, for example Interest Oct 31 ~$81.40.
Confirm interest
- Click Confirm interest in the account's Action column.
- Enter the Amount received from your statement, which is often a few cents different, and the date it was Paid on.
- Click Confirm.
If the account paid nothing that month, click Skip this month instead, so it isn't proposed again.
True up the balance
Small differences add up: a fee you didn't record, interest that compounds differently, a deposit you missed. Every so often, check Trailhead's balance against your bank's. Accounts that haven't been trued up for 30 days show True up due, here and on the Dashboard.
- Click True up in the account's Action column, or select the account and click True up above the table, or right-click it and choose True up….
- Set Balance on to the date of your statement, and enter the bank's Actual balance.
- Under Book the difference as, choose Interest (the default when the difference is positive) or Adjustment.
- Click True up.
A true-up also settles any interest still waiting to be confirmed for months up to that date, since the bank's balance already includes it.
Link a trading portfolio
If your Stock Trading or Long-term portfolio buys and sells through a brokerage cash account, link the two, and the cash account's balance follows the trades:
- a sale adds its proceeds;
- a buy subtracts its cost;
- a confirmed cash dividend adds its amount;
- for a short (Chapter 3), the short sale adds its proceeds, a cover subtracts its cost, and a dividend you owe while short subtracts its amount.
To link them:
- In the Cash portfolio, select the account and click Link portfolio above the table, or right-click the account and choose Link portfolio….
- Choose the Portfolio and the date to start from in From.
- Click Link.
You can also link from the trading portfolio's settings, with Settles in and From (Chapter 2). Either way, only trades and dividends from that date on move money; earlier ones don't.
Linked entries appear in the account's ledger, tagged with the portfolio's name, but they aren't copies: they're worked out from the trades every time. Edit a trade and the cash balance follows. A dividend you reinvest in full moves no cash, and neither do shares received in a spin-off.
The linked portfolio shows the account and its balance in a chip at the top of its page; click it to open the Cash portfolio.
Read the Cash portfolio
The cards at the top show the Total cash, the Weighted APY with the interest it would earn in a year, Interest earned and the Yield earned it represents in the period, Net flows in or out, and Interest to confirm.
Each account's row shows its type, institution or fund symbol, linked portfolios, APY, change and interest over the period, the yield actually earned, the balance and when it was last trued up.
On the Dashboard, a Cash portfolio's value is its total balance, and its P/L and income are the interest received. Stock dividends stay with the portfolio that earned them, so nothing is counted twice.
Chapter 7 covers what happens when a company changes underneath you: stock splits, spin-offs and new symbols.
7. Splits, spin-offs and symbol changes
Companies don't sit still. They split their shares, spin off divisions and change their tickers, and each of these changes the numbers behind your trades without you doing anything. This chapter explains how Trailhead notices them, what it asks you, and what it changes when you answer.
Why these need your attention
Yahoo Finance adjusts a stock's whole price history after a split or a spin-off, so that old charts line up with today's price. Your trades aren't adjusted: you bought 6 shares at $2,034.50, not 300 at $40.69. Left alone, the two disagree, and every figure that compares your entry with the price, from R to total return, goes wrong.
Trailhead never fixes this silently. It finds the event in Yahoo's records and asks you what to do.
Stock splits
When Yahoo lists a split on a stock you held at the time, Trailhead tells you three ways: a toast, a count in the Data ▸ Stock splits menu item (for example Stock splits (1 to review)…), and, in the position's Action column, Split 3-for-1? with a Review split button.
Review a split
- Choose Data ▸ Stock splits…, click Review split in the Action column, or choose Stock splits… from the position's right-click menu.
- For each split under To review, choose one answer:
- Apply: you entered your earlier trades in the shares and prices you actually traded. Trailhead shows them in post-split terms, so they match today's prices: 6 shares at $2,034.50 become 300 at $40.69, for the same cost. Stops and targets are converted the same way.
- Already in my numbers: you entered your trades already adjusted for the split, as many brokers show them. Trailhead leaves them as they are.
- Click Done.
Either way, your trades are stored as you typed them. Applying a split changes how they're shown and calculated, not what's saved, so it can be undone: each decision under Recorded in the same dialog has an Undo. A trade's tooltip shows what you originally entered.
In Long-term Holdings, an applied split appears as a ⇄ SPLIT row in the holding's history.
A sale dated before a split is typed the way it happened, in that day's shares and prices: both trade dialogs convert it to today's shares for you.
Record a split Yahoo doesn't list
- Choose Data ▸ Stock splits… and click Record split….
- Choose the Portfolio and enter the Symbol and the Effective date.
- Enter the ratio as New shares for old shares: 3 for 1 in a 3-for-1 split.
- Tick Apply it if your earlier trades are in pre-split shares, and click Record split.
Spin-offs
In a spin-off, a company hands its shareholders shares in a new company, and part of the value of the old shares moves to the new ones. When FedEx spun off its freight business in June 2026, an FDX shareholder ended up with fewer dollars in FDX and some shares of the new company, FDXF.
Yahoo records a spin-off as a split with an odd ratio, such as 1.241-for-1. Trailhead flags those as probably a spin-off, because applying one as a split would be wrong: your share count didn't change.
Record a spin-off
- Click Record spin-off… in the split review, or Record spin-off in the position's Action column (where it reads, for example, Spin-off Jun 1?), or choose Record spin-off… from the position's right-click menu.
- In New symbol, enter the spun-off company's ticker. Find symbol… searches by name.
- Check the Ex-date, filled in from Yahoo's record.
- Enter the Shares received, from your brokerage statement.
- Check Cost moved %: the share of your cost basis that moves to the new company. Trailhead fills it in from Yahoo's price adjustment (1.241-for-1 means 19.42%). The company's tax notice, Form 8937, or your broker's cost-basis page may give a more exact figure.
- Click Record spin-off.
Trailhead then adds the new shares to the same portfolio as a lot dated on the ex-date, marked ▲ SPIN-OFF, and moves the cost. Your total value and total return don't jump on the day: the value has moved from one holding to two. Dividends from before the spin-off keep their real amounts, not Yahoo's adjusted ones.
In a Long-term Holdings portfolio
The parent's cost basis falls by the cost moved, and the new holding starts with exactly that cost. A sale from before the spin-off keeps its original cost. A stop or target you set before the spin-off moves down with the price, by the cost moved %, so the spin-off itself can't trigger it.
In a Stock Trading portfolio
A trade has more than a cost: it has an R, a stop and a ladder. From the ex-date, Trailhead works with the parent in its new, lower prices: its entry, initial stop, any stops you set and the ladder levels all move down by the cost moved %, and its chart is rescaled to match. Milestones you'd already reached stay reached, and your realized P/L from sales before the spin-off doesn't change.
The new shares become their own lot with the same strategy, time frame and exit plan as the parent. They take the same share of the parent's initial risk as of its cost, so the two lots together still risk what the original trade did. If you'd already raised the parent's stop, the new lot gets a matching stop.
A spin-off can't be recorded on a short position: you'd owe the lender the new company's shares as well, which Trailhead doesn't track. Cover the short first, or enter the new shares by hand as a short of their own.
Undo a spin-off
Right-click the ⑂ SPIN-OFF row (Long-term) or the parent position (Stock Trading) and choose Undo spin-off of …. Trailhead refuses while the new shares have sales; delete those first.
Cash paid in place of fractional shares isn't recorded.
Change a symbol
When a company changes its ticker, or Yahoo spells it differently from your broker:
- Right-click the position and choose Change symbol….
- Type the new symbol or the company name and click Search.
- Pick the right match and click Use symbol.
Trailhead renames it in every trade, dividend and alert, in every portfolio, keeps any sector you set by hand, and fetches prices under the new name.
The same dialog opens when you double-click a No price badge (Chapter 2).
Chapter 8 covers keeping all of this safe: backups, restore, and moving your data in and out of Trailhead.
8. Keeping your data safe
Everything you enter in Trailhead lives in one file on your computer. Nothing is stored online, which means nobody else has your trading history, and also that nobody else can recover it for you. This chapter covers backups, restoring, and moving data in and out of Trailhead.
Where your data lives
Trailhead keeps all of your portfolios, trades, settings and downloaded prices in one database file. On Linux it's:
~/.local/share/Trailhead/portfolio.db
You don't need to open it or know its format. Back it up, and you've backed up everything.
Automatic backups
Trailhead backs up the database once a day while it's running, and again every time you close it. Backups go to Trailhead Backups in your Documents folder, one dated file each, and Trailhead keeps the newest 30.
If the folder isn't available, for example because the NAS is offline, Trailhead skips the backup and tells you.
Choose where backups go
A backup on the same disk as the database protects you from mistakes, not from a failed disk. Put backups somewhere that survives your computer, such as a NAS share or a folder your cloud storage syncs.
- Open Settings (Ctrl+,).
- Under Backups, click Browse… next to Folder and choose the folder.
- In Keep newest, enter how many backups to keep before the oldest are deleted.
- Click Save.
Back up now
Before a big edit or an import, choose File ▸ Backup now (Ctrl+B). To save a copy anywhere you choose, outside the rotation, choose File ▸ Backup as….
Restore a backup
Restoring replaces everything in Trailhead with a backup.
- Choose File ▸ Restore….
- Choose the backup file. Trailhead checks that it's a valid Trailhead database and shows how many portfolios and trades it holds.
- Click Restore.
A message confirms the restore and says where the safety copy is. A backup from an older version of Trailhead is upgraded as it's restored.
Move a portfolio with JSON
To move one portfolio between computers, or share it, export it as JSON on one and import it on the other.
Export a portfolio
- Open the portfolio.
- Choose File ▸ Export portfolio JSON…, or Export JSON… from the portfolio's right-click menu in the sidebar.
- Choose where to save the file.
The file holds the portfolio with its trades, stop changes, dividends, splits, spin-offs and, for a Cash portfolio, its accounts and ledger. Links between a trading portfolio and a cash account aren't exported.
Import a portfolio
- Choose File ▸ Import portfolio JSON….
- Choose the file.
Trailhead adds it as a new portfolio. Nothing already in Trailhead is changed; if the name is taken, the import gets a new one. Link it to its cash account again if it had one (Chapter 6).
Export a table
- Open the table you want: a Stock Trading portfolio's positions or Performance view, a Long-term portfolio's holdings, or a Cash portfolio's accounts.
- Choose File ▸ Export table CSV….
- Choose a CSV or Excel (.xlsx) file and where to save it.
The file holds the table as shown.
Import from a spreadsheet
If you've been tracking trades in a spreadsheet, Trailhead can bring them into a Stock Trading portfolio. It reads one trade per row: the date, symbol, shares, price and stop of the buy, and, if the trade is closed, the sell date and exit price. The appendix lists the columns it expects.
- Save the spreadsheet as CSV.
- Open the Stock Trading portfolio the trades belong in.
- Choose File ▸ Import legacy spreadsheet CSV… and choose the file.
Rows it can't read, such as headings, blank rows and spreadsheet errors like #DIV/0!, are skipped, and Trailhead
lists them when it's done.
The appendix lists every shortcut, setting, column and command in one place.
Appendix: Quick reference
Everything in one place, for looking up rather than reading.
Keyboard shortcuts
| Keys | Action |
|---|---|
| Ctrl+N | New trade (New Account in a Cash portfolio) |
| Ctrl+D | Move Money (Cash portfolio) |
| Ctrl+E | Edit the selected trade |
| Del | Delete the selected trade |
| F5 | Refresh prices |
| Ctrl+F | Search for a symbol |
| Enter or Space | Unfold or fold the selected position |
| Ctrl+J | Open or close the detail pane |
| Ctrl+0 | Dashboard |
| Ctrl+1 … Ctrl+9 | Portfolios, in sidebar order |
| Ctrl+\ | Collapse or expand the sidebar |
| Ctrl+B | Back up now |
| Ctrl+, | Settings |
| Ctrl+Q | Quit (backs up first) |
| B / S / H / C | In the trade dialog: switch to BUY, SELL, SHORT or COVER |
Help ▸ Keyboard shortcuts shows the list in the app.
Menus
File: New portfolio… · Backup now · Backup as… · Restore… · Export portfolio JSON… · Import portfolio JSON… · Export table CSV… · Import legacy spreadsheet CSV… · Quit
Edit: New trade… · Cash… · Edit trade… · Delete trade · Settings…
View: Density (Compact or Comfortable rows) · Columns… · Show closed · Show stop changes · Search symbol · Collapse sidebar · Toggle detail pane · Alerts… · Dashboard
Data: Refresh prices · Pending dividends… · Stock splits… · Manual price… · Manual dividend…
Help: Keyboard shortcuts · About Trailhead
Right-click menus
| Where | Items |
|---|---|
| Portfolio in the sidebar | Open · Rename / edit settings… · Export JSON… · Archive |
| Stock Trading position | Record sell… (Record cover… on a short) · Set stop… · Add-on buy… (Add to short…) · Rebuild stop history from ladder… · Stock splits… · Record spin-off… · Change symbol… · Override price… · Edit sector… · Copy symbol |
| Stock Trading trade or stop row | Edit trade… · Delete trade · Undo stop change |
| Long-term holding | Buy more… · Sell… · Set stop & target… · Record spin-off… · Confirm dividend… · Record dividend… · Stock splits… · Change symbol… · Override price… · Edit sector… · Copy symbol |
| Cash account | Move money… · Confirm interest… · True up… · Change rate… · Link portfolio… · Edit account… · Delete account… |
Some items only appear when they apply, for example Undo spin-off after a spin-off is recorded.
Settings
Portfolio settings (File ▸ New portfolio, or right-click ▸ Rename / edit settings):
| Setting | Meaning |
|---|---|
| Name | Shown in the sidebar and on the Dashboard |
| Type | Stock Trading, Long-term Holdings or Cash; fixed once created |
| Max amount | Stock Trading: the most you plan to have invested at once |
| Risk per trade % | Stock Trading: share of the max amount risked per trade |
| Settles in / From | The cash account this portfolio's trades and dividends move money in, from a date |
Settings (Ctrl+,):
| Section | Setting | Default | Meaning |
|---|---|---|---|
| Backups | Folder | Documents/Trailhead Backups | Where automatic backups go |
| Keep newest | 30 | Backups kept before the oldest are deleted | |
| Market data | Provider | Yahoo Finance | Or Manual prices only (offline) |
| Refresh prices on startup | On | Fetch prices when Trailhead opens | |
| Auto refresh | Off | Every 5, 15 or 30 minutes, or every hour, weekdays 9:30–16:00 New York time | |
| Alerts | Near stop % | 2 | How close to the stop counts as near |
| Earnings within days | 7 | How early to warn about earnings | |
| Open risk warn % | 6 | Open risk above this share of value is flagged | |
| Desktop notifications | On | Show new alerts outside the app | |
| Discord | Webhook URL | — | The Discord channel webhook to post alerts to |
| Send | Stop hit, Target: sale suggested | Which alert types go to Discord | |
| Display | Table density | Compact | 30 px or 36 px rows |
Exit plans
R = entry − initial stop. Level kR = entry + k × R. A milestone is reached when a daily close is at or above its level. The four tranches are ¼ of the original shares each; the last (the runner) takes any remainder.
For a short, everything is mirrored: R = initial stop − entry, level kR = entry − k × R, a milestone is reached when a daily close is at or below its level, and each ladder stop is below the one before. In the tables below, read "below" for "above".
1-3-6
| Milestone | Reached at | Sell | Ladder stop |
|---|---|---|---|
| M0 (entry) | — | — | entry − 1R (the initial stop) |
| M1 | 1R | tranche 1 | entry − 0.5R |
| M2 | 2R | — | entry |
| M3 | 3R | tranche 2 | entry |
| M4 | 6R | tranche 3 | 3R |
| T9, T12, T15 … | 9R, 12R, 15R … | — | 3R below the level |
1-2-3
| Milestone | Reached at | Sell | Ladder stop |
|---|---|---|---|
| M0 (entry) | — | — | entry − 1R |
| M1 | 1R | tranche 1 | entry |
| M2 | 2R | tranche 2 | 1R |
| M3 | 3R | tranche 3 | 2R |
| T4, T5, T6 … | 4R, 5R, 6R … | — | 1R below the level |
The next target shown in the table is always the next whole R beyond the best close (the highest for a long, the lowest for a short), whether or not that level calls for an action.
Alerts
| Alert | Raised when | Urgency | Discord category |
|---|---|---|---|
| Stop hit | The live price is at or below the current stop (at or above for a short) | Urgent | Stop hit |
| Near stop | The price is within Near stop % of the stop, not yet through it | Watch | Near stop |
| Target reached | A milestone is reached with a sale due | Due | Target: sale suggested |
| Target reached | A milestone is reached with only a stop move due | Due | Target: move stop only |
| Earnings soon | Earnings are within the set number of days | Watch | Earnings soon |
Alerts use the same words as the table's Action column. Dividends, interest and split reviews appear in the tables and on the Dashboard but don't alert.
Summary cards
Stock Trading: Portfolio value · Dividends · Unrealized P/L · Realized P/L · Open risk · Deployed / Max · Win % · Profit factor · Expectancy · R / StDev
Long-term Holdings: Portfolio value · Total return · Unrealized P/L · Realized P/L · Est. annual income · Yield on cost · Dividends received · Next dividend
Cash: Total cash · Weighted APY · Interest earned · Yield earned · Net flows · Interest to confirm
Columns
Columns marked * are hidden by default; turn them on under Columns.
Stock Trading positions
| Column | Shows |
|---|---|
| Symbol | Ticker, with a SHORT badge for a short position; hover for the price peek |
| Sector | From Yahoo, or as you set it; on trade rows, the trade type (▲ BUY, ▼ SELL, ▼ SHORT, ▲ COVER, and ▲ STOP or ▼ STOP for a stop moved up or down) |
| Status | OPEN or CLOSED; on trade rows, the lot number or Stop-out |
| Strategy / TF | Strategy · time frame · exit plan |
| Shares | Open / original shares |
| Avg entry | Average entry of the open lots |
| Last | Last price; M = manual |
| Day % | Today's change in the price |
| Mkt value | Open shares × last; negative for a short |
| % port. | Share of the portfolio's gross value (a short counts at its full size) |
| Stop | Current stop (the nearest exit among open lots) and distance from last |
| Next target | Next whole R beyond the best close (the nearest among open lots) and distance |
| R now | Unrealized R of the open lots |
| Unreal. P/L | Unrealized gain or loss |
| Real. P/L | Realized gain or loss from sales |
| Total P/L | Unrealized + realized + dividends |
| Open risk | Open shares × the distance from last to the current stop |
| Earnings | Next earnings date |
| Div yield * | Annual dividend ÷ last price |
| Days | Days held |
| Action | What to do next, with buttons on hover |
Performance view: Group · Closed · Open · Win % · Avg win · Avg loss · Profit factor · Expectancy · R range · StDev · SQN · P/L · Avg days (Chapter 4 describes each).
Long-term Holdings
| Column | Shows |
|---|---|
| Symbol | Ticker or metal |
| Type | Investment type |
| Sector * | From Yahoo, or as you set it |
| Status | OPEN, STOP HIT, TARGET HIT or CLOSED |
| Shares | Shares held (ounces for bullion) |
| Avg cost | Average cost per share of the shares held |
| Last, Day %, Mkt value, % port. | As for Stock Trading |
| Cost basis * | Cost of the shares held |
| Unreal. P/L | Market value − cost basis |
| Real. P/L * | Realized gain or loss from sales |
| Dividends | Received while held |
| Total return | Unrealized + realized + dividends |
| Return % | Total return ÷ money put in |
| Yield | Annual dividend ÷ last price |
| YoC | Yield on cost: annual income ÷ cost basis |
| Income / yr | Shares × annual dividend per share |
| Next div | Next ex-date, or the pay date once the ex-date has passed; ~ = estimated |
| Stop, Target | Optional levels and distance from last |
| Days * | Days held |
| Action | Record sell, Confirm div, Find symbol, Review split, Record spin-off |
Cash accounts
| Column | Shows |
|---|---|
| Account | Name |
| Type | Savings or Money market |
| Institution | Bank or broker, and the fund's symbol |
| Linked to | Portfolios that settle in the account |
| APY | Current APY or the fund's yield |
| Change | Change in balance over the period |
| Balance | Balance today; on a ledger line, the balance after it |
| Est. / month * | Balance × APY ÷ 12 |
| Interest | Interest received in the period |
| Yield earned | Interest ÷ average daily balance, annualized |
| Net flows * | Money in minus money out over the period |
| Pays * | Day of the month interest is paid |
| Last true-up | When the balance was last checked against the bank |
| Action | Confirm interest, True up |
Command line
| Command | What it does |
|---|---|
trailhead |
Starts Trailhead |
trailhead --db FILE |
Uses another database file, for example to try something on a copy |
trailhead --check-alerts |
No window: refreshes prices, records new alerts, posts them to Discord, exits |
trailhead --check-alerts --market-hours |
The same, but does nothing outside weekdays 9:25 AM – 4:30 PM New York time |
trailhead --check-alerts --no-refresh |
Checks alerts against the prices already stored |
--check-alerts exits with code 1 if prices couldn't be fetched or Discord couldn't be reached, so a scheduler's log
shows the failure.
Checking alerts on a schedule (Linux)
The source includes systemd user units that run the check every 15 minutes on weekdays. To install them:
cp packaging/systemd/trailhead-alerts.* ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable --now trailhead-alerts.timer
To see what it's been doing:
journalctl --user -u trailhead-alerts
To stop it:
systemctl --user disable --now trailhead-alerts.timer
Files and folders (Linux)
| What | Where |
|---|---|
| Database | ~/.local/share/Trailhead/portfolio.db |
| Automatic backups | ~/Documents/Trailhead Backups/ (or the folder in Settings) |
| Safety copies made before a restore | pre-restore/ inside the backup folder |
Spreadsheet import columns
File ▸ Import legacy spreadsheet CSV… reads one trade per row, by column position:
| Column | Contents |
|---|---|
| B | Buy date |
| C | Symbol |
| E | Shares |
| F | Buy price |
| I | Initial stop |
| K | Sell date (blank while open) |
| L | Exit price (blank while open) |
Dates can be written as 2026-03-15, 03/15/2026, 03/15/26, 15.03.2026, 2026/03/15, 15-Mar-2026 or 15-Mar-26. A row with a sell date and exit price becomes a buy and a sale of all its shares.
Glossary
| Term | Meaning |
|---|---|
| R | The risk on a trade at entry: entry − initial stop (initial stop − entry for a short), per share or times the shares |
| R multiple | A result expressed in R: +2R made twice the risk |
| Lot | One buy, with its own entry, stop, R and ladder |
| Position | All the lots of one symbol from the first buy until every share is sold |
| Short | A position opened by selling borrowed shares; it gains when the price falls |
| Cover | Buying back shares you've sold short, closing part or all of a short lot |
| Milestone | A level in R where the exit plan says to act |
| Tranche | One quarter of a lot's original shares, sold at a milestone |
| Runner | The last tranche, which rides a trailing stop |
| Ladder stop | Where the exit plan puts the stop at the highest milestone reached |
| Expectancy | The average R of closed trades |
| SQN | System Quality Number: √(trades, up to 100) × expectancy ÷ standard deviation |
| Open risk | What you'd lose if every open position moved to its current stop |
| Deployed | The cost of open lots in a Stock Trading portfolio; a short at the value it was sold for |
| Yield on cost | Annual income ÷ what you paid |
| True-up | Checking a cash account's balance against the bank's and recording the difference |