Trading bots can sound like something clever that understands markets. They're much simpler than that. By the end of this lesson, you'll know the four jobs every bot does, and what it can't know unless someone tells it. And you'll see why the biggest danger is a bot that's wrong about its own position.
1 of 9
What you'll learn
- Follow the bot's loop. It reads, checks, acts and records, over and over.
- List what it can't know. News times or your daily loss limit need writing in.
- Check where it runs. It can be your computer, a rented server or a platform's.
- Match its record to the broker's. A wrong record can leave a trade nobody manages.
- Look past the AI label. An AI bot runs the same loop and can still lose.
Exercise
- Write the four jobs of a Software that places trades by following rules written in advance: it reads prices, checks the rules and sends orders to a broker when they’re met.More in the glossary: read, check, act, record.
- Under “check”, list five things a bot running your rules wouldn't know unless they were written in, such as news times or your The most an account is allowed to lose in one trading day. It starts fresh each day, and each firm sets how it’s measured.More in the glossary.
Quick check
1. A bot's data feed freezes. What does the bot see?
2. Which is the real record of what an account holds?
3. A bot is sold as “AI”. What stays the same?
0 of 3 answered.
Finished this lesson?
Tick it off and keep your place
Read the full notes
A trading bot is a program that runs a loop: read prices, check the rules, act by sending orders, and record what happened. It knows nothing you didn't tell it, and its biggest danger is a record of its own position that doesn't match the broker's.
- A Software that places trades by following rules written in advance: it reads prices, checks the rules and sends orders to a broker when they’re met.More in the glossary runs a loop: read prices from a The stream of prices that fills your charts. The prices start at the exchange, and live ones often cost a monthly fee.More in the glossary, check the rules, act (send, change or cancel orders through the A firm that holds your trading account, passes your orders to the market and reports your trades back.More in the glossary's Short for application programming interface: a door into a system built for software. A bot uses a broker’s API to get prices and place orders.More in the glossary), record it in a A time-stamped record a program writes as it runs: what it saw, what it decided, what it sent and any errors.More in the glossary.
- It knows nothing it wasn't told: news times, Prices that have stopped updating, often because a data connection has frozen, so the last price shown is out of date.More in the glossary (prices that have stopped updating), your The most an account is allowed to lose in one trading day. It starts fresh each day, and each firm sets how it’s measured.More in the glossary or an account's rules (Rules on automation and copy trading), or that its rules have stopped fitting the market (Knowing when a strategy has stopped fitting).
- Where it runs: your own computer; a A computer in a data centre that you rent and control over the internet, so a program can run there instead of at home.More in the glossary in a data centre; or a platform's or broker's computers, under their rules. More: How a trading bot connects to a broker.
- The bot's record of its What you hold between opening a trade and closing it: how many contracts or shares, and whether you bought or sold first.More in the glossary can differ from the broker's, for example after a rejected order. Checking one against the other is Comparing the position a program thinks it holds with the position the broker shows, to find any difference.More in the glossary.
- Made-up: the bot thinks it's Holding no position in a market: no contracts bought or sold that are still open.More in the glossary; the account is long 2 A small futures contract on the S&P 500, traded at CME Group. Each point is worth $5, and its smallest step of 0.25 is worth $1.25.More in the glossary from 5,040 with no stop. A fall to 5,020: 20 × $5 × 2 = −$200.
- “AI” inside doesn't change the loop, and it can still lose. See “AI trading bot” scams. Answer to the drill: 15 × $5 × 3 = $225.
Worked example
Made-up numbersThe cost of a wrong record
Made-up numbers · Micro S&P 500 · $5 a point
- The bot thinks it’s flat. The broker shows long 2 from 5,040, with no stop.
- Price falls to 5,020: 20 points.
- 20 × $5 × 2 = $200.
A loss of $200 on a trade nobody was managing.
Your turn
DrillMade-up numbers · Micro S&P 500 · $5 a point · long 3 contracts the bot thinks are closed · price falls 15 points
Trading is risky. You can lose money, and automated trading can lose like any other trading. This lesson explains how things work. It isn’t advice.