Here is the most useful simplification in this entire school. It will demystify every system you ever read about, and it's how you'll build your own:

Every trading algorithm is five boxes.

A hobbyist's moving-average bot. A pension fund's rebalancing engine. A high-frequency market maker. Same five boxes — the differences are only in what's written inside them. Let's build a complete system, box by box, in plain pseudocode. Call it the Robot Shopkeeper.

Box 1 — THE SIGNAL: "Something interesting just happened." The signal is the strategy's eye — a precise condition that fires when the market does something your strategy cares about:

SIGNAL: today's closing price crosses ABOVE the 50-day average

That's a trend signal (Chapter 4 tours the families). Notice what makes it machine-ready: no adjectives, no judgment — a comparison a computer can check in a microsecond. Every vague trading idea you've ever had dies or grows up in this box.

Box 2 — THE FILTER: "Yes, but should we act?" Raw signals fire constantly, and most are noise (the Technical Science school taught you why: a signal in the wrong location is a word without a sentence). The filter is the context check:

FILTER: act only IF the broad market index is above ITS 50-day average

FILTER: act only IF the stock trades enough volume to exit easily

FILTER: never act in the first 15 minutes of the day

Beginners obsess over Box 1 and ignore Box 2. Professionals know the filter usually contains more of the edge than the signal — it's the difference between a hammer anywhere and a hammer at a level.

Box 3 — THE SIZING: "How much?" The box that decides whether you survive being wrong — which you will be, often:

SIZE: risk 0.5% of total capital per trade

SIZE: position = (0.5% of capital) ÷ (distance to stop-loss)

SIZE: never more than 5 positions open at once

Notice the sizing rule doesn't know or care how 'confident' the signal feels. Machines don't do conviction sizing — which, given what the Psychology school taught you about confidence, is a feature.

Box 4 — THE EXECUTION: "Place it — and handle reality." The box beginners forget exists, and where live trading differs most from theory:

EXECUTE: place a LIMIT order at signal price + small buffer

IF order unfilled after 2 minutes: cancel (do NOT chase with market orders)

IF partially filled: keep the partial, cancel the rest

Real markets have spreads, partial fills, and moments of thin liquidity. Execution rules are your manners in that reality — and sloppy execution quietly eats more retail algo profit than bad signals do (Chapter 5 will put numbers on this).

Box 5 — THE KILL-SWITCH: "When does everything stop?" The box that separates systems built by survivors from systems built by optimists:

KILL: if today's total loss reaches 2% of capital → close everything, stop for the day

KILL: if orders are being rejected or filled at absurd prices → stop, alert me

KILL: if the system tries to place more than N orders per minute → stop (runaway-bug guard)

Chapter 6 tells the story of a firm that lost hundreds of millions in under an hour to a software bug. Their algorithms had brilliant Boxes 1–4. Box 5 is written in their memory. Write Box 5 first. Seriously — before the signal, before anything. The strategy can be mediocre and you'll live; the kill-switch can't be missing.

Put the boxes together and read your complete Robot Shopkeeper top to bottom — signal, filter, size, execute, kill. Perhaps fifteen lines of pseudocode. It is a genuine, complete, runnable trading system, and — this is the point — it is structurally identical to what runs inside institutional engines. Their Box 1 might hold a hundred inputs; their Box 4 might slice orders over hours. But the anatomy is the anatomy. From today, every strategy you encounter — in a book, a video, a sales pitch — you can dissect with one question per box: what's your signal, your filter, your sizing, your execution, your kill-switch? Watch how many pitches collapse at question three.

One last connection, because you may have felt it coming: boxes 1–3 are exactly what the Playbooks school called a playbook — a named situation and a pre-decided response. An algorithm is a playbook that grew precise enough to leave home and live on a server. Everything this Academy has taught you about defining setups was secretly algorithmic training. Now it's official.

Every algorithm on Earth: five boxes. Complexity only changes what's written inside them.
Figure 3 — Every algorithm on Earth: five boxes. Complexity only changes what's written inside them.

🇮🇳 The India Angle

  • India's broker APIs map cleanly onto Boxes 4–5: they provide order placement, modification and position queries — while YOU must supply execution logic and kill rules. The API is plumbing, never a strategy.
  • Indian market microstructure makes Box 4 non-optional: circuit limits on individual stocks, expiry-day option liquidity, and the volatile open all punish naive market orders (the freak-order episodes on thin option strikes are Box 4 failures, live).
  • Under India's evolving retail-algo framework, your deployed strategy operates under broker/exchange oversight — one more reason the five-box discipline (especially documented kill rules) is not just good practice but increasingly the expected standard.

Key Takeaway

Every algorithm is five boxes — Signal (something happened), Filter (should we act?), Sizing (how much?), Execution (handle reality), Kill-switch (when does it all stop?). The filter usually holds more edge than the signal, sizing decides survival, execution quietly eats profits, and the kill-switch gets written FIRST. An algo is just a playbook precise enough to live on a server.

Think About It

Take any strategy you've ever been pitched — a course, a video, a friend's 'system'. Ask it the five questions. Which boxes were completely missing? And what does it tell you that the missing ones are almost always Sizing, Execution and Kill?

Algo Lab — Build Your Robot Shopkeeper

Take Chapter 1's recipe (or start fresh with any simple idea) and write it as five labelled boxes, pseudocode only:

SIGNAL: one precise, checkable condition. FILTER: at least two context rules. SIZING: a fixed-risk formula. EXECUTION: order type + unfilled/partial rules. KILL-SWITCH: daily loss cap + one runaway guard.

Rules of the lab: no adjectives anywhere ('strong', 'looks good' = banned); every line must be checkable by a stranger with a price feed.

Then the stress test: hand it to someone (or read it as someone else) and ask — could they run this WITHOUT asking you a single question?

When the answer is yes, you own a complete system on one page. Chapter 5 will try to break it. That's its job.