What is algorithmic trading?
In one line: Algorithmic trading is when a computer program places trades automatically by following a set of written rules, such as price, time or volume conditions.
The short answer
An algorithm is a list of steps. In trading, it's a set of rules a computer follows to buy and sell.
"If this happens, do that." The computer never gets tired, bored or nervous. It also never thinks for itself.
A simple example
Here's a rule written in plain words:
- If a 1-hour candle body closes above yesterday's high, buy.
- Put the stop 20 pips below the entry.
- Put the target 40 pips above the entry.
- Risk 1% of the account on each trade.
A program can watch the chart and do all four steps the moment the rule is met. In units of risk, a win here is +2 and a loss is −1. A math example, not a promise. Rules like this lose often, and the program will take every loss too.
Who uses it
- Big funds split huge orders into small pieces, so they don't move the price on themselves.
- Market makers quote buy and sell prices all day. Many use speed-focused algos, see High-frequency trading.
- Individual traders write simple rules in tools like TradingView's Pine Script. Our Pine Script for beginners guide shows the first steps.
Why it matters
Writing rules down so clearly that a computer could follow them is useful even if you never automate. It forces you to define your entry, stop, target and size. That's a trading plan.
You can also test rules on past data, called Backtesting. That shows how a rule would have behaved.
A common mistake
Trusting a great-looking backtest. It's easy to tweak a rule until it fits the past perfectly. That's called overfitting. The rule then fails on new data. Past results are hypothetical and don't guarantee anything. Our strategy backtest guide covers how this goes wrong.
The other trap: buying a "bot" that promises returns. Regulators like the CFTC warn that no algorithm or AI can guarantee profits. See can AI predict the stock market?
Questions
Is algorithmic trading legal?
Yes. It's widely used by funds, banks and individuals. Fraud and market manipulation are illegal whether a person or a program does them.
Do I need to code to do algorithmic trading?
To build your own, usually yes, though some platforms have simpler rule builders. Pine Script on TradingView is a common first language.
Is algorithmic trading the same as AI trading?
Not quite. Most algos follow fixed rules a person wrote. AI tools may try to learn patterns from data, which brings its own risks.
Want the next step? We'll walk you through it.
Four free lessons by email, one every few days — each with a 10-minute exercise on a real chart.
Send Me the Free Lessons 4 short emails · No spam · Unsubscribe anytimeOr see the whole method, step by step:
See What’s Inside the Course Try everything free first. Decide when you're ready. · Open the free chart tool (works in the TradingView phone app)One chart idea a day, in plain English. Follow along: