Skip to content
Wildflower
Join free
Automated trading and AI

Free Trading School · Level 7 · Course 7.11

Kill switches and limits

Lesson 7 of 19 in Automated trading and AIModule 2: What can go wrong

Advanced · Automated trading and AI

Kill switches and limits

Wildflower Trading School · Lesson 7.11.2.3

Wildflower

The last lesson showed how fast things go wrong. This one is about what stops them. By the end of this lesson, you'll know what a kill switch does, and the caps people put on automated trading. And you'll see why the best caps sit outside the program they're checking.

1 of 8

What you'll learn

  • Set up a kill switch. It stops new orders, cancels working ones and can close trades.
  • Test it on practice. Write down what it does, then try it on a practice account.
  • Check caps before every order. Limit size, order count, daily loss and hours.
  • Put some caps outside the program. Caps inside it share its bugs.
  • Stop on warning signs. Watch for stale prices, records that differ or many errors.

Exercise

Write a one-page safety sheet for an automated strategy on a practice account: what its does (stop, cancel, flatten), its caps on size, orders, and hours, and which ones sit outside the program.

Next: Watching an automated strategy.

Quick check

  1. 1. Which of these is a kill switch's job?

  2. 2. Why put some caps outside the program?

  3. 3. A program sees no new price for a long time in a busy market. What might that mean?

0 of 3 answered.

Finished this lesson?

Tick it off and keep your place

Make a free account and we'll remember where you are, so “Watching an automated strategy” is waiting next time.

Read the full notes

A kill switch stops automated trading at once: it blocks new orders, cancels working ones and can flatten positions. Caps checked before every order limit size, order count, daily loss and trading hours, and caps that sit outside the program still work when the program has a bug.

  • A can stop new orders, cancel working ones and flatten open . Decide which yours does, write it down, and test it on a practice account.
  • run before every order: most contracts held, most orders a minute and a day, most loss a day including open losses (Daily loss limits, Daily loss limits in depth), set hours, and the right contract and account.
  • Caps inside the program share its bugs. Caps outside it can't be changed by it: some and platforms let account holders set account limits; ask yours. Broker and exchange checks protect the market, not your plan.
  • Stop when something looks wrong: no new price for too long (); the program's record and the broker's differ (); too many errors or rejections.
  • Made-up: caps of 2 contracts, 6 orders a minute, $300 a day. The runaway stops at 2 contracts; a 4-point fall on the costs 2 × 4 × $5 = $40, not $480. Answer to the drill: $50 left, so a $60 trade is blocked.
  • More: What can go wrong with automated trading.

Worked example

Made-up numbers

The runaway, with caps

Made-up caps · 2 contracts · 6 orders a minute · $300 a day · Micro S&P 500, $5 a point

  1. Orders 1 and 2 go through: 2 contracts.
  2. Order 3 and after: blocked by the size cap.
  3. The order cap trips; the program stops and alerts a person.
  4. A 4-point fall: 2 × 4 × $5 = $40.

$40 instead of $480. The bug still needs fixing; the caps kept it small.

Your turn

Drill

Made-up numbers · daily loss cap $250 · today’s trades so far: −$90 and −$110 · the next trade risks $60

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.