Home › Guides › Algorithmic Trading

WHY BOTS FAILFREENO ACCOUNTAUTOMATED TRADE BOTSAlgorithmic TradingThe arithmetic of how bots failEDUCATION ONLY | NO SIGNALSEXAMPLE NUMBERS ARE LABELLEDAUTOMATED TRADE BOTSautomatedtradebots.com
A free page on algorithmic trading. Education only, with example numbers labelled.
WHY BOTS FAIL

Algorithmic Trading

Short answer

Algorithmic trading means a computer places orders by rules written in advance: when to enter, how much to risk, when to exit. A trading bot is the same thing with a friendlier name.

Trading by written rules that a computer follows. The idea is simple, and the arithmetic of costs and testing decides whether it works.

The page explains the idea in plain words, works through the arithmetic with a table, and shows how it hits grid, martingale and DCA bots, then tells you what to check before you run one.

  • A worked example with real arithmetic
  • How it hits grid, martingale and DCA bots
  • How to check for it before you run a bot
  • No advice, no signals, no profit promises

Last reviewed 28 October 2026. Education only, not advice.

Free, no account Runs in your browser Worked numbers shown Not advice Examples labelled

Ready to go further

Next: check what the cost of one trade does

The break-even calculator shows the move a trade needs to cover its spread and fees.

Reading time4 minutes
Worked exampleExact arithmetic
Tools linked3 on this page
Reviewed28 Oct 2026

What is included

  • What it is, in plain words
  • The formula or mechanism, with exact arithmetic
  • How it hits grid, martingale and DCA bots
  • A check you can run before you switch a bot on

Who it is for

  • People who run or plan to run a trading bot
  • Anyone reading a backtest or a bot sales page
  • Readers who want the numbers, not the pitch
  • Not advice, and not a signal service
Yearly trading cost as a percent of the position, by trades a day5%1 a daytrades25%5 a daytrades100%20 a daytrades500%100 a daytradesMade-up: 0.02% cost per trade, 250 trading days. Yearly cost = trades a day x 250 x 0.02%. Calculated by us on 28 Oct 2026, exact.
The picture for this page. Example numbers are made up unless the page says they were calculated.

Key facts

  • Algorithmic trading means a computer places orders by rules written in advance: when to enter, how much to risk, when to exit. A trading bot is the same thing with a friendlier name.
  • A rule does not need to be clever. It needs to be exact, so the same inputs always give the same order, and so it can be tested on past prices.
  • Costs decide a lot. In the made-up example below a 12% a year edge turns into -13.0% at 5 trades a day and -88.0% at 20 trades a day, with a cost of 0.02% a trade (calculated by us on 28 Oct 2026, exact).
  • A bot removes emotion at the moment of the trade. It does not remove the risk that the rule was wrong, tested badly or has stopped working.
  • Nothing on this page is a signal. The numbers are made up to show the arithmetic.

What an algorithm is in trading

An algorithm is a list of steps with no gaps. In trading the steps are rules such as: if the price closes above its 50 bar average and the spread is under 2 pips, buy a size that risks 1 percent of the account, and sell if the price falls 20 pips or rises 40. A person could follow the same rules by hand. The computer follows them without tiring, hesitating or changing its mind.

The phrase covers a wide range. A weekly rebalancing script is algorithmic trading. So is a grid bot, a dollar cost averaging bot, a forex expert advisor and a high speed market maker. They differ in speed, in the rule and in the tools, not in the idea. The bot type picker shows which kind fits which goal.

The loop every bot follows

1. Idea: a reason the price might behave a certain way
2. Rules: write it exactly, with entry, size and exit
3. Test: run the rules on past prices with full costs
4. Practise: run it on live prices with no real money
5. Small size: run it with money you can afford to lose
6. Watch: compare live results with the test, and stop it if they part

Most failures come from skipping step 3 or step 4, or from doing step 3 badly. A test that uses information the bot would not have had, a test that tunes the rules to the past, or a test that forgets costs, can look wonderful and fail on the first live day. See backtesting, look-ahead bias and overfitting.

A worked example: speed and costs

Suppose a rule has a gross edge of 12 percent a year on the position size, before costs. Each round trip costs 0.02 percent of the position in spread and fees. The yearly cost is trades a day x 250 days x 0.02 percent. At 1 trade a day it is 5 percent, at 5 trades a day it is 25 percent, at 20 it is 100 percent and at 100 it is 500 percent. On a $10,000 position, 5 trades a day costs $2,500 a year before any edge.

Yearly result after costs of a made-up 12% gross edge7.0%1 a dayafter cost-13.0%5 a dayafter cost-88.0%20 a dayafter cost-488.0%100 a dayafter costThe same gross edge of 12% a year, traded at different speeds. A bar at zero is a loss. Made-up numbers, calculated by us on 28 Oct 2026.
The same edge gives a profit at 1 trade a day and a loss at 20. Speed multiplies the cost, so a fast rule needs a much bigger edge per trade.

That is why a rule that looks good on a chart with no costs can fail when the spread and slippage are added. The break-even calculator shows the move a single trade needs just to pay for itself.

What can go wrong

  • The rule has no edge. Many patterns are noise. A good looking test on a few hundred trades can be luck.
  • The test lied. Look-ahead bias, survivorship bias and perfect fills all make a test too kind.
  • The market changed. A rule that suited a trending market can lose in a range. Check it in several kinds of market.
  • Risk was not capped. A bot with no stop, or one that doubles after a loss, can lose the account in one run. See martingale and max drawdown.
  • The setup broke. A lost connection, a platform update or a wrong lot size can do damage faster than a person would. Plan for it.

How to start without losing money

Write one rule in plain words. Test it with full costs and keep some data back for one final check. Then run it with no real money in paper trading and compare with forward testing results. Only then use a small size. Look at the drawdown, not only the profit. A bot you cannot explain is a bot you cannot fix.

What this page does not tell you

It does not say that algorithmic trading makes money. Most rules do not, after costs. It explains the pieces so you can judge a bot. The numbers are made up and it is education, not financial advice.

FAQ

Frequently Asked Questions

What is algorithmic trading?

Trading by written rules that a computer follows to place orders, covering when to enter, how much to risk and when to exit.

Is algorithmic trading the same as a trading bot?

In practice yes. A trading bot is a program that follows trading rules, and algorithmic trading is the name for the method.

Does algorithmic trading make money?

Some rules do and most do not after costs. The rule needs a real edge, a fair test and costs low enough that the edge survives.

Why do costs matter so much to a bot?

Costs are paid on every trade, so a fast rule pays them many times. A small edge per trade can vanish when multiplied by hundreds of trades.

How should a beginner start?

Write one rule in plain words, test it with full costs, run it with no real money, and only then use a small size.

Are the numbers on this page real?

Example numbers are made up to show how the maths works, and the page says so. A figure only counts as exact when the page says it was calculated on a stated date. Nothing you enter in a calculator leaves your browser.

Can I use this to decide whether to run a bot?

It can show whether a bot's numbers hold together and how much an account can lose. It cannot say what the market will do, and it is not advice. Use it to ask better questions, then read the terms of your own broker or exchange.

Is this financial advice?

No. It is general education about how the method works. The numbers are made up and it does not consider your situation.

Know the Risk Before You Run It

Free calculators and guides, added every week. Leave your details and we will email you when new ones go up.

Trading carries a risk of loss