Episode 1 · AI Trading · Building a Complete Trading System

AI agents for traders: what to delegate and what to keep

An AI agent can write code, read reports and do the arithmetic. It cannot see the next candle. One rule and a four-level ladder for what to hand over.

“AI trading” gets used for three very different tools. Mixing them up is how people end up asking a chatbot whether gold goes up next week, and then trading on the answer.

Three tools, three jobs

Tool What it does What it cannot do What you check
AI chat Explains concepts, describes a chart or table you give it, does arithmetic with the working shown Read files on your machine; know the live price without a lookup tool Every number against the data you gave it
AI agent A language model with tools: reads and writes files in a project folder, runs commands, pulls data through connectors, works in several steps Know future prices; take responsibility for your account Every file change, every command it asks to run, the test results
Bot / EA Runs fixed rules inside the trading platform and can send orders Notice that its rules are wrong or that the market has changed The rules, the risk limits, the order log on a demo account

An agent can help you write an EA, but the two are different things. An EA does exactly what its code says, including when the code is wrong.

An agent works in a loop: read the request, read the context, plan, call a tool, read the result, then take the next step or come back to you. A chat assistant is an adviser on the phone; an agent is an assistant you handed the office keys to. That is why the permission mode matters: start every session in the mode that asks before each file edit or command, and loosen it only once you know what the agent does.

The rule: delegate only what you can check

Code can be run. A cited source can be opened. A lot size can be recalculated. “Will price be higher next week?” cannot be checked until it is too late.

Before a task goes to an agent, it has to pass four gates:

  1. Can the result be verified?
  2. How would you notice a mistake, and what would it cost?
  3. Does it need no password, 2FA code or trading API key?
  4. Does it place no order on a real account?
Task Delegate? How to check it
Writing Pine Script, MQL5 or Python Yes Run it on sample data. Nothing is connected to an account yet
Reading a backtest report for weak spots Yes Each remark must point to a specific trade or line
Summarising news and the economic calendar Yes, with sources Check the times against the calendar. A time-zone slip can put you in a trade right before a release
Lot size Yes, with the working shown Recalculate it yourself and round down
Journaling and checking plan compliance Yes Spot-check entries against your trades
Price direction, “pick a trade for me” No It cannot be checked in advance
Passwords, 2FA codes, keys with trade or withdrawal rights Never —
Orders on a real account No Out of scope: practise on demo

A lot-size example, on a contract where 1 lot = 1 BTC: risking 10 USD with a stop 700 USD away gives 10 ÷ 700 = 0.0142, rounded down to 0.01 lot. Risking 5 USD gives 0.0071, below the 0.01 minimum, so there is no trade.

Hallucinations do not go away. Letting the model say “I don’t know” and asking for sources reduce them, never to zero. The decision stays yours.

A four-level autonomy ladder

Level The agent may Required guardrails Example
0: Q&A Answer in chat from data you paste You check every number Describe a chart, explain a term
1: Read and write Read and write files in a project folder, run commands when allowed Ask-first permission mode; no folder that holds credentials; the trading account read-only at most (MT5 investor password) A lot-size script, an end-of-day report
2: Propose, human approves Output order proposals as JSON Code checks the risk limits; you approve each one and place it on demo yourself Proposing a demo order when a written rule triggers
3: Automatic on demo Send orders through a code-controlled layer Allowed symbol list, lot cap, mandatory stop-loss, daily loss cap, a tested kill switch Running a tested rule on demo

Real money is beyond the ladder.

Write the conditions for moving up a level before you start: a minimum number of decisions, behaviour that matches the rules, no open technical incidents. “It has been profitable” is not a reason to move up.

Four rules hold at every level:

  1. Any connection that can send orders points at a demo account.
  2. API keys are read-only: no trading, no withdrawal.
  3. Passwords, 2FA codes and keys never go into a chat.
  4. A human approves before any order. At level 3, you approve the rule set and the limits before switching it on.

Guardrails belong in code and account permissions, not in a prompt that says “be careful”: give the agent the fewest tools, the narrowest permissions, and human approval for high-impact actions.

Be wary of “the AI bot that makes money every month”

AI cannot predict the future or sudden market moves, and a promise of high or guaranteed returns is a sign of fraud. Mirror Trading International marketed a “proprietary trading bot” and took over 1.7 billion USD in bitcoin from at least 23,000 people. Its hooks: “no trading experience needed”, referral bonuses, and fake balances shown in MetaTrader demo accounts.

Automation can fail expensively even without fraud. On 1 August 2012 Knight Capital’s order router malfunctioned and sent more than 4 million orders in 45 minutes while trying to fill 212 customer orders. The loss was over 460 million USD.

The pitch What to do
“The AI reads the market before it moves” Ask for evidence you can check
“Send your password or API key and the bot trades for you” Don’t
“Bonus for referring friends”, “today only” Referrals and urgency are reasons to walk away

A result is worth looking at only when it can be verified: rules fixed in advance, costs included, tested out of sample, then run on demo.

Try it: level 0 on a historical chart

  1. Open a replay or historical chart (for example XAUUSD H1) with the dates hidden, and stop at a random point.
  2. Take a screenshot with the price axis visible and send it to an AI chat with the prompt below.
  3. Read the answer: a description and two conditional scenarios, no forecast.
  4. Write your own plan (enter on demo or stay out, and why) before revealing anything.
  5. Reveal the next 12 candles. Grade the process, not the profit.
You describe charts. Do not predict price, do not suggest buying or selling,
do not size positions. Use only what is in the image.

1. List the price levels you can read (nearest high, nearest low, last close).
   Mark them as estimates; write UNCLEAR where you cannot read them.
2. Describe the structure in 3-5 sentences.
3. Give exactly 2 scenarios that can be checked within the next 12 candles.
   For each: the confirmation condition, the invalidation level, open questions.
4. End with: "This is a description, not investment advice. The trader decides."

No probabilities, no dates, no events after your training cutoff, no outside data.

If the model still gives a direction or a probability, ask it to remove it. If it names a date or describes later events, ignore that and log it as a hallucination.

Key takeaways

  • Delegate only what you can check.
  • Level 0 is Q&A, level 1 reads and writes files, level 2 proposes orders a human approves, level 3 trades automatically on demo behind a kill switch.
  • Guardrails live in code and account permissions, not in prompt wording.
  • Pick the ask-first permission mode before the first message of every session.

Comments