What is an automated trading system?
Before we write a single line of code, we need to agree on what we're actually building. The answer is less glamorous than most people expect — and that's exactly the point.
Strip away the mystique
The trading systems space is full of noise: magic indicators, "AI-powered" black boxes, screenshots of spectacular equity curves with no context. It sells newsletters. It doesn't build robust systems.
An automated trading system, at its core, is simply a set of explicit, unambiguous rules that a computer can follow without human intervention. That's it. No mystique required.
The five components
Every trading system — from a simple moving average crossover to a multi-asset statistical arbitrage engine — is built from the same five components:
1. Data observation
What does the system look at? Price bars? Tick data? Order book depth? Fundamental releases? The answer determines your infrastructure requirements and the universe of strategies available to you.
For this series, we'll start simple: OHLCV (open, high, low, close, volume) price bars from MetaTrader 5. That's more than enough to build, test, and learn the entire development process.
2. Entry conditions
What specific, measurable condition must be true for the system to open a position? "The market looks bullish" is not a condition. "The 20-period simple moving average crosses above the 50-period simple moving average" is.
The discipline of writing exact entry rules is where most aspiring system builders first encounter friction — and where the real value begins.
3. Exit conditions
How and when does the system close a position? This includes:
- Signal exits — the inverse of entry conditions, or a separate exit signal
- Stop losses — maximum acceptable loss per trade
- Take profits — optional profit targets
- Time exits — closing positions that haven't moved after N bars
Exit rules are at least as important as entry rules. A system with excellent entries and poor exits will still lose money.
4. Position sizing and risk rules
How much capital does the system allocate to each trade? This is not an afterthought — it's the primary determinant of whether a system survives long enough for its edge to play out.
Common approaches include fixed lot sizes, fixed fractional risk (risking a set percentage of equity per trade), and volatility-adjusted sizing. We'll explore these as the series progresses.
5. Execution assumptions
How does the system interact with the market? This includes:
- Order types — market orders, limit orders, stop orders
- Slippage — the difference between expected and actual fill price
- Spread — the cost of crossing the bid-ask
- Commissions — broker fees per trade
- Latency — time between signal and execution
These assumptions are where backtests most commonly lie. A strategy that looks profitable with zero slippage and zero spread may be deeply unprofitable in reality. We'll be honest about these costs from the start.
Why this matters
If you can write down these five components in plain English — clearly enough that someone else could implement them without asking you a single question — you have a trading system specification. If you can't, you have a hunch, and hunches can't be backtested, validated, or trusted.
In the next lab note, we'll create exactly this specification for our first system: a deliberately simple, deliberately boring moving average crossover. We choose boring on purpose — because the goal of this series is to teach the development process, not to pretend we've found alpha.
Need help formalising your trading idea into a testable specification?
That's exactly the kind of work I do with clients. Get in touch.
