TL;DR: Trading bots and automation make a rule repeatable, not profitable, so the real decision is which rule you hand over and how. In a 295-trade ES breakout test, US-hours-only trading lifted the average trade by 0.34R, the biggest single setting. A -2R daily kill switch cut the dollar loss by about a quarter but made the average trade worse. Six random-entry runs beat the real signal, so test cost against the stop and a random control first.
Trading bots and automation promise to take you out of the trade at the moment you are worst at it: the hesitation after a loss, the entry you chase, the stop you move. That part is real. What the marketing leaves out is that a bot does not remove decisions. It moves them to before the trade, and then repeats your answers hundreds of times without asking again.
This guide covers what trading bots do, the main types and platforms, how to choose and connect one, and the risks. It also runs one fully written rule through five automation decisions on real index futures data, so you can see which settings move the result and which ones only feel important.
What Trading Bots and Automation Actually Do

A trading bot is software that applies a written trading rule for you. It reads market data, checks whether the rule's conditions are met, sends the order and manages the position until the exit, all without you clicking anything.
Automated trading (also called algorithmic trading) is the broader practice. MetaQuotes describes it as managing a trade account through specialised applications, which it calls trading robots. NinjaTrader's NinjaScript documentation describes automated strategies as systems that submit and manage orders using the same market data and order-execution engine the platform itself uses.
The useful split is between the strategy and the automation:
- The strategy is the rule: what has to happen for an entry, where the stop goes, when the trade ends.
- The automation is everything around it: which hours the bot watches, how often it checks, how fast it fills, what it does after a bad day, and how it sizes each trade.
Most bot discussions are about the first part. Most bot failures come from the second. A trader doing it by hand answers the automation questions in the moment, often without noticing. A bot needs every one of them answered in advance, in code, and then it applies that answer every time.
So the first question is not "which bot is best". It is "is my rule written down completely enough that a machine could follow it?" If you cannot write the tie-breaks, the bot will make them up for you.
Related lesson: Rule-based vs discretionary trading
Types of Trading Bots and How They Work
Trading bots differ mainly in how much of the trade they take over. Sorting them by that is more useful than sorting them by brand.
- Alert bots watch for a condition and notify you. You still place the order. They save screen time, not decisions.
- Semi-automated strategies generate the order and let you approve it. TradeStation, for example, sends strategy-generated orders to a Strategy Orders tab, where you can place the order as it appears, customise it or ignore it.
- Fully automated bots place and manage orders on their own. The same TradeStation strategy can be switched to automated execution, and NinjaTrader, MetaTrader and cTrader strategies run this way once enabled.
- Signal relays connect a charting platform to a separate execution service. TradingView, for instance, can send an HTTP request to a web address you choose when an alert fires, and the receiving service turns that message into an order.
- Copy traders repeat one account's orders in other accounts. They automate distribution, not the decision.
Under the hood, almost every bot runs the same loop:
- Take in new data, usually on each new bar or each new trade.
- Recalculate the indicators or conditions the rule uses.
- Check the entry, stop and exit conditions in a fixed order.
- Send, change or cancel orders.
- Record what happened and wait for the next update.
Two details in that loop change results more than people expect. One is how often the loop runs: every tick, every bar close, or every few bars. The other is the order the checks run in when two things happen on the same bar, such as a stop and a target both being touched. A test that never states those choices cannot be reproduced, and a bot running different choices from its own test is a different strategy.
Strategies Trading Bots Commonly Run
Bots run the same strategies people do. What changes is that each strategy's failure mode is repeated without hesitation. Here is what the common ones bet on and where they tend to break.
| Bot strategy | What it bets on | Where it usually fails |
|---|---|---|
| Trend following | Moves that persist after they start | Choppy, range-bound stretches produce repeated small losses |
| Breakout | Price leaving a range keeps going | False breakouts and cost against tight stops |
| Mean reversion | Stretched prices return toward an average | A real trend keeps stretching and the bot keeps buying |
| Grid | Price oscillating inside a band | A one-way move leaves a stack of losing orders |
| Dollar-cost averaging | Buying in steps lowers the average price | A long decline turns averaging down into a large position |
| Arbitrage | Two prices for the same thing converge | Fees, speed and transfer delays eat a thin spread |
| Market making | Earning the spread by quoting both sides | Being run over by an informed or fast move |
Trend following and breakout rules are the most common starting point for futures traders because they are easy to write precisely. Mean reversion, grid and averaging strategies need a hard limit on total exposure, because their losing scenario is a market that keeps going in one direction while the bot keeps adding.
None of these is "the best strategy for a trading bot". The best one is the one you can state completely, test honestly and afford to be wrong with.
Watch for the urge to add a filter after every bad week. Each new filter makes the past look better, and it does nothing for next month unless it was tested on data the bot had not seen.
Related lesson: Trend following
Trading Bot Platforms Compared
Most traders do not build a bot from nothing. They write it inside a platform that already handles data, charts and order routing. Each platform names its bots differently and uses its own language or builder.
| Platform | What its bots are called | Language or builder | Worth knowing from its own docs |
|---|---|---|---|
| MetaTrader 5 | Expert Advisors, trading robots | MQL5, plus MQL5 Wizard | Strategy Tester with optimization and genetic algorithms |
| MetaTrader 4 | Expert Advisors | MQL4 in the built-in MetaEditor | An expert starts working on each new tick once attached to a chart |
| cTrader | cBots | C# or Python in cTrader Algo | A store of free and paid cBots |
| NinjaTrader 8 | NinjaScript strategies | C#, plus Strategy Builder | Backtesting, optimization and walk-forward analysis, Windows desktop only |
| TradeStation | Strategies | EasyLanguage | Hypothetical orders on a chart before execution is automated |
| TradingView | Strategies and alerts | Pine Script v6 | Scripts and backtests run on TradingView's servers |
| Crypto exchange APIs | API trading keys | Any language that can call the API | Keys scoped by permission and locked to IP addresses |
What sets trading bot platforms apart
A few practical differences between bot platforms matter more than their feature lists:
- Where the code runs. NinjaScript runs only inside the NinjaTrader 8 desktop application on Windows. Pine Script is cloud-based, so it runs on TradingView's servers, with limits on execution time, memory and script size. Desktop bots need the computer running. Cloud scripts do not, but they need a separate route to a broker.
- No-code builders. NinjaTrader's Strategy Builder and the MQL5 Wizard generate code from menus. They are a fast way to write simple rules, and a slow way to write complex ones.
- Ready-made bots. MetaTrader's Market and Code Base, and the cTrader Store, sell or share bots. A bought bot is someone else's rule with someone else's test. Treat its record as a claim to verify.
- Market reach. MetaQuotes describes MetaTrader 5 robots as trading on forex and exchange markets through a broker, while crypto bots usually talk straight to an exchange API. Each platform connects only to certain brokers, so the platform you choose often decides which markets you can reach.
- Community size. TradingView says its users have published more than 150,000 Community Scripts, half of them open-source. That is a large library of ideas, and none of them comes with a cost model for your account.
How to Choose a Trading Bot or Platform
Choosing a trading bot is mostly choosing which problems you are willing to own. Work through these in order and stop at the first one you cannot answer.
- Market and connection. Does the platform reach the market you trade, through a broker or exchange you can actually use? A great bot on the wrong connection is useless.
- Ownership of the rule. Is it your rule, or a rented one? If you cannot read the logic, you cannot tell when it has stopped fitting the market.
- Testing quality. Can you see trade-by-trade results, with costs, on data the rule was not tuned on? A single equity curve is marketing, not a test.
- Cost model. Add the subscription, data, hosting, commissions and slippage. The CFTC's advice on trading bots says to consider the effect of fees, spreads and subscription costs on returns before you trust a platform's claims.
- Where it runs. Desktop, cloud or a rented server, and what happens if that machine restarts mid-trade.
- Controls. Daily loss limits, maximum position size and an off switch that sit outside the strategy code.
- Claims. Treat promised returns, win rates near 100% and "AI-powered" labels as reasons to look harder, not reasons to buy.
On "which trading bot is the most successful": there is no honest product-level answer. Published bot results come from different rules, instruments, hours and cost assumptions, so they cannot be ranked against each other. The comparable question is whether a specific rule survives four checks: its interval excludes zero, it survives double the assumed cost, it holds with the largest winners removed, and it beats a random-entry version of itself.
Webhooks and APIs That Connect a Trading Bot

A trading bot needs a pipe from its decision to the market. That pipe is usually a webhook, an API, or both.
Webhooks send a message when something happens. TradingView's webhook alerts send an HTTP POST request to the web address you enter as soon as an alert triggers, with the alert message as the body. Its help pages add several limits worth knowing before you build on it:
- Only ports 80 and 443 are accepted.
- If the receiving server takes longer than three seconds to process a request, the request is cancelled.
- If the alert message is valid JSON, the request is sent as JSON. Otherwise it goes as plain text.
- Webhooks may occasionally fail to reach the address, and delivery can be checked in the Webhook status column of the alert log.
- Webhook alerts are only allowed with two-factor authentication turned on, and TradingView warns against putting login credentials or passwords in the message body.
The point about failed deliveries is the one bot builders forget. A webhook is a notification, not a guaranteed order. Your receiving service needs to log every message, reject duplicates and alert you when an expected message does not arrive.
APIs let a program talk directly to a broker or exchange: read prices, place orders, check positions. The security rules are simple and often skipped. Kraken's API documentation, for example, recommends separate keys for each purpose (a read-only key for market data, a trading key for orders), enabling withdrawal permission only on keys that genuinely need to move funds, and locking keys to the IP addresses your trading system runs from.
The general rule: give a bot the least access it needs. A trading key that cannot withdraw money limits the damage if it leaks.
Related lesson: Trading APIs
Crypto Trading Bots and What Changes in a 24/7 Market
Crypto trading bots are the most marketed kind of bot, and the market they run in is different in ways that matter.
The market never closes. Coinbase's help pages state that crypto is available 24/7, while stock trading follows set market hours. A crypto bot has no daily close to flatten at and no weekend break to reset in. Every hour is one the bot is trading and you are probably not watching.
Bot types lean toward grid and averaging. Grid bots place a ladder of buy and sell orders inside a price band. Dollar-cost averaging bots buy in steps over time. Arbitrage bots look for price gaps between exchanges. All three need a hard cap on total exposure, because a one-way move is their losing case.
The keys hold real money. Most crypto bots connect to an exchange account through API keys. Give each key the least access it needs, leave withdrawal permission off unless the key must move funds, and lock it to your server's IP address, because a compromised key with withdrawal rights is a direct path to the funds.
Record-keeping grows with trade count. In the US, the IRS treats digital assets as property. Its digital asset FAQ says that exchanging one digital asset for another can produce a capital gain or loss, so a bot that trades hundreds of times a month creates hundreds of taxable records. Regulated futures contracts are treated differently: the same FAQ says gains or losses on a section 1256 contract are generally treated as 40% short-term and 60% long-term. Tax treatment depends on your situation, so check with a tax professional.
Regulators single crypto bots out. The CFTC's advisory on AI trading bots names crypto-asset trading schemes alongside automated algorithms among the products fraudsters promote with promised high or guaranteed returns.
Building and Backtesting a Bot Strategy
Building a bot is the easy part now. Testing it honestly is where most of the work is.
A workable path from idea to bot:
- Write the rule in plain language. Entry, stop, exit, position size and every tie-break. If two events can happen on one bar, say which wins.
- Code it, or generate it. Write it in the platform's language, or use a builder such as NinjaTrader's Strategy Builder or the MQL5 Wizard, then read the generated code.
- Backtest with costs. Include commission and a realistic slippage assumption in ticks and in currency. A backtest without costs is a different strategy.
- Check the sample. Count trades, not days. A few dozen trades cannot tell a small edge from noise.
- Test out of sample. Hold back data the rule was never tuned on, or use walk-forward testing, which NinjaTrader lists among its strategy tools.
- Forward test. Run it on a simulated account in live market conditions before real money.
The common testing errors are all versions of fooling yourself:
- Look-ahead bias. Using information the bot could not have had at that moment, such as filling at the close of the bar that created the signal.
- Overfitting. Tuning parameters until the past looks good. The more versions you try, the better the best one looks by luck.
- Ignoring cost. Small stops make cost a large share of every trade, so a tick or two of slippage can flip a backtest from positive to negative.
- No benchmark. A result needs something to beat. A random-entry version of the same bot is the fairest benchmark.
Related lesson: Backtesting a trading strategy
One Trading Bot Rule Written Out for Testing
To show what the automation choices actually do, this guide uses an illustrative study on real index futures bars. The trading rule stays fixed and only the automation settings change, so any difference in the result comes from automation.
Data. Continuous front-month five-minute bars for E-mini S&P 500 futures (ES) and E-mini Nasdaq-100 futures (NQ), from Yahoo Finance's chart data, July 8 to September 16, 2026. After dropping bars with missing fields, that left 13,567 ES bars and 13,568 NQ bars across 59 sessions. ES is $50 per index point and NQ is $20, and both have a 0.25-point tick, so one tick is $12.50 on ES and $5.00 on NQ.
The breakout rule.
- Entry signal. On the close of a five-minute bar, the close is above the highest high of the previous 30 bars.
- Entry. At the open of the next bar, one position at a time. A new signal while a position is open is ignored.
- Stop. Entry minus one 14-bar average true range (ATR), measured at the signal bar.
- Exit. Whichever comes first. If a bar opens beyond the stop, the fill is that open, not the stop price. If the bar's low reaches the stop, the fill is the stop. Otherwise the trade closes at the close of the eleventh bar after entry.
- Costs. Two ticks of slippage plus $4 of commission per round turn: 0.58 points or $29 on ES, and 0.70 points or $14 on NQ. These are assumptions, not quotes from a specific broker.
Results are in R, where 1R is the distance from entry to stop. A result of -0.4272R means the average trade lost 0.4272 times what it risked.
Baseline result of the breakout bot
The baseline. Watching every hour, checking every bar and filling at the next open, the rule took 295 ES trades at -0.4272R per trade, with a 95% interval of -0.5826 to -0.2718. On NQ it took 311 trades at -0.1881R. The ES interval sits entirely below zero, so this is not bad luck. The rule loses as written.
That is useful, not disappointing. With a losing rule held fixed, you can see clearly which automation settings help, which hurt and which only move the loss around. A winning rule would hide all of that behind its own profits.
Related lesson: Average true range explained
Five Automation Decisions That Changed the Bot's Result
Here are the five settings a bot forces you to choose, each tested against the baseline with the rule unchanged. A positive change means the setting improved the average trade.
| Automation decision | ES result per trade | NQ result per trade | What it shows |
|---|---|---|---|
| Baseline, all hours, every bar, next-open fill | -0.4272R over 295 trades | -0.1881R over 311 trades | The reference |
| US regular session only | -0.0852R, change +0.3420 | +0.0366R, change +0.2247 | Largest effect, on both markets |
| Fill one bar later | -0.2997R, change +0.1275 | +0.0082R, change +0.1963 | Changes which trades happen |
| Check only every twelfth bar | -0.7007R over 53 trades, change -0.2735 | 54 trades | Fewer looks, worse average on ES |
| Stop for the day at -2R | -0.5476R over 175 trades | 213 trades, loss cut by two fifths | Smaller loss, not a better trade |
The pattern matters more than any single row. Only one setting, limiting the hours, moved both markets toward zero, and nothing turned a losing rule into a winning one. Automation multiplies whatever edge the rule has. It does not create one.
Trading hours a bot watches
A bot does not know what time it is unless you tell it. In the breakout-bot study on ES and NQ, the hours it watched were the biggest single setting.
| Window the fill fell in, ET | ES trades | ES result per trade | NQ trades | NQ result per trade |
|---|---|---|---|---|
| 6:00 PM to midnight | 69 | -0.5774R | 77 | -0.3439R |
| Midnight to 8:00 AM | 114 | -0.4517R | 128 | -0.0757R |
| US regular session | 83 | -0.0852R | 78 | +0.0366R |
ES lost in every window. NQ's regular-session result was the only positive one, at +0.0366R over 78 trades, but its 95% interval ran from -0.3808 to +0.4539, far too wide to call it an edge.
The two markets split for a cost reason, not a direction reason. Overnight, a five-minute ATR on ES can fall below one point, so a fixed two-tick, $4 round turn becomes a large share of a small stop. NQ's overnight stops were several times wider in points, so the same cost took a smaller bite. A session filter is not a setting you can copy from someone else's bot. It depends on your own cost against the stop your rule produces in each hour.
Fill speed and how often a bot checks
In this guide's breakout-bot study on ES and NQ, filling one bar later, at the open of the second bar after the signal, improved ES from -0.4272R to -0.2997R and NQ from -0.1881R to +0.0082R. Filling 12 bars later reached +0.1059R on NQ.
Read that carefully before calling it a discovery. With 200 to 300 trades and per-trade results spread by more than 1.3R, differences of 0.1R to 0.2R sit inside the noise. A later fill also changes which trades the rule takes. Fill speed is something to test, not something to maximise.
How often the bot checks matters too. Checking every bar produced 295 ES trades and 311 NQ trades. Checking every third bar produced 163 and 173, every sixth 97 and 103, and every twelfth 53 and 54. On ES the average trade fell from -0.4272R to -0.7007R. The signals a slow bot misses are not random: they are the ones that formed and played out between checks.
A daily kill switch on a trading bot
A kill switch stops the bot for the rest of the day once the day's loss hits a set level. In the breakout-bot study on ES and NQ, it stopped trading for the rest of the ET day at -2R.
On ES it cut trades from 295 to 175, and with every trade sized to risk $1,000 it cut the total loss from $126,023 to $95,836 and the maximum drawdown from $128,140 to $97,953. On NQ it cut 311 trades to 213, the loss from $58,489 to $35,191, and the drawdown from $60,073 to $37,915. On 37 of the 57 ES days with a trade, the day reached -2R at some point.
What did not improve is the point. The ES average trade got worse, from -0.4272R to -0.5476R. A kill switch caps the damage from a bad day. It is not an edge, and set too tight it cuts good days as readily as bad ones. It still belongs on every bot, outside the strategy code, because its job is to limit the day you did not plan for.
One contract or fixed risk per trade
The fifth automation decision is sizing. In the breakout-bot study on ES and NQ, the same trade list gives very different dollar results depending on whether the bot trades one contract every time or sizes each trade to a fixed dollar risk.
| Measure of risk per trade | ES | NQ |
|---|---|---|
| 5th percentile stop, points | 1.430 | 11.598 |
| Median stop, points | 3.429 | 23.375 |
| Contracts for $1,000 of risk at the median stop | 5.83 | 2.14 |
| Link between trade result and dollar risk | +0.107 | +0.004 |
The median ES stop was 3.429 points, or $171.43 on one contract, but the 95th percentile was 9.041 points, 6.32 times the 5th percentile. A stop sized by ATR inherits the volatility of the hour, so the same rule risks very different amounts at different times.
Holding one ES contract through all 295 trades lost $20,513. Sizing each trade to risk $1,000 lost $126,023, with a maximum drawdown of 128R. The rule did not change between those two lines. Only the sizing did.
On NQ, a $1,000 risk budget allows 2.14 contracts at the median stop but only 0.83 at the 95th-percentile stop, so 22 of 311 trades, or 7.1%, could not be taken at all without breaking the budget. The near-zero link between each trade's result and its dollar risk also means you cannot turn an R average into dollars by multiplying by an average stop.
Related lesson: Position sizing
Trading Costs Against a Bot's Stop
In this guide's breakout-bot study (a 30-bar breakout rule with a one-ATR stop and an eleven-bar exit, run on 59 sessions of five-minute ES and NQ bars, July 8 to September 16, 2026), every number includes two ticks of slippage and $4 of commission per round turn. Changing only the slippage assumption shows how much of the result rests on execution.
| Slippage per round turn | ES net points | ES result per trade | ES cost as share of median stop | NQ net points | NQ result per trade | NQ cost as share of median stop |
|---|---|---|---|---|---|---|
| 0 ticks | -262.761 | -0.2612R | 2.3% | -1430.218 | -0.1653R | 0.9% |
| 1 tick | -336.511 | -0.3442R | 9.6% | -1507.968 | -0.1767R | 1.9% |
| 2 ticks | -410.261 | -0.4272R | 16.9% | -1585.718 | -0.1881R | 3.0% |
The column that matters is cost as a share of the stop. On ES, the 0.58-point round turn is 16.9% of a typical stop and 60.1% of the smallest stop in the sample. On NQ, 0.70 points is 3.0% of the median stop. That ratio explains most of why the same rule behaved so differently on the two markets.
The worst ES trade itemised
The worst ES trade in the breakout-bot study shows the problem without hindsight. The signal fired at 12:05 AM ET on August 13, 2026, when the 14-bar ATR was 0.9643 points. Entry was 7776.50 at the next open, so one contract risked $48.22.
The stop was hit on the entry bar. The gross loss was 0.9643 points, exactly the planned risk. After the 0.58-point round turn, the net loss was 1.5443 points, or -1.6015R. The stop worked perfectly and the trade still lost 60.1% more than planned, because cost is charged whether the trade works or not. That is what a small overnight stop does to a bot.
The practical rule: state cost in ticks and in currency, measure it against the stop in every hour the bot will trade, and check that the result survives double the assumed cost.
Related lesson: Slippage explained
A Random-Entry Check Every Bot Backtest Needs
A backtest needs something to beat, and zero is the wrong benchmark. A long-only rule on a rising index can look fine just by drifting with the market.
This guide's breakout-bot study (59 sessions of five-minute ES and NQ bars, July 8 to September 16, 2026) ran a random-entry control: entries drawn from a fixed random seed, with the same stop, the same eleven-bar exit and the same costs, on the same bars. Three seeds per market gave these results:
| Entry method | ES result per trade | NQ result per trade |
|---|---|---|
| Real breakout signal | -0.4272R | -0.1881R |
| Random seed 1 | -0.2526R | -0.1436R |
| Random seed 2 | -0.1813R | -0.0710R |
| Random seed 3 | -0.2541R | -0.0557R |
All six random runs beat the real signal. On this sample, the breakout entry was worse than no signal at all, with the risk logic held the same.
That is the most useful result in the study. It says the losses came from the entry, not from the stop or the exit, and it says no automation setting could have fixed it. Without the control, a trader might have spent weeks tuning hours and fill speed on a rule whose entry was the problem.
Two limits apply. The sample covers 59 sessions, and per-trade results spread by more than 1.3R, so a rule with an average near zero cannot be settled on this much data. And the window contains no long trending decline, which is the condition that matters most for a breakout rule. The right next step for a rule like this is more data and a rewrite, not more automation.
Related lesson: Overfitting and look-ahead bias
Pros, Cons and Risks of Trading Bots
Every advantage a trading bot gives you has a matching way to hurt you. That is not a reason to avoid automation. It is a reason to know which side of each line your bot is on.
| Advantage of a trading bot | The matching risk |
|---|---|
| Follows the rule every time, with no hesitation | Follows a broken rule every time, too |
| Reacts faster than a person | Sends wrong orders faster than a person can stop them |
| Watches many markets and hours | Trades hours and conditions it was never tested on |
| Removes emotion from the click | Moves the emotion to the off switch and the next tweak |
| Makes testing possible | Makes overfitting easy |
Technical failure in automated trading
The clearest public example of a bot failing is not a retail one. According to the SEC, on August 1, 2012, a defective automated order router at Knight Capital sent more than 4 million orders into the market in the first 45 minutes after the open while trying to fill just 212 customer orders. The firm traded more than 397 million shares and lost more than $460 million. An internal system had sent 97 automated emails flagging the error before the open, and nobody acted on them. Knight later paid a $12 million penalty.
The lessons scale down to a single trader's bot: test every code change before it trades, compare the orders the bot sends with the orders it meant to send, and treat error messages as alarms.
Gaps and fills a bot cannot control
A stop is an instruction, not a guarantee. In this guide's breakout-bot study on 59 sessions of ES and NQ data, the ES close-to-open gap between sessions had a median size of 1.00 point, but 12 of 58 gaps were wider than the median stop. On NQ, 17 of 58 were. When price opens past the stop, the fill is the open, not the stop.
Fills drift too. In this guide's same breakout-bot study, 21.7% of ES entries and 44.4% of NQ entries filled worse than the signal bar's close, even though the median difference was zero. A backtest that fills at the signal bar's close is not just optimistic. It is a trade that could not have happened.
Drift when a bot runs unattended
The quietest risk is a bot that keeps running correctly after the market it was built for has changed. Nothing errors. The results just slide, and an unattended bot can trade for weeks before anyone looks.
Running a Trading Bot Live and Watching It

Running a trading bot live is an operations job. The rule is done, and the temptation is to stop watching because the bot is "handling it". It is not. You are now responsible for a machine that trades without asking.
A practical live setup covers five things:
- Monitoring. A dashboard or log you check at set times, showing position, open orders, the day's result and the last time the bot received data.
- Alerts. Messages when the bot errors, loses its connection, misses an expected signal or webhook, or reaches its daily loss limit. In the 2012 Knight Capital incident, an internal system sent 97 automated emails flagging an error before the open and nobody acted on them, so alerts only help if someone treats them as alarms.
- Reconciliation. Compare what the bot thinks it holds with what the broker shows. The SEC's order against Knight Capital criticised the lack of a control comparing orders leaving the router with those entered.
- Hard limits outside the code. Maximum position size, daily loss limit and a manual flatten button that work even if the strategy code is wrong.
- A review rhythm. Weekly, compare live trades with what the backtest would have done on the same bars. A growing gap means fills, data or market behaviour have changed.
Holding time needs its own check. In this guide's breakout-bot study on ES and NQ, extending the hold from 11 bars to 26 left 81 ES and 91 NQ positions still open an hour after entry. A bot will hold through whatever comes next, including session closes, data releases and maintenance breaks, unless the code says otherwise. Give it a flat-by time.
Related lesson: How to keep a trading journal
What Trading Automation Costs to Run
The cost of trading automation has four layers, and the subscription is usually the smallest.
- Platform and data. Licences, charting plans and market data fees. Some platforms are free to use but charge for data, add-ons or live trading.
- Hosting. A desktop bot needs a computer that stays on. Many traders rent a virtual private server (VPS) instead. MetaQuotes, for example, sells a VPS service that it says lets trading robots run 24 hours a day. NinjaScript strategies need Windows, because NinjaScript runs only in the NinjaTrader 8 desktop application.
- Development time. Writing, testing and maintaining code, or paying someone to do it.
- Per-trade cost. Commission plus slippage on every round turn. This is the one that compounds.
In this guide's breakout-bot study on ES and NQ, the assumed round turn was $29 on ES and $14 on NQ, which came to 16.9% of the median ES stop. Across 295 ES trades, the gap between zero slippage and two ticks of slippage was 147.5 index points, or $7,375 on one contract. A cheap platform with a high cost against a tight stop is the expensive combination.
Trading Bot Legality, Regulation and AI Claims
Using your own trading bot is generally legal for individual traders in the US. Regulation is aimed at the firms that run markets and route orders, and at people who sell trading programs with false claims.
Rules for the plumbing. In 2010 the SEC adopted its market access rule (Rule 15c3-5), which requires brokers with market access to have risk controls on the orders they send. In December 2020 the CFTC adopted Electronic Trading Risk Principles for futures exchanges. A supporting statement from Commissioner Dawn Stump said the front-line responsibility for preventing, detecting and mitigating electronic trading risks rests with the exchanges. For an individual, that means exchanges and brokers have their own limits, and your bot can be rejected or cut off by them.
AI trading bot claims and scam warnings
Rules for the pitch. On January 25, 2024, the SEC's investor education office, NASAA and FINRA issued a joint investor alert on AI and investment fraud. It warns about unregistered platforms promoting AI trading systems with claims like "Our proprietary AI trading system can't lose!" and says claims of high guaranteed returns with little or no risk are classic warning signs of fraud.
The CFTC's customer advisory on AI trading bots is blunter. It says AI technology cannot predict the future or sudden market changes, and that scammers claim AI-created algorithms can return tens of thousands of percent or win 100% of the time. Its case study describes a scheme that used a so-called bot program promising at least 10% a month and took more than $1.7 billion in bitcoin from at least 23,000 people. According to the CFTC, very little money was actually traded.
What AI tools can actually do. AI coding assistants can turn a written rule into code quickly, and some platforms add AI features for building strategies. That speeds up the easy part. It does not tell you whether the rule has an edge, and a tool that only writes code will not flag the usual bot failures: cost that is large against the stop, price gapping through a stop, or an entry signal that loses to random entries.
Getting Started With Trading Automation
Getting started with trading automation goes faster if you resist starting with the bot. A sensible order:
- Write one rule completely. Entry, stop, exit, size, hours and every tie-break, on one page.
- Pick the platform from your market and broker. Choose the platform that connects to where you will actually trade, then learn its language or builder.
- Backtest with costs and a random-entry control. Note the trade count, the interval and the result at double the cost.
- Paper trade or use a simulated account. Run the bot live on simulated money long enough to compare its fills with the backtest.
- Add hard limits. Daily loss limit, maximum size and a flat-by time, set outside the strategy.
- Start small and review weekly. Smallest size, short sessions you can watch, and a written note of every change you make.
The hardest moment is usually a good first week. The urge is to size up. Decide in advance how many trades the bot must take before any size change, write the number down, and hold to it.
Trading bots on prop firm accounts
If you plan to run a trading bot on a prop firm evaluation or funded account, read that firm's current automation rules first. Firms differ on whether bots are allowed, whether they must be your own code, and whether copied or shared strategies count as a breach. A breach found later usually cannot be undone, so ask the firm before connecting anything.
On our accounts, bots and algorithms are allowed only if you are the sole owner of the strategy, it is not shared with other traders or firms, and it is not a high-frequency trading bot. We may require a live video of you enabling the code on your own PC, and API access through Tradovate is limited to live funded accounts. Our evaluation and funded accounts are simulated, all positions must be closed by 4:45 PM ET, and on funded accounts a payout request needs more than 50% of trades held longer than 10 seconds, with more than 50% of profit from those trades.
Related lesson: Algorithmic trading
Trading Bots and Automation FAQ
Are trading bots profitable?
Some are, but a bot's profitability belongs to the rule, the market, the hours and the cost, not to the bot. In this guide's illustrative study, one fully written breakout rule lost on both ES and NQ over 59 sessions, and random entries with the same risk logic did better. Treat any profit claim as something to test, not something to buy.
Do AI trading bots actually work?
Only partly: AI tools can write and run the code for a rule you specify, but they cannot predict markets, and the CFTC states plainly that AI cannot predict the future or sudden market changes. Treat promised returns from AI bots as a warning sign.
Is automated trading legal?
Yes, individuals can legally use trading bots in the US. Regulators focus on exchange and broker risk controls and on fraud by people selling trading programs. Brokers, exchanges and prop firms can still set their own rules for automated orders.
How much does it cost to run a trading bot?
Running a trading bot usually costs more in commission and slippage than in software. The full list is the platform, market data, hosting such as a VPS, development time and per-trade costs. In this guide's breakout-bot study, a $29 ES round turn was 16.9% of a typical stop.
Can a trading bot trade a funded account?
Sometimes, if the firm's rules for that account allow it. Many prop firms allow automation only under conditions such as owning the code or avoiding high-frequency trading, and the rules change. Read the current terms and ask the firm before you connect a bot.
Trading futures and other leveraged products involves substantial risk, and losses can exceed what you planned or deposited. The study in this guide is a historical test of one stated rule on index futures data, using assumed costs, and it does not describe any live, evaluation or funded account. Evaluation and funded accounts are simulated, and simulated fills differ from live markets. Past or backtested results do not predict future results. This guide is educational and is not investment advice.

