Series
Research/ Foundations
Reference9 min read · 2026-07-30

Understanding Trading Algorithms: Types, Possibilities, Traps

On this page

What this document is: the reference behind every study on this site. Not a new measurement, but the map: terminology, algorithm families, realistic expectations and the typical mistakes. Wherever a claim rests on one of our own measurements, it is linked. No trading recommendation.

Say "trading algorithm" and people picture a machine that prints money. Build one and you learn quickly: an algorithm is nothing more than a set of rules executed without you — with every strength and every weakness that rule set had before. Automation does not make a strategy better. It only makes it honest, because from now on there are no excuses: every trade follows the rule, and the results are measurable.

Which is exactly why the fundamentals are worth understanding before money is involved.

What a trading algorithm is — and what it is not

A trading algorithm is a fully defined rule set with four mandatory parts:

Building block Question it answers Example
Signal When is an entry even considered? break of the second opening candle
Filter When is the signal ignored? only after sufficient pre-move
Exit When is the trade over — in profit and in loss? stop loss + time exit
Sizing How large is the position? fixed fraction of the account, scaled by stop distance

If one of these parts is missing, it is not an algorithm — it is an idea. Most "strategies" from forums and videos already fail this definition: they describe entries and stay silent on exits and size, yet those two decide the outcome. In our exit study, the choice of exit alone changes the total result of identical entries several times over.

The distinction upward matters just as much: an indicator computes something and displays it — it does not trade. A signal service claims something — rarely verifiable. An Expert Advisor (EA) is the executable form of a rule set on MetaTrader; a system is the rule set plus risk management plus operations: restart safety, error handling, monitoring. The road from "idea" to "system" is the real work — and the subject of our series "From edge to EA".

The families — and what kills each one

Almost every trading algorithm belongs to one of six families. None is "the best". Each earns in one market state and loses in another — the honest question is never whether a family loses, but when, and whether you survive those phases.

Family Core idea Earns in Dies from
Trend following movement continues long trends sideways phases (many small losses)
Mean reversion excess returns to normal ranges trend days (few large losses)
Breakout breaks of structure carry volatility expansion false breaks in tight markets
Hedging/recovery recover losses via counter and follow-up positions calm, sideways markets long one-sided trends
Martingale increase stake after a loss almost always — until once it doesn't a single long outlier
Mechanical/seasonal forced participants (rebalancing, expiry, roll) recurring calendar constraints regime changes in the structure

Four of them deserve a closer look, because they are misunderstood most often.

Trend following and breakout: direction is not the edge

The most common misconception is that market direction supplies the edge. Our measurement across 123,193 episodes in ten markets shows the opposite: the well-known upward drift of equity indices arises largely overnight — intraday, long practically does not beat short. A breakout system does not earn its money from "markets go up in the long run", but from selecting the days on which a break carries. How much that selection matters is visible in the trend-day study: the same simple rule separates markets and days measurably — but only the validation gate shows where that becomes a tradable advantage. Its result: of four markets tested, one passes.

Mean reversion: the loss is rare, but large

Reversion systems feel good because they win often. Their loss distribution mirrors trend following: many small wins, rare large losses — and those decide. When judging a mean-reversion system, do not look at the hit rate; look at the worst five percent of days. A backtest that contains no such days was run on too friendly a period.

Hedging, recovery, martingale: experience from real client code

We know this family beyond theory: across several engagements we have worked on a client's production hedging/recovery system — a well-thought-out rule set with counter-positions and loss recovery, running on a real account. Three findings from that work apply to the whole family:

First: the accounting decides, not the idea. A recovery target that counts gross profits and ignores swap and commission closes cycles too early — the system believes it has recovered while the account is net behind. With positions held for weeks, this compounds into a silent structural loss.

Second: the loss pot grows faster than it drains. Every unit to be recovered needs a counter-move larger than the original loss plus all costs. In a range this works. In a trend that runs for weeks, the losing side accumulates positions whose recovery requirement becomes practically unreachable — in one test we observed a pot whose recovery target was twenty times the usual daily goal.

Third: martingale is not a strategy but a bet on your account size. Doubling after a loss shifts the risk into the rare case — and the rare case arrives. Every long losing streak the account would have survived is visible in the backtest; the one it would not survive usually is not, because the test period happened not to contain it. Whoever trades this family needs hard, technical limits outside the system itself — a guardian that enforces drawdown limits instead of merely displaying them. That is precisely why our protection tools exist.

Mechanical edges: the underrated family

The most robust effects we have measured come not from chart patterns but from forced behaviour of other participants: funds must rebalance at month end, options dealers must adjust hedges, futures must be rolled. The turn-of-the-month effect is the only one of our mechanical candidates to pass the full gate — and our persistence study explains why such structural effects last longer than fresh anomalies: what has a mechanism stays; what was merely noticeable disappears almost entirely within one period.

What is realistically possible

The uncomfortable truths first, because they are the expensive ones:

Most ideas do not survive testing. In our documented reference run, four markets went into the validation gate — one came out. That is not a poor result; it is the result: a process that filters nothing tests nothing. If you expect a hundred percent hit rate at finding strategies, you have not yet built an honest test.

No window is permanently good. Even the strategy that passed the gate sits above the threshold in some rolling one-year windows and below it in others. That is why the distribution across years decides — never the single backtest, never the one good quarter. Going live means signing for the bad windows too.

Realistically achievable: a rule set that exploits a small, measurable, mechanically explainable advantage with discipline, position sizes that survive the unavoidable losing stretches (sizing study), and operations that still know their state after a terminal crash. It sounds unspectacular. It is what actually works — documented end to end in the reference EA.

Not achievable: a system without losing phases, a backtest as a return promise, a purchased bot that permanently prints what the seller shows. If a vendor does not show his losing stretches, he has not abolished them — only hidden them.

The four traps

Almost every failed system fails at one of these four points — usually long before the market had a chance to beat it.

1. The backtest lies to its author

The three most common mechanisms: lookahead (the rule uses information that did not yet exist at decision time — often hidden in daily highs or indicator calculations), overfitting (the rule describes the past instead of capturing a mechanism — recognisable when small parameter changes cause large result changes), and survivorship in your head (you test what caught your attention; what caught your attention is what happened to work). The antidote is not a tool but a procedure: out-of-sample separation, walk-forward, Monte Carlo — described in full here.

2. The costs are missing

Spread, slippage, commission and swap are not rounding errors — for intraday systems they decide the sign. From our client work: a system whose targets calculate gross closes net in the red, and the error only surfaces once real positions accumulate swap over weeks. Rule: every metric net, from the first measurement on. An edge that only exists gross does not exist.

3. The data is worse than assumed

Broker tick data is one provider's bid stream, not market truth. CFD volume is tick counting, not traded volume — volume logic needs real futures data. Time zones and daylight saving shift sessions, and a backtest with misplaced trading hours tests a different system. Data verification is unglamorous and still comes first.

4. Risk is planned last

The usual order is backwards: first an entry is found, then at some point a position size is picked. What holds is the reverse — working backwards from the maximum accepted drawdown to the size (how to do that quantitatively). And for everything the rule set does not cover: limits belong in an instance that runs independently of the trading system and enforces them. A limit that is only displayed is a request.

How to start

Not with code. With a question that can be falsified: "Does the break of the second opening candle in the DAX carry further than chance?" is testable. "I want a profitable bot" is not.

The road behind it is always the same, and it is documented end to end on this site — from the idea on clean data through exit construction, validation and position sizing to the running EA. The overview with all principles lives in the methodology.

And if you have the strategy but not the test bench: that is exactly our work — including the verdict "no edge" when that is how it ends. The cheapest deliverable is a no before development.


This article is part of the foundations and will be extended whenever new measurements sharpen or refute its claims. Last updated: July 2026.