TradeJourney

TradeJourney sign-in (demo)

Username: admin
Password: TradeJourney!2025

 

TradeJourney is a lightweight, password-protected trading journal as a PHP web app. It stores trades in CSV (readable by Excel/Numbers/Google Sheets) and presents them in a clean, tabbed UI.

  • Input: fast manual entry (open/close time without seconds, symbol, side, entry/exit, SL/TP, setup, notes, volume, profit €).
    – Click a row to open a centered popup editor to edit, save & close.
  • Statistics:
    • Equity curve (full width)
    • KPIs: trades, win/loss, hit-rate, gross profit/loss, profit factor, net PnL, avg/trade
    • Wins/Loss by symbol (stacked bars)
    • Long vs short PnL (donut)
  • Calculations: same metrics in compact cards (styled, wrapped paths).

Security

  • Login/Logout with session, credentials from external PHP config (journey_config.php).
  • Optional password hash (BCrypt) via password_hash(...).

Files (3)

  • trade_journal.php – the application (UI, login, CSV logic).
  • journey_config.php – PHP config returning user, pass or pass_hash, csv.
  • tradejourney.csv – data store (created with sample rows on first run if missing).

CSV columns

ts_open;ts_close;symbol;direction;entry;sl;tp;exit;rr;setup;comment;volume;profit_eur
YYYY-MM-DD HH:MM;YYYY-MM-DD HH:MM;DE40|XAUUSD;Long|Short;…;…;…;…;R;…;…;…;123.45

Installation

Requirements

  • Web server with PHP 7.4+ (8.x recommended), Apache or Nginx
  • Write permissions for the folder holding the CSV

Deploy files

  trade_journal.php
  journey_config.php
  tradejourney.csv   (optional – will be created if missing)

Example journey_config.php

Place this file outside the webroot (e.g. /etc/tradejourney/journey_config.php) and adapt the require path in trade_journal.php.

<?php
		return [
		  'user'      => 'admin',
		  // 'pass_hash' => password_hash('YourSecret', PASSWORD_DEFAULT),
		  'pass'      => 'TradeJourney!2025',
		  'csv'       => __DIR__.'/tradejourney.csv',
		];

Tip: Create your hash once in a small PHP console:

echo password_hash('YourSecret', PASSWORD_DEFAULT);

Permissions

  • journey_config.php: 640 (readable by web server user/group only).
  • CSV folder: web server needs write access (append/save).

Web server (optional)

  • Apache: ensure PHP is executed; otherwise code will be shown as text.
  • Nginx: route PHP-FPM correctly to trade_journal.php.

First run

  1. Open the page (e.g. https://yourhost/trade_journal.php).
  2. Sign in using the credentials from journey_config.php.
  3. Check CSV: path is shown in the “Calculations” tab; sample data is generated on first run.
  4. Add your first trade: tab “Input” → save → appears in the table → click to edit.
  5. View stats: tab “Statistics” (equity on top, 3 cards below).
  6. Logout: button in the top right corner.

Operations & maintenance

  • Backup: regularly save tradejourney.csv (daily) plus journey_config.php.
  • Update: upload the new trade_journal.php; config/CSV remain intact.
  • Security: enable HTTPS, use pass_hash only, keep the config outside the webroot.

Roadmap / Next features

1. CSV upload (import existing journals) => Upload CSVs with the same schema and append them.

2. Automatic input from MT4/MT5 (Expert Advisor) => Post trades on close/entry via HTTP-POST to a small PHP API (WebRequest) or via file-drop (EA → CSV; cron/importer appends).