Navrya
Navrya Academy · Field notesNAV-CNT-016 · Rev A · Trading tools

Navrya · Trading tools

How to Build a Trading Bot with AI, ChatGPT or Claude

You can build a trading bot with AI today: ChatGPT, Claude Code and tools like them write working code for MetaTrader, TradingView or a crypto exchange in days. The code is the easy part. Whether you keep your money depends on the rules you give it, how you test it, and who watches it once it trades. This guide walks through the four paths, building it yourself with AI, ordering it from a freelancer, hiring a company, or setting up an assistant around your own method, which is what Navrya's bespoke app is, with what each one costs and where each one breaks.

Can you build a trading bot with AI?

Yes. An AI coding tool turns rules you can state in plain words into a program that reads prices and places orders. The developers quoted in this guide who state a build time had a first working version in three to six weeks, and two of them had Claude Code write much of it.

None of the four write-ups read for this guide reports a profit. Two report live losses after strong backtests, and two report no trading results at all. So the useful question is not whether AI can write the bot. It is which of four paths fits your money, your time, and how much of your trading you want to hand to a program.

The four paths at a glance. The money and time are the figures stated by the sources named further down; each path has its own section.
PathFits you ifMoneyFirst versionWho places orders
1. Yourself, with ChatGPT or Claude CodeYou can write every rule and will test patientlyAn AI plan from $20 a month, plus a server, data and fees3 to 6 weeks in the write-upsThe bot
2. A freelancerYour strategy is rule-based and runs on one platformPriced per job; on MQL5 Freelance the payment is held until you accept the workDays to weeksThe bot
3. A software companyYou are building a product, a fund or several strategies$3,000 to $150,000+ in two companies' published rangesAbout 4 weeks for a mid-sized strategy at one of themThe bot
4. An assistant around your methodYou want your method applied every day, and you press the button$1,000 for Navrya's bespoke app, with 12 months of PRO MAX3 to 7 days after the interviewYou

Bot, expert advisor, indicator or assistant: which do you need?

These words are used loosely, and they buy different things. The difference that matters most is who presses the button.

Two rows of icons. In the top row a chart feeds a robot head, and a thick blue arrow runs from the robot straight to an exchange building. In the bottom row a chart feeds a lens, the lens rings a bell, a person stands after the bell, and a dashed arrow runs from the person to the exchange.
FIG. 1A bot sends the order itself; an assistant reads and warns, and the order stays with you.
Trading bot
A program that watches prices and places orders by itself, through an exchange's or broker's API, following rules written in code.
Expert advisor (EA)
MetaTrader's name for a trading bot: a program in MQL4 or MQL5 that runs in the MetaTrader terminal and opens and closes positions on the account it is attached to.
Indicator or script
Code that calculates or draws on the chart, such as a Pine Script indicator on TradingView. It shows you something; it trades only if it is written as a strategy and wired to orders.
Alert and webhook
An alert is a message sent when a condition is met. A webhook sends that alert to a web address another program listens to, which is how a TradingView alert can start a bot. TradingView sends webhook alerts only from accounts with two-factor authentication turned on.
AI trading assistant
Software that reads charts and data with an AI model, explains what it sees against your method, warns you and keeps the record. You decide, and you place the order.

Answer these four questions before you pick a path:

  • Can you write every entry, exit, stop and position size as an if-then rule? If not, a bot cannot trade your method; it will trade whatever the code says.
  • Would you let the program trade while you sleep? If not, what you want is alerts, not orders.
  • Can you check it every day and switch it off when the market changes? A bot needs a minder.
  • Can you afford to lose the money it trades while its bugs are found? Two of the four developers below caught serious bugs only in a dry run or a shadow test.

Path 1: how do you build a trading bot with ChatGPT or Claude Code?

This is the path most people search for, and for the code it works. Follow the order the developers who took it describe, because it keeps the most money in your account while you learn.

  1. 01

    Write the strategy as rules before you open the AI: the market and timeframe, the exact entry, the stop, the exit, the position size, and when not to trade, such as around news or when the spread widens. Where a rule needs your judgement, write down what you look at.

  2. 02

    Pick where it will run. TradingView's Pine Script is the quickest way to see a strategy on a chart and test it. MetaTrader runs expert advisors written in MQL5 on a broker account. Python with an exchange's API, for example through the ccxt library, runs crypto bots on a server.

  3. 03

    Give the AI a written brief, not a chat. Claude Code reads a file called CLAUDE.md in the project; put your rules, risk limits, symbols and timeframes in it. One developer who built a crypto system with Claude Code in three weeks writes: “CLAUDE.md is your best investment.”

  4. 04

    Ask for one small piece at a time: the price feed, the signal, the sizing, the order, the log. Read each piece, and ask the AI to explain it back to you line by line.

  5. 05

    Backtest with fees, spread and slippage switched on, on a stretch of data you did not use to tune the rules.

  6. 06

    Run it on paper or on a demo account. One developer below set the bar at two weeks and at least 20 trades before risking money again.

  7. 07

    Go live with the smallest size the market allows, and with a kill switch: a loss in a day, a week and a month at which the bot stops itself.

  8. 08

    Log every trade the bot takes in your journal, with the reason it gave and what the backtest expected.

What it costs. Claude Code comes with Claude's Pro plan, $20 a month billed monthly or $17 a month billed yearly, and with the Max plan at $100 and the Ultra plan at $200 a month; the free plan does not include it. ChatGPT's plans include OpenAI's coding agent, Codex, with more use on the higher plans. Check both pricing pages on the day, because plans change. Then add a server if the bot runs around the clock, market data if your platform does not supply it, and the exchange's fee on every trade.

Heavy use costs more than the plan. Chudi Nnorukam, whose Polymarket bot built with Claude Code grew to 36,096 lines of code, writes of having “wasted $340 in one month” on Claude usage before changing the workflow, and lists an ongoing API cost of $136 a month.

Why does a bot that wins in the backtest lose money live?

Because a backtest answers a narrower question than it seems to. It tells you how fixed rules would have done on one stretch of past prices, with the fills you assumed. Live trading changes the stretch, the fills, and sometimes the rules themselves, through bugs.

A price chart split by a vertical line with a flag on it. Left of the line, a dashed blue equity curve climbs. Right of the line, a solid red curve starts at the same level and steps down, with five small red crosses marking losing trades.
FIG. 2A backtest is one stretch of the past; the first live trades are where its assumptions meet real fills.

A developer who writes as maymay5692 on DEV Community built a Python bot for BTC/USDT on the MEXC exchange. Over 37 months, the backtest of an EMA crossover (12/26) showed a 491% return with a 34% maximum drawdown. Live, the first five trades all closed at a loss, between 0.43% and 0.62% each, and the $33 account fell to about $21 at one point. The author's summary: “the backtest is not the strategy.”

Gilbran Laureano built a crypto momentum bot in three weeks. Six months of backtest showed a 52% win rate with a reward-to-risk of 1.8. With $500 live it lost $80 in one day, 16%, winning 2 of its 6 trades, and was taken offline. The post's lesson: “Backtests are hypothesis generators, not proof.”

The causes repeat from one story to the next:

  • Overfitting: rules tuned until they fit the past, which then fit nothing else.
  • A different market: a trend rule tested in a trend meets a range. maymay5692 names a ranging market and a missing trend filter as the cause.
  • Costs left out: fees, spread and slippage turn a thin edge into a loss.
  • Look-ahead: the test used a price the bot could not have known at that moment, such as a candle's close before the candle closed.
  • Bugs: maymay5692 found a rounding error in position sizing during a dry run that would have cost about 8% per trade; Chudi Nnorukam's shadow tests caught 8 silent bugs before any reached live money.

Path 2: should you order your bot from a freelancer?

If your strategy is rule-based and lives on one platform, a developer who writes bots every week can build it faster than you can learn to. The risk moves from bugs you write to a brief you did not write clearly enough.

For MetaTrader, MetaQuotes runs its own marketplace, MQL5 Freelance. Its rules lock the agreed payment when the work begins and release it to the developer only when you accept the work, or when the acceptance period runs out. The service keeps a 10% commission, and a dispute goes to arbitration, which can pay the developer in full, return 90% to you, or split the amount in half.

Prices are set per job. They rise with the number of rules, platforms and data sources, and with how much testing you ask for. Send the same written brief to two or three developers and compare the quotes.

Before you pay, make sure the order says:

  1. 01

    Your written brief: every rule, the risk limits, the symbols and timeframes, and what the bot must never do.

  2. 02

    Delivery of the full source code, not only a compiled file, so another developer can fix it later.

  3. 03

    A backtest report with fees and spread, and the exact settings used.

  4. 04

    How many rounds of changes are included, and for how long bugs are fixed after delivery.

  5. 05

    A demo account for the developer. Your live exchange or broker keys stay with you.

  6. 06

    Payment in stages, or through a service that holds it until you accept the work.

Path 3: when does a software company make sense?

When you are building a product rather than a tool for yourself: several strategies, several markets, users, a dashboard, compliance. The ranges that development companies publish show the scale.

Ranges published by two development companies that sell this work: their own figures, not quotes. QuantScripts, February 2026; Biz4Group, June 2025.
CompanyWhat is builtRange
QuantScriptsOne defined strategy on one platform, with standard data$3,000 to $5,000
QuantScriptsMulti-timeframe logic, custom indicators or portfolio rules$7,000 to $12,000
QuantScriptsMulti-asset or multi-strategy, custom execution, machine learning$15,000 to $25,000+
Biz4GroupBasic rule-based bot with a broker API$20,000 to $35,000
Biz4GroupMachine-learning bot$40,000 to $75,000
Biz4GroupEnterprise AI trading bot$80,000 to $150,000+

QuantScripts gives one worked example: a mean-reversion strategy for NinjaTrader on the ES and NQ futures, with custom entries, dynamic sizing, time filters and trailing stops, at $7,000 to $9,000 and about four weeks from kickoff to live, one of them on a simulator. It also advises budgeting 10% to 15% of the build cost each year for maintenance.

For one trader, this path usually buys more engineering than the strategy has evidence for. Prove the rules on paper first; the code can always be rebuilt.

Path 4: what if you want an assistant, not a bot?

Many traders who search for a bot want something narrower: the chart read the way they read it, a warning when price reaches their level, the plan written before the session, and the journal kept. None of that needs a program that places orders. It needs software that knows your method.

Navrya is an AI trading journal and analysis workspace: you log your trades, read charts in analysis sessions of up to four charts, and its AI reviews each trade against your own plan and strategy. It gives no signals, predicts no price and connects to no broker. Its bespoke app is Navrya set up around one trader's method, after an interview and a build of 3 to 7 days. What goes into it:

  • Your analysis profile: your method, chosen from 54 analysis lenses or described in your own words, with your stages, entry threshold, focus areas and your own chart examples, taught once from your notes, links or PDFs.
  • Your sessions and scenarios: every chart on one session timeline, each scenario with its trigger and invalidation price, and the AI's analysis drawn on Navrya's own chart.
  • Your timeframes read together: the ones your method uses, in one entry.
  • Agents on your hours: a pre-market clerk, a price guard on your levels, a news desk, a session clerk and a trade companion, each with a written instruction, an engine and a daily cap, reading your chart as often as every 15 minutes inside your market's hours.
  • Briefs on Telegram: what each agent sends, when, and in which language.
  • Your journal: each trade reviewed by the AI against your plan, next to an emotion log, a tilt meter, a cooldown and a discipline score.
  • Your own dashboard panels, built in Panel Studio.

The agents read, alert and report; they never place trades, and Navrya connects to no broker or exchange.

The price is $1,000 in two payments: $500 after a free 5-minute consult, to start the build, and $500 at handover, in your own account. The app is designed and built in 3 to 7 days after the interview. It includes 12 months of the PRO MAX plan, $100 of AI credit, a month of 24-hour support, and three months in which any feature you ask for is built into your app. If you change your mind, $400 of the deposit is returned.

It is the wrong path if you want orders placed for you. It fits if what you wanted was your own method applied to every chart, every day, with you still pressing the button.

How do the four paths compare?

Four numbered cards side by side. Each has an icon at the top: a chat bubble with code brackets, a person with a wrench, an office building, and a lens with a bell. Under each icon an hourglass and a four-step bar show how long the first version takes, three steps for the first and third cards, two for the second and one for the fourth, and at the foot a robot head or a hand points to an exchange, showing whether a program or a person places the order.
FIG. 3The four paths differ less in the code than in money, time and who presses the button.
The four paths side by side, with the figures stated by the sources named in this guide.
Yourself, with AIA freelancerA software companyAn assistant around your method
Money up frontFrom $20 a month (Claude Pro)Per job$3,000 to $150,000+$1,000 (Navrya's bespoke app)
First version3 to 6 weeks in the write-upsDays to weeksAbout 4 weeks for a mid-sized job3 to 7 days after the interview
Who writes and fixes the codeYou, with the AIThe developer, as agreedThe company, under contractThere is no order code to write
Running costsAI use, server, data, feesChanges and fixes10% to 15% of the build a year (QuantScripts)AI use from your AI wallet
Places ordersYesYesYesNo: you do
Main riskBugs, and a strategy that does not hold liveA vague briefPaying for engineering before the strategy is provenAlerts you then do not act on

How do you protect your money while you test a bot?

  1. 01

    Trade from a separate account that holds only the money you have decided you can lose while testing.

  2. 02

    Create the API key with trading permission only. Keep withdrawals off, and tie the key to your server's IP address if the exchange allows it.

  3. 03

    Turn on two-factor authentication everywhere; TradingView requires it before it sends webhook alerts.

  4. 04

    Build the kill switch before the first live trade. maymay5692 added one that stops the bot after a loss of 3% in a day, 7% in a week or 15% in a month; choose your own numbers, and write them down.

  5. 05

    Start with the smallest size the market allows, and raise it only after a set number of live trades has matched the paper results.

  6. 06

    Look at the bot every day, and keep a written rule for when you switch it off.

  7. 07

    Record every bot trade in your journal, next to what the backtest expected.

Which path should you choose?

Start from what you can prove, not from what you want to automate.

  • No written rules yet: write them first, and apply them by hand with a journal or an assistant until they are clear.
  • Clear rules, some comfort with code, a small budget: build it yourself with AI, on paper first.
  • Clear rules on one platform and no time to code: order it from a freelancer with a written brief.
  • Proven rules, and a product, a fund or several strategies: a software company.
  • You want your method applied every day, and you will place the orders yourself: an assistant around your method.

Whichever you choose, keep the journal. It is the one place where the backtest, the bot's trades and your own decisions meet.

Sources, read on 1 December 2026: claude.com/pricing and chatgpt.com/pricing for the plans; mql5.com/en/job/rules for MQL5 Freelance; TradingView's help article on webhook alerts; the DEV Community posts of maymay5692, Gilbran Laureano, DevForge Templates and Chudi Nnorukam for the build stories; QuantScripts' cost guide on DEV Community and biz4group.com for the company ranges. Claude is a product of Anthropic and ChatGPT of OpenAI; Navrya is independent of both.

Questions about building a trading bot

Can ChatGPT build a trading bot?

Yes. ChatGPT, Claude Code and similar tools write working bot code for TradingView, MetaTrader or a crypto exchange when you give them exact rules. They do not tell you whether the strategy makes money. Test the code with fees on data you did not tune it on, then on paper, then live with the smallest size and a loss limit that stops the bot.

Can I build a trading bot without coding?

Partly. An AI tool writes the code, and TradingView lets you test a strategy on a chart without a server, but you still need to understand what the code does, because a bug trades real money. If you do not want to manage code at all, order the bot from a freelancer with a written brief, or use an assistant that applies your method while you place the orders.

How much does it cost to build a trading bot?

From an AI coding plan of $20 a month if you build it yourself, through per-job prices from freelancers, to $3,000–$150,000+ at development companies, by their own published ranges. Servers, data, trading fees and maintenance come on top; one company puts maintenance at 10–15% of the build cost a year.

Does an AI trading bot guarantee a profit?

No. No bot, with AI or without, can promise a profit, and a seller who does is selling the promise. The developers quoted in this guide saw a 491% backtest and a 52% win rate turn into live losses. Treat a backtest as a hypothesis, prove it on paper, and size live trades so a losing run stays affordable.

Should a trading bot be written in Python or MQL5?

In the language of the place it will trade. MQL5 runs expert advisors inside MetaTrader 5 on a broker account. Python is common for crypto bots that talk to an exchange's API, for example through the ccxt library, and for research. TradingView's Pine Script is the quickest way to see a strategy on a chart and test it.

Is it safe to give a bot my exchange API key?

Only if the key can trade and do nothing more. Create it with withdrawals off, tie it to your server's IP address where the exchange allows it, keep two-factor authentication on, and trade from a separate account holding only the money set aside for testing. Never hand a developer your live key; give them a demo account.