All guides
Fundamentals8 min readUpdated

What is algorithmic trading?

A plain-English explanation of algorithmic trading — what a trading algorithm actually is, how orders reach the exchange, and what separates a strategy that works on paper from one that survives live markets.

Algorithmic trading is the practice of letting software decide when to buy and sell, according to rules you defined in advance. That is the whole idea. There is no intelligence implied by the word 'algorithm' here — it simply means a fixed set of instructions that runs the same way every time, without the hesitation, boredom, or fear that affects a human watching the same screen for six hours.

The confusion usually starts because the term covers wildly different things. A hedge fund co-locating servers next to the NSE matching engine to shave microseconds off execution is doing algorithmic trading. So is a retail trader running a Python script that checks a moving average once every five minutes and places one order a day. The mechanics are the same; only the scale and the cost differ.

What a trading algorithm actually contains

Strip away the marketing and almost every trading system is four components wired together. If any one of them is weak, the other three do not matter.

  • A data feed — prices arriving from the exchange or your broker, either as periodic snapshots or a live tick stream.
  • A signal rule — the condition that defines an opportunity, for example 'price closed above the 20-period average and volume is above its own average'.
  • Risk and sizing rules — how much to buy, where the stop sits, how much total exposure is allowed at once. This is the part beginners skip and professionals obsess over.
  • An execution layer — the code that turns a decision into an actual order at the broker, then confirms it filled, handles rejections, and knows what to do when the network drops mid-order.

Beginners spend nearly all their effort on the signal rule, because it is the interesting part. In production, the signal is usually the smallest and most stable piece of code in the system. The execution layer — the boring one — is where the bugs live and where money is quietly lost.

How an order actually reaches the exchange

For a retail trader in India, the path is more layered than it first appears. Your script does not talk to the NSE. It talks to your broker, and the broker talks to the exchange:

  • Your code receives a price update over the broker's WebSocket feed, or requests a candle over REST.
  • Your logic evaluates and decides to enter a position.
  • Your code calls the broker's order-placement API over HTTPS, authenticated with an access token.
  • The broker performs its own risk checks — margin, position limits, whether the instrument is allowed — and forwards the order to the exchange.
  • The exchange matches it, and the fill travels back along the same chain as a confirmation, usually on a separate order-update stream.

Every hop in that chain can fail independently, and this is the single most underestimated fact in retail algo trading. The order can be accepted by the broker and rejected by the exchange. The confirmation can be delayed past the point where your logic has already moved on. Your token can expire mid-session. A system that assumes the happy path will eventually place a duplicate order, or think it is flat when it is holding a position.

Why 'it worked in backtest' means less than it sounds

A backtest replays historical prices through your rules and reports what would have happened. It is a necessary tool and a deeply misleading one, because the historical market does not react to you and never refuses your order. Live markets do both.

The gap between a backtest and reality usually comes from a handful of specific, fixable omissions — slippage, costs, and the assumption of a fill at the printed price. Those are covered in detail in the backtesting article, and they routinely turn an apparently profitable strategy into a losing one.

What automation genuinely gives you

Automation does not find profitable strategies. If your rules have no edge, running them faster only loses money more efficiently. What automation reliably provides is narrower and more valuable than most people expect:

  • Consistency — the system takes the twelfth trade of a losing week exactly as it took the first. Most discretionary traders cannot.
  • Speed — a rule that requires acting within seconds of a signal is simply not executable by hand across multiple instruments.
  • Coverage — one process can watch two hundred symbols at once; you can watch perhaps four.
  • Measurability — every decision is logged, so when performance degrades you can find out precisely which rule stopped working, rather than guessing.

That last point is the one experienced traders come to value most. A discretionary trader who has a bad quarter has a story about what went wrong. An automated trader has a database.

What it does not protect you from

Automation removes emotion from execution, not from ownership. The hardest moment in running a live system is not building it — it is the drawdown three weeks in, when the equity curve is down and you must decide whether the strategy is broken or simply experiencing the losing streak the backtest already told you to expect. Turning a working system off at the bottom of a normal drawdown is the most common way automated traders lose money.

What we build

Continue reading

Want a system built around your strategy?

We build and run trading automation in production. Tell us your rules and we will automate, test, and run them.

Start a Conversation