{% extends "journal/base.html" %} {% load static %} {% block title %}Settings — Setup Log Pro{% endblock %} {% block content %}
Charts use Yahoo Finance by default (free, no signup, and — unlike Alpaca's free tier — complete 1-minute coverage, not just a single exchange's trades). It only keeps ~7 days of 1-minute history and ~60 days of 5/15-minute history, though data is cached permanently once imported, so this only matters if you import a trade after its window has passed. For those older trades, create a free Alpaca account (no funding required) and paste its API key/secret below — the app tries Yahoo Finance first, per symbol, at import time, and only falls back to Alpaca (up to ~1 year of history, but gappier — its free tier only sees IEX exchange trades) once Yahoo Finance no longer has the data.
If a trade's chart data was never fetched successfully (a network hiccup, or the trade was imported before the provider had that day's data ready yet), it stays missing forever — nothing normally retries it. This checks every trade from the last 7 days for missing or daily-only chart data and retries it, trying Yahoo Finance first then Alpaca (if configured above) — same as a normal import. It's scoped to the last 7 days here as a quick check for recent fetch failures; older trades can often still be recovered too (Alpaca's free tier goes back roughly a year), just not from this button — use the same button on the Simulator page instead, where it checks whatever trades you've filtered to, with no day limit.
Runs this same check (last 7 days) on its own, without needing to click the button above.
A separate, opt-in data source from Yahoo/Alpaca above, and stronger than either: Polygon's data comes from the full consolidated tape (every market maker), not just one exchange, so it replaces a thin/undercounted bar (e.g. from Alpaca's IEX-only free tier) with a fuller one for the same minute, not just fills in bars that were missing outright. Downloads only the exact days you actually traded each symbol currently in your trades — never a wider date range, so no data is fetched for days you didn't trade that symbol. Runs in one detached background process — this can take a long time at the free tier's rate limit (5 requests/minute by default, one request per symbol/day), and keeps running even if you restart the app. Set your actual plan tier below so a trade older than your plan's history window is skipped up front instead of spending a real rate-limited request just to get an over-the-limit error back. If interrupted (e.g. the PC was shut down mid-run), clicking "Start backfill" again resumes the same job from where it left off instead of starting over. Get a free API key at polygon.io.
{{ polygon_tier_default_rpm|json_script:"polygon-tier-default-rpm" }}A standalone trailing rule (the "as its own system" combos on the Simulator page) defines its own 1R as the distance between your entry price and the rule's level at that moment. When that level happens to land only a cent or two from entry price by pure coincidence, dividing by such a tiny distance can turn ordinary price movement into a wildly inflated R multiple that isn't really telling you anything about the strategy. A trade whose distance is below this threshold is skipped for that combo instead.
Customize the trade-detail page's candlestick chart. Entry/exit are the triangle markers (shape already shows direction — up for long, down for short); Stop loss / Target are the dashed reference lines.
Shows the trade's symbol as faint text on the chart itself.
Define as many SMA/EMA overlay lines as you want — each gets its own show/hide toggle on every trade's chart. "Default visible" controls whether a newly-seen indicator starts on or off there; either way it remembers the last toggle you set per trade page. The preview below uses your saved chart colors against sample data, so you can see the effect before checking a real trade.
Set a default commission rate per share. It's applied automatically (quantity × this rate) to any newly imported trade that doesn't already carry its own commission value — existing trades are never changed retroactively, and you can always edit a trade's commission individually from its detail page.
Sets commission = quantity × rate on every trade in the chosen portfolio, right now. This replaces whatever commission those trades already have, including any you set by hand — it does not just fill in blanks, and there's no automatic undo.
Everything lives in one file, db.sqlite3 (currently {{ db_size_mb }} MB). These tools work
directly on that file's data — take a backup before trying anything else here, and keep backups
somewhere outside this folder (a cloud drive, a USB stick) since a backup stored next to the app doesn't
protect you if the drive itself fails.
Downloads a complete, self-contained snapshot of the database as it is right now (safe to run while the
app is in normal use — it doesn't lock anything). A copy is also kept in this folder's
db_backups/ directory, listed below, so you can restore from it later without needing to
find the downloaded file again.
| Backup | Kind | Size | Created | |
|---|---|---|---|---|
| {{ b.name }} | {% if b.kind == "pre-restore" %}Auto (pre-restore){% else %}Manual{% endif %} | {{ b.size_mb }} MB | {{ b.mtime|date:"Y-m-d H:i" }} |
No backups yet — click "Download backup now" to create the first one.
{% endif %}
Replaces everything currently in the database with the contents of an uploaded backup file — every
trade, tag, and setting added since that backup was taken is permanently lost. The file must be a
.sqlite3 backup produced by this app (it's checked before anything is touched, and rejected
if it doesn't pass). A safety copy of the current database is always taken automatically right before the
restore, so a restore can itself be undone by restoring that safety copy afterward — but nothing more
recent than that automatic copy is ever recoverable.
Rebuilds the database's internal indexes (REINDEX) and reclaims space left behind by
deleted rows (VACUUM), then runs an integrity check. Not destructive — nothing is added,
removed, or changed about your trades — but it briefly locks the database (typically a few seconds;
longer on a large trade history), so avoid running it while actively importing or editing. Worth running
occasionally after heavy deleting or re-importing, or if the file feels larger than it should.