Testing & Technology · 10 min
Algorithmic Trading
Key Points
- Algorithmic trading means a written set of rules executed by software — the computer places the trades, but a human wrote the logic.
- Its real advantages are discipline and speed: no hesitation, no revenge trading, and the same rule applied every time.
- Every algorithm must be backtested on history and forward tested on demo before it touches real money.
- The biggest risks are overfitting, technical failure and changing markets — a system that worked last year can stop working without warning.
- An algorithm does not remove risk. It automates your decisions, including your mistakes, at machine speed.
Algorithmic trading sounds like the future arriving in your trading account: a program that watches the market day and night, follows your rules perfectly, and never gets tired, greedy or afraid. Some of that promise is real. The discipline of a machine is genuinely better than the discipline of a tired human at midnight. But most of what is sold under the name 'algorithmic trading' is something else — a black box, a rented robot, a backtest dressed up as a guarantee. This article explains what algorithmic trading actually is, what it can and cannot do for a retail trader, and the honest path from a written rule to a running system.
What an algorithm really is
An algorithm is simply a trading rule written precisely enough for a computer to follow: if the price closes above the 20-day high and the trend filter agrees, buy; place the stop forty pips below; close at the target or the trailing rule. That is all. The famous Expert Advisors (EAs) that run on trading platforms are nothing more than such rules, coded up. The important consequence is that an algorithm can only be as good as the rule inside it. A vague idea — 'buy when it looks strong' — cannot be automated at all, because a computer cannot see 'looks strong'. The first step of algorithmic trading is therefore not programming; it is writing your rule so precisely that a stranger could trade it by hand. If you cannot do that, no software will save you.
What automation genuinely gives you
Automation gives you three honest advantages. First, consistency: the rule is applied the same way on the hundredth trade as on the first, with no fatigue and no mood. Second, speed and coverage: a program can watch many pairs and many timeframes at once, and it can act in the second a condition appears — useful for strategies that need fast entries. Third, testability: because the rule is written down, it can be backtested on years of history and forward tested on a demo account, producing numbers — expectancy, drawdown, win rate — instead of feelings. These are real advantages, and professional firms use them at enormous scale. But notice what is missing from the list: the algorithm does not know more than the rule. It cannot sense a news event, cannot judge a changing market, and cannot rescue a bad idea by executing it flawlessly.
The honest path: from rule to robot
The path we teach is the same as the backtesting path, with one extra step. Write the rule in plain language, then backtest it by hand on at least a hundred trades, charging real spreads and slippage, and split the history so the rule is tuned on one half and checked on the other half it never saw. Only a rule that survives that honest test earns automation. Then code it — or have it coded — in the smallest possible form, and run it on a demo account for weeks, watching every trade it takes and comparing its behaviour with the hand test. Only then, at micro size, consider live money. And even then, keep the kill switch in your hand: a daily loss limit, a maximum drawdown that turns the system off, and a rule that you review its trades every week. An algorithm left alone is not a passive income machine; it is an unattended machine.
The risks nobody advertises
Overfitting is the first risk: a rule tuned until its backtest looks beautiful has usually memorised the past rather than understood the market, and it fails on live data — the exact trap the Backtesting article describes. Technical failure is the second: internet drops, platform restarts, a power cut in the middle of a trade, and the program that was supposed to manage your stop is simply gone. Changing markets are the third: a trend system built in a trending year can lose steadily in a ranging year, and the algorithm will keep losing with perfect discipline, because discipline is not judgement. And the fourth risk is the market for robots itself: anyone selling a system with guaranteed returns, a perfect equity curve, or 'only a few copies left' is selling the oldest scam in trading. A genuine edge is never sold that way.
Common mistakes
- Buying a black-box robot: if you cannot explain the rule inside it, you cannot know when it has stopped working — and you will discover it from your balance.
- Trusting a backtest with no costs: a system that wins before spreads and slippage often loses after them.
- Running it live on day one: skipping the demo stage turns your account into the test.
- Leaving it unattended for months: markets change, and an algorithm needs a human owner who reviews it weekly.
Practical application
Before you spend a rupee on any robot, do this: take one simple rule from our Strategies library — for example the Moving Average Crossover — write it in the stranger test format from the Backtesting article, and test it by hand for fifty trades. That exercise teaches you what an algorithm actually is: a written rule, tested honestly. If you still want automation after that, you will know exactly what to automate, and you will never again be impressed by a seller who cannot show you the rule.