Personal Project · In Development

AI Trading
Journal

A self-hosted AI coaching system for traders. Pre-trade validation, real-time psychology tracking, post-trade analysis and weekly coaching reports — all running locally on a Raspberry Pi 5.

4 trades
4
Trades
75%
Winrate
$84
P&L
Recente trades
XAUUSD LONG
+$42
Today 09:14 · Rustig
XAUUSD SHORT
-$21
Yesterday 14:32 · FOMO
XAUUSD LONG
● OPEN
Today 11:02 · Confident
+ NIEUWE TRADE
6 Core Features
3 AI Models
0€ Monthly Cost
Pi 5 Self-Hosted
What it does

Built for discipline,
not just data.

Pre-Trade Check

AI validates every trade against your personal strategy rules before you enter. R:R check, trend alignment, Stoch RSI confirmation. No plan = no trade.

🧠
Psychology Tracking

Log your emotional state before every trade — Rustig, Confident, FOMO, Gehaast. The AI detects patterns: worse results when trading after a loss, better results in the morning.

📊
Post-Trade Analysis

After closing, get an instant AI breakdown: did you follow the plan? Was the result luck or skill? 2–3 concrete improvements for the same setup next time.

📰
News Context

When a trade goes wrong, Claude API fetches real-time market news to explain external factors — NFP, CPI, Fed decisions — and separates market impact from behavioral errors.

📅
Weekly Coaching

Every week, get a full AI report: winrate by day/time, emotional triggers, pattern recognition. Output: a concrete coaching plan with clear actions for next week.

🔒
100% Private

Everything runs on a Raspberry Pi 5 at home. No cloud, no subscriptions, no data leaving your network. Local Ollama models for daily analysis, Claude API only when needed.

Tech Stack

Built from scratch.
No shortcuts.

Flask Web framework & REST API
SQLite Local trade database
Ollama + Qwen2.5:14b Local AI analysis engine
Anthropic Claude API News context & deep analysis
MetaTrader 5 Python Automatic trade import (WIP)
Raspberry Pi 5 (16GB) Self-hosted infrastructure
ai.py — pre_trade_check()
def pre_trade_check(trade_data): prompt = f""" Trading plan rules: - Only XAUUSD, min R:R 1:2 - Stoch RSI confirmation required - Max 2 trades per day - No trading during news Evaluate this trade: Direction: {trade_data['richting']} Entry: {trade_data['entry']} SL: {trade_data['stop_loss']} TP: {trade_data['take_profit']} Emotion: {trade_data['emotie_voor']} Return: APPROVED or WARNING + reason """ response = ollama.chat( model='qwen2.5:14b', messages=[{'role': 'user', 'content': prompt}] ) return response['message']['content']
AI Architecture

Three models,
one purpose.

01
Pre-trade validation

Qwen2.5:14b checks the setup against your strategy rules locally. Fast, private, free.

02
Trade is executed

You trade in MetaTrader 5. The journal logs psychology and market conditions in real-time.

03
Post-trade analysis

Qwen2.5:14b analyses the result. If news context is needed, Claude API fetches current market data.

04
Weekly coaching report

All trades + psychology patterns → one actionable coaching plan every Sunday.

🦙
Qwen2.5:14b
Local

Runs on the Pi via Ollama. Handles all daily pre/post-trade analysis. 9GB RAM, ~45s response. Zero cost, zero data leaving the network.

Claude (Anthropic API)
API

Used selectively for deep analysis with real-time web search. Fetches news context for failed trades — NFP, CPI, Fed announcements.

🔍
Perplexity API
Search

Real-time financial news search for market context. Included via Revolut Metal plan — zero additional cost.