Before writing a single line of EA code, I spent a long session making sure the foundation is solid. Here's what got done:
1. Risk rules first, in hard numbers I wrote a dedicated risicoregels.md (risk rules) file. Every number in it becomes a fixed constant in the code, not a setting anyone can tweak: - Demo account only, €250 start, EUR/USD only, max 1 open position
- Risk per trade: 0.5% of balance below €500, 1% from €500
- If even the minimum lot (0.01) risks too much → no trade, no "just this once"
- Daily stop: −2% in a day → no new trades until tomorrow
- Max spread 1.5 pips, no new trades 30 min before/after major news, everything closed Friday 16:00 New York time
- Loss limit with two safety nets, whichever is stricter: one third of the highest equity is never touched, and half of the highest profit is always kept. At the start that means the account can never drop below €83.33.
2. Thinking in pips, not euros My first instinct was "keep the profit target tiny so I don't give it back." The maths showed the opposite: a €0.50 target against a €1.25 risk needs a 76% win rate just to break even. So instead:
- Take profit = 1.5× the stop distance (in pips)
- Once a trade is 1× the stop distance in profit, the stop moves to entry +1 pip → that trade can no longer lose
- With that setup, a ~44% win rate is enough to break even
Small fish swimming with the whales, but letting the current carry you a bit. 🐟🐋
3. Clear roles between me and AI I briefly wanted to give Claude "carte blanche" to build and run everything. We talked it through and settled on this split: Claude researches, proposes (with reasoning) and builds; I decide and approve every step. Hard limits can only be changed by me, in the code. No AI, and no person, gets uncontrolled access to my money.
4. Python ↔ MT5 bridge working
- Took a Hyper-V checkpoint of my trading VM first, so there's always a way back
- Found out the MetaTrader5 Python package doesn't support Python 3.15 yet (max 3.14) → installed 3.14 next to it and created a dedicated virtual environment just for Kairo
- Wrote a read-only connection test script: it connects to MT5, checks the account, balance and symbol data, and never places an order
5. The test caught something real The connection test showed my demo account was set to 1:500 leverage instead of the 1:100 I'd chosen. Fixed it in the broker portal and confirmed it with a second run. Lesson learned: from now on the EA checks the leverage itself and refuses to trade if it isn't 1:100.
It also confirmed the real numbers: 1 pip on 0.01 lot EUR/USD = €0.089, so my max stop at €250 and 0.5% risk is about 14 pips.
Next up: compile an empty EA in MetaEditor, then build the risk module, before any strategy exists. Strategy for v1: a Donchian breakout on the 15-minute chart.
Small steps, hard limits, think it through, and keep going. 🎈
#Infrastructure