A professional trading journal dashboard for tracking and analyzing your trading performance.
π Multi-Device Sync: Access your trading journal from any device (work laptop, personal laptop, phone) with automatic GitHub Gist synchronization!
trading/
βββ strategies/ # Strategy template documentation (JSON files)
β βββ .gitkeep
βββ trading-journal.html # Trading journal dashboard (standalone)
βββ GITHUB_SETUP.md # GitHub Pages deployment & sync setup guide
βββ README.md
- Technical Analysis - Analyze markets using TradingView or your preferred charting platform
- Trade Execution - Execute trades on your broker based on your strategy signals
- Performance Tracking - Log and analyze trades using the Trading Journal Dashboard
A self-contained, browser-based dashboard for tracking and analyzing your trading performance. No installation required - just open the HTML file in your browser.
β Track Both Open and Closed Trades
- Log open positions with risk tracking
- Record closed trades with P&L and R:R analysis
β Auto-Calculations
- P&L automatically calculated based on position size
- Risk:Reward ratios computed from entry, exit, and stop loss
- Risk exposure tracked for open positions
β Performance Metrics
- Win Rate, Total P&L, Average R:R
- Profit Factor, Expectancy, Average Win/Loss
- Open positions summary with total risk exposed
β Data Management
- Export trades to CSV (European format: DD/MM/YYYY)
- Full backup/restore via JSON import/export
- Import strategy templates from JSON files
- All data persists in browser localStorage
β Multi-Device Sync π
- Manual sync across all devices using GitHub Gist
- Works on work laptop, personal laptop, and phone
- Click "π Sync Now" button to sync your data
- Offline support - changes saved locally, sync when online
- One-time setup with GitHub Personal Access Token
β Professional UI
- Dark mode theme optimized for trading
- Responsive design (desktop, tablet, mobile)
- Search, filter, and sort functionality
- Pagination for large trade histories
π Access from anywhere: https://boydiego.github.io/trading/trading-journal.html
Benefits:
- Access from work laptop, personal laptop, and phone
- No need to download files
- Always the latest version
- Automatic GitHub Gist sync keeps all devices in sync
Setup Required:
- Enable GitHub Pages (one-time, 2 minutes) - see GITHUB_SETUP.md
- Configure GitHub sync (one-time per device, 1 minute) - see GITHUB_SETUP.md
π Full deployment guide: GITHUB_SETUP.md
Simply double-click trading-journal.html - it opens in your browser. No installation or setup required!
Supported Browsers: Chrome, Firefox, Safari, Edge, Brave
Note: This option uses localStorage only (no multi-device sync)
Create strategy template files in the strategies/ folder:
{
"name": "Trend Following",
"description": "Follow strong trends with momentum confirmation",
"entry_rules": [
"Price above 50 EMA",
"RSI > 50",
"Volume confirmation"
],
"exit_rules": [
"Price crosses below 20 EMA",
"RSI < 40",
"Stop loss triggered"
],
"risk_management": {
"stop_loss_type": "ATR-based",
"atr_multiplier": 2.0,
"position_sizing": "1% account risk per trade"
}
}Then click "Import Strategies" in the dashboard to load them into the strategy dropdown.
If you want to sync across multiple devices:
-
Create GitHub Personal Access Token (one-time, 2 minutes)
- Go to https://github.com/settings/tokens/new
- Note: "Trading Journal Sync"
- Expiration: "No expiration" (or 90 days)
- Select scope: β gist (only this permission)
- Click "Generate token" and copy it
-
Configure Sync (on each device)
- Open the dashboard
- Click "βοΈ Setup GitHub Sync" button
- Paste your GitHub token
- Click "Save & Enable Sync"
That's it! Your trades will now sync across all devices. Click the "π Sync Now" button to sync your data manually whenever you make changes.
See GITHUB_SETUP.md for detailed instructions.
For Open Positions:
- Fill in: Date, Symbol, Direction (Long/Short), Entry Price, Stop Loss, Position Size, Status: Open
- The dashboard shows your risk exposure
For Closed Trades:
- Fill in all fields above PLUS Exit Price
- Set Status to Closed
- P&L and R:R are calculated automatically
- Metrics Dashboard - View win rate, total P&L, profit factor, and more
- Trade History - Search, filter, and analyze all your trades
- Export Data - Regular backups to CSV or JSON
- Win Rate, Total P&L, Avg R:R, Total Trades
- Winning/Losing trade counts and percentages
- Average Win/Loss amounts
- Profit Factor and Expectancy
- Best and Worst trades
- Number of open positions
- Total risk exposed (in EUR)
- Average entry price
- Date (DD/MM/YYYY format)
- Symbol (e.g., BTCUSD, AAPL, etc.)
- Direction (Long/Short)
- Entry Price, Exit Price (optional for open trades), Stop Loss
- Position Size
- Status (Open/Closed)
- Strategy (dynamically loaded from imported strategies)
- Notes (for trade analysis and observations)
- Sortable columns (click headers to sort)
- Color-coded rows:
- π¦ Blue = Open positions
- π© Green = Winning trades
- π₯ Red = Losing trades
- Filter by: Status, Symbol, Strategy
- Search by symbol
- Edit or delete trades
All data is stored in your browser's localStorage:
- Currency: EUR (β¬)
- Date Format: DD/MM/YYYY (European format)
- Time: Date only (no time component)
Risk = |Entry Price - Stop Loss| Γ Position Size
P&L (Long) = (Exit Price - Entry Price) Γ Position Size
P&L (Short) = (Entry Price - Exit Price) Γ Position Size
Reward = |Exit Price - Entry Price| Γ Position Size
Risk:Reward = Reward / Risk (displayed as "1:X.XX")
Export to CSV - For analysis in Excel/Google Sheets
- European date format (DD/MM/YYYY)
- All trade details included
Export to JSON - Full backup with all fields
- Includes metadata (version, export date)
- Perfect for backup and restore
Import from JSON - Restore your trades
- Validates JSON structure before importing
- Replaces current data (export first to backup!)
Import Strategies:
- Create JSON files in the
strategies/folder with a "name" field - Click "Import Strategies" in the dashboard
- Select one or more JSON strategy files
- Strategy names are added to the dropdown and persisted
Default Strategy: "Custom" (always available for ad-hoc trades)
β Regular Updates - Log trades as soon as they close for accurate tracking
β Detailed Notes - Use the Notes field to record your thought process and lessons learned
β Backup Regularly - Export to JSON weekly to prevent data loss
β Review Metrics - Check your performance metrics weekly/monthly to identify improvement areas
β Strategy Tracking - Categorize trades by strategy to see which setups work best
β Risk Management - Monitor your open positions total risk exposure
The dashboard works on all modern browsers:
- β Google Chrome
- β Mozilla Firefox
- β Safari
- β Microsoft Edge
- β Brave Browser
Note: Requires JavaScript and localStorage enabled.
All data is stored locally in your browser using localStorage:
- Capacity: ~5-10MB (approximately 5,000-10,000 trades)
- Privacy: Your data never leaves your device
- Offline: Works completely offline after initial load
Q: My data disappeared!
- localStorage is browser-specific. Did you switch browsers?
- Did you clear browser data? Always export backups regularly!
Q: I get "Storage quota exceeded" error
- Export old trades to CSV/JSON
- Delete historical trades you no longer need
- Consider starting a new journal for the next year
Q: Can I use this on multiple devices?
- localStorage is device-specific
- Use Export/Import to sync between devices manually
- Export on Device A β Import on Device B
Q: The dashboard won't load
- Check that JavaScript is enabled in your browser
- Try a different browser
- Clear browser cache and reload
The trading journal is a single HTML file with embedded CSS and JavaScript:
- No build process required
- No dependencies needed
- Pure vanilla HTML/CSS/JavaScript
- BEM naming convention for CSS classes
To modify:
- Open
trading-journal.htmlin a text editor - Make your changes
- Save and refresh in browser
This project is for personal use in trading analysis and performance tracking.
- Modern web technologies for offline-capable applications
Happy Trading! π