AI and trading 19 min read
AI in trading: the complete guide to TradingView, MetaTrader 5, direct trading and how the large players use it
What is AI in trading, really? From the large funds that use it to discover signals and slice big orders into liquidity, to TradingView's AI Copilot and MetaTrader 5's agentic assistant; 12 practical uses, three models of direct trading, the autonomy ladder, the risks and a checklist for judging bots, with animated diagrams.

Artificial intelligence now sits in every layer of trading: from the large funds that use it to discover signals and slice billion-dollar orders, to the assistants inside TradingView and MetaTrader 5 that draw on your chart, write code and run backtests. But in the hands of a trader who doesn’t know what to do with it, the same tool only makes mistakes faster and bigger. This is a complete reference guide: what AI in trading really is, how the large players use it, what TradingView, MetaTrader 5 and other platforms offer, how it can improve your trading, what direct trading with AI looks like and where it becomes dangerous, with animated diagrams.
In this article
- What does AI in trading actually mean?
- From the first neural network to today’s agents
- How large players and smart money use AI
- AI in TradingView
- AI in MetaTrader 5
- Other platforms and tools
- 12 practical uses of AI that improve your trading today
- Trading directly with AI: three models and the autonomy ladder
- Risks and limits: where most traders get burned
- A checklist for evaluating any AI bot or tool
- Where AI fits in the AATTOM method
- The future: what’s coming?
- Frequently asked questions
- Sources
What does AI in trading actually mean?
When people say “AI in trading” they usually mix up three very different families. The difference between them is the difference between a calculator, an assistant and an employee:

- Machine learning models: models that learn a numerical pattern from past data, such as the probability that the next candle closes up, or whether volatility over the next hour will be high or low. Their output is a number, not a sentence. Neural networks, decision trees and statistical models belong here. Quant funds have worked with this family for decades.
- Large language models (LLMs): such as Claude, ChatGPT and Gemini. They read and write text: they summarise news, analyse reports, write code and explain. Price prediction is not their speciality, and they can state a wrong number with complete confidence.
- AI agents: a language model connected to tools so it can act: open files, compile code, run backtests, draw on a chart and even send orders. Agents arrived in trading platforms in 2025 and 2026, and this is where both the biggest opportunity and the biggest risk sit.
| Family | Input | Output | Strength | Weakness |
|---|---|---|---|---|
| — | — | — | — | — |
| Machine learning | Numbers (price, volume, spread) | Numbers and probabilities | Speed, statistical precision, no emotion | Overfitting; breaks when market behaviour changes |
| Large language model | Text, code, chart images | Text and code | Understanding news, coding, teaching, structuring thinking | Hallucination (inventing numbers and facts), different answers each run |
| Agent | A goal plus access to tools | Work done | Multi-step automation | Its mistakes are executed, not just said |
Remember one rule from the start: AI does not create a trading edge; it makes the edge you already have faster, more disciplined and more testable. A trader without a clear method won’t find one through AI; they will just lose faster.
From the first neural network to today’s agents
AI in trading isn’t new; what is new is that everyone now has access to it. MetaTrader’s history shows the path clearly:

- 2006 to 2008: the first neural-network Expert Advisors appeared in the MQL4 community, and a neural-network approach won the 2007 automated trading championship.
- 2019: official Python integration for MetaTrader 5; price data flowed straight into machine learning libraries.
- 2022: matrix and vector types were added to MQL5, which is exactly what machine learning maths needs.
- 2023: ONNX model support in MQL5 (train outside, run inside the bot) and the first AI assistant in MetaEditor.
- 2024: the OpenBLAS linear algebra library was added to MetaTrader 5.
- July 2026: MetaEditor’s agentic assistant with the MCP protocol, which plans, creates files, compiles and tests on its own.
- 2026: TradingView launched AI Copilot directly on its charts.
Meanwhile the big funds and banks were several steps ahead. So let’s first look at what they do with it, because the footprint of their work shows up on the gold chart every day.
How large players and smart money use AI
The popular picture is that big funds own a “magic robot” that knows tomorrow’s price. The reality is very different and far more instructive. AI in a large fund works in four stages:

1. Data: reading what no human can read
In October 2025 Citadel’s chief technology officer said the data the firm consumes is now measured in petabytes and that AI is what makes it manageable; he called it an “arms race to be able to consume the right kind of data”. That data isn’t only price: news text, meeting minutes, company reports, central bank speeches and dozens of other sources. Language models read these texts in seconds and turn them into numbers.
2. Research and signal discovery: agents that generate ideas
Man Numeric, part of Man Group, one of the world’s largest listed hedge fund firms, built a system called AlphaGPT that imitates a quant researcher: it searches data for signal ideas, writes the code and backtests them on historical data. Its own executives wrote that the system still needs human oversight and strategic direction and amplifies human judgement rather than replacing it. In February 2026 the group announced a broad partnership with Anthropic to use Claude across its investment processes. Bridgewater launched a roughly $2 billion fund run by machine learning in summer 2024, and Point72 created a standalone AI-focused strategy called Turion in October 2024.
3. Execution: slice the big order and enter quietly
This is the most important part for us. A large player can’t hit an order of thousands of lots at once; it would move the price against itself. So execution algorithms split the big order into hundreds of small ones and place them where and when liquidity is available, meaning where opposite orders and clusters of stops are waiting. Machine learning has been used here for years; for example, in 2017 JPMorgan announced an execution system called LOXM that used machine learning to fill large orders with minimal price impact.

This is exactly where our trading connects to theirs: a large order needs liquidity to get filled. That is why price often runs to obvious highs and lows before the real move, takes the stops and turns. What looks like a “stop hunt” on the chart is, in most cases, an execution algorithm looking for the other side of a big order. To read this footprint on the chart, see the articles on [order flow](https://anadeafx.com/en/blog/order-flow-en/) and [liquidity in gold trading](https://anadeafx.com/en/blog/liquidity-in-gold-trading-en/).
4. Risk: AI is also the brake
Fund risk systems constantly compute position correlations, volatility and crisis scenarios, and cut size when risk crosses the limit. A large share of professional AI exists to reduce losses, not to find magic trades.
What a retail trader should take from this
- Even these players haven’t replaced humans with AI: Citadel’s Ken Griffin said in October 2025 that AI cannot yet beat the markets.
- Their edge is data, infrastructure and fast execution. You won’t win on that field, and you don’t need to. You can read their footprint: where liquidity was taken, which zone was removed and where order flow changed.
- The biggest use of AI for you is the same as its main use for them: faster research, more disciplined testing and tighter risk control.
AI in TradingView
TradingView is the most widely used charting platform, and AI has entered it through three routes: its own assistant, writing Pine Script with language models, and connecting alerts to bots.

AI Copilot: the official assistant on the chart
In 2026 TradingView launched AI Copilot, an assistant that works inside the chart with access to TradingView’s data (quotes, indicators, news, the economic calendar, the screener and fundamentals). According to TradingView:
- It can switch symbols and layouts, add or remove indicators, draw levels, and create alerts and watchlists.
- It writes Pine Script and applies it to the chart, and backtests and optimises an existing strategy (with metrics such as profit factor, win rate and maximum drawdown).
- It gives combined technical, news and macro analysis and “structured trading plans”.
- It is a separate add-on for paid plans, works on the web and desktop app, and is not yet in the mobile app.
- It does not place orders. TradingView itself stresses that its output is analysis, not financial advice, that it can make mistakes and that the final decision stays with the trader.
Pine Script with language models
Even without Copilot, any good language model can write Pine Script: an indicator that marks your zones, an alert for a candle body closing above a level, or a strategy that backtests your rules. Three important points:
- Specify the version (for example “Pine Script v6”); models sometimes mix in older syntax.
- Watch out for repainting. Code that uses unclosed candles or higher-timeframe data without the right settings looks great in a backtest and is useless live. Ask explicitly for “no lookahead, closed candles only”.
- Check every script on the chart: follow a few backtest trades with your own eyes and confirm it applied exactly the rule you asked for.
From alert to trade: webhooks
TradingView can send a webhook message to a web address when an alert fires. Bridge services receive it and send the order to a broker or to MetaTrader. This is the simplest “automated trading” route for TradingView users, but every link in the chain (alert, bridge server, broker connection) can fail, so the stop loss should always sit on the broker side, not only in the alert logic.
“AI” indicators in the public library
There are hundreds of indicators named “AI” or “Machine Learning” in TradingView’s library. A few genuinely implement a simple model (such as nearest neighbours); most just have an attractive name. The word “AI” guarantees nothing; ask them the checklist questions at the end of this article.
AI in MetaTrader 5
In terms of AI infrastructure, MetaTrader 5 is now one of the most complete retail platforms. It has four main capabilities:

1. Python integration
Since 2019 you can read MetaTrader 5 data directly in Python, build models with libraries such as pandas, scikit-learn and PyTorch, and even send orders from Python. Most serious research happens here.
2. ONNX models inside the bot
Since 2023 MetaTrader 5 supports the standard ONNX format. You train a model in Python, export it to ONNX, and an MQL5 bot runs it directly and quickly without Python, even in the Strategy Tester. Matrices and vectors (2022) and the OpenBLAS library (2024) also make heavy numerical work possible inside MQL5 itself.
3. MetaEditor’s AI assistant
The first version arrived in 2023 and explained code and fixed errors. Its agentic version in July 2026 (build 6060) plans multi-step work on its own: it reads and edits project files, compiles, runs tests and optimisations and reviews the results. By default it uses a free lightweight model, and you can connect OpenAI, Anthropic, Gemini, DeepSeek or local models (Ollama) with your own key. Most importantly, the assistant’s trading access can be switched off completely, allowed, or made to require manual confirmation, and its web and shell access can be blocked too.
4. MCP: connecting any agent to MetaTrader
MCP is an open standard for connecting agents to software. MetaEditor supports it, so agents such as Claude, Claude Code, ChatGPT and Codex can connect from outside, write code, compile and coordinate tests. MetaQuotes itself advises always reviewing and testing AI output on a demo account first, and says the user is responsible for the results.
The standard path for a smart bot in MetaTrader 5
1) Write the rule or idea precisely. 2) Prepare the data in Python. 3) Train the model and test it on data it has never seen. 4) Export to ONNX. 5) Put it inside an MQL5 Expert Advisor and write the risk rules separately and strictly. 6) Test in the Strategy Tester with real spread and commission. 7) Run it on demo for a few weeks (forward test). 8) Only then, small size on a live account.
Other platforms and tools
| Platform | Language | Where AI fits | Best for |
|---|---|---|---|
| — | — | — | — |
| TradingView | Pine Script | Copilot assistant, Pine via LLMs, webhooks | Analysis, indicators, alerts |
| MetaTrader 5 | MQL5 + Python | ONNX, agentic assistant, MCP | Forex and gold bots, full testing |
| cTrader | C# | .NET machine learning libraries inside cBots | C# developers |
| NinjaTrader | C# (NinjaScript) | .NET library integration | Futures and order flow |
| QuantConnect (LEAN) | Python and C# | Cloud backtesting on broad data, ML libraries | Serious quant research |
| Python + broker API | Python | Complete freedom | Building your own system |
| General language models | Natural language | Reading chart screenshots, news analysis, coding | Every trader’s daily assistant |
An important note on “chart analysis from a screenshot”: today’s language models can read and explain a chart image, but numbers read from an image can be off by a few dollars, and they may “see” a pattern that isn’t there. They are excellent for learning and structuring your thinking; not for setting exact entries and stops.
12 practical uses of AI that improve your trading today
For a retail trader the biggest value of AI is not prediction; it is discipline, learning speed and testing. You can start all of these today with no trading risk:

- 1. Journal analysis: give it your trade spreadsheet and ask: “At which hours, with which setups and after how many consecutive losses have I lost the most?” Patterns appear that you can’t see yourself.
- 2. Writing your method’s rules precisely: write your entry rules and ask it to find every ambiguous part. A rule that can’t be written precisely can’t be tested or executed.
- 3. Coding indicators and tools: marking zones, key time candles, position size from risk, body-close alerts.
- 4. Backtesting rules: turning a rule into a testable strategy in Pine or MQL5 and getting real statistics instead of a feeling.
- 5. News and calendar summaries: “Which dollar releases matter this week, what are the forecast and previous figures, and how has gold usually reacted to each?” (Always check the numbers against the original source.)
- 6. Pre-market scenarios: write your bullish and bearish scenarios and ask for the weak points and invalidation conditions of each.
- 7. A pre-entry checklist: build a short checklist and review it before every trade; AI is excellent at building and shortening it.
- 8. Risk and position size: the lot-size formula from risk percentage and stop distance, provided you check it once by hand.
- 9. A psychological review after the session: write down how you felt and why you entered, and get neutral feedback on patterns such as revenge trading or fear of missing out.
- 10. A private tutor: ask about any concept you don’t understand from different angles and with examples, until you can explain it yourself.
- 11. Reading English sources: central bank reports, research papers and platform documentation.
- 12. Reviewing bot code: finding bugs, logic errors and cases where the bot doesn’t set a stop or enters twice.
An example of a good prompt
“Act as a strict reviewer. My entry rule is: [rule]. 1) List every ambiguous part. 2) Name three market conditions where this rule fails. 3) Turn it into pseudocode that uses closed candles only. Don’t invent any data; if you need data, ask.”
This prompt has the three features of a good prompt: a clear role, a numbered output and a ban on invented data.
Trading directly with AI: three models and the autonomy ladder
“Trading with AI” can mean three very different things:
- Model 1, a rule-based bot written by AI: the rules are yours; AI only wrote the code. The bot’s behaviour is predictable and testable. The safest and most sensible place to start.
- Model 2, a machine learning model inside the bot: for example an ONNX model that estimates a setup’s probability of success, with the bot taking only high-probability setups. Powerful, but highly exposed to overfitting.
- Model 3, an agent that decides and sends orders itself: a language model reads news and charts and trades through an API or MCP. The most attractive and the riskiest model, because language models can answer differently on every run, can invent numbers, are slow and cost money, and the text they read (a news item or a web page) can contain malicious instructions.

The best way to think about trading with AI is an “autonomy ladder”. Each rung gives the machine more control, and you should climb only once the rung below has been proven with data:
- Rung 0: fully manual analysis and decisions.
- Rung 1: AI is an assistant: summaries, code, journal; you decide.
- Rung 2: AI proposes trades and you confirm (like MetaTrader 5’s “require manual confirmation” mode).
- Rung 3: an automated rule-based bot, with a broker-side stop, a daily loss limit and a kill switch.
- Rung 4: an autonomous agent. Even the largest funds run this rung with human oversight and hard limits.
Safety rules for every bot and agent
- The stop loss is always sent with the order and held on the broker side.
- A daily loss cap and a trade-count cap, separate from the bot’s main logic.
- A kill switch that stops everything with one click.
- Demo first, then small size; and compare live results with the backtest.
- Never give your trading account password to any AI tool or unknown service, and create API keys with the minimum access needed.
Risks and limits: where most traders get burned

- Overfitting: a model that has memorised the past rather than learned from it. The sign: a flawless backtest and poor live results. The cure: a separate test set the model has never seen, testing across different market periods, and few parameters.
- Look-ahead bias: code that, without you noticing, uses information that didn’t exist at that moment. The most common cause of legendary backtests.
- Regime change: gold behaves differently during inflation, war or a change in monetary policy. A model trained on one period can become invalid in the next.
- LLM hallucination: a model can state a release figure, a price level or even a date wrongly with full confidence. Check every number against the original source.
- Real costs: spread, commission, slippage and latency can turn a strategy that is profitable in a backtest into a losing one, especially in scalping and around news.
- Scams using the AI label: on 29 September 2026 the US SEC charged four related entities with taking more than $15 million from hundreds of investors by promoting AI trading bots and recruiting through WhatsApp groups, and regulators have repeatedly warned about exaggerated AI claims (“AI washing”). Any tool that promises “guaranteed profit” or a “fixed win rate” is very likely a scam.
- Security: an API key with withdrawal rights, an account password handed to an unknown service, or an extension that sends account data can wipe out the whole account.
A checklist for evaluating any AI bot or tool
Before you trust any bot, signal or “smart” tool, ask:
- Can its logic be explained? If the seller can’t say why the bot enters, you won’t be able to tell when it has stopped working.
- Is the backtest on unseen data? And with real spread and commission?
- Does it have a verifiable forward or live track record? A profit screenshot is not proof.
- What was the maximum drawdown? A win rate without this number is meaningless.
- Does it use a stop loss? Bots that “never close a loss” usually run martingale or averaging and one day take the whole account.
- What access does it want? No tool needs your master password or withdrawal rights.
- Does it promise guaranteed profit? If so, you’re done here.
Where AI fits in the AATTOM method
In the AATTOM method, AI is a tool, not a source of decisions. The method is built on reading the footprint of those same large players on the chart: [market structure](https://anadeafx.com/en/blog/market-structure-en/), [supply and demand](https://anadeafx.com/en/blog/supply-and-demand-en/), order flow and liquidity. Our view of AI rests on three principles:
- Any rule that can be written precisely can be tested. That is why the method’s rules are written as precisely and unambiguously as possible; a precisely written rule can be taught, coded and backtested.
- Repetitive work for the machine, judgement for the human. Marking, calculating, journaling and testing are the machine’s job; understanding the story of price and making the final decision are the trader’s.
- Demo first, data first. No new tool or bot touches a live trade without testing on data and on a demo account.
The future: what’s coming?
The direction is clear: agents become more capable every year, and platforms such as TradingView and MetaTrader connect them more deeply to charts and execution. But two things won’t change. First, the market is still a place where large orders need liquidity to be filled, and their footprint stays on the chart. Second, when everyone has the same tools, the tools alone aren’t an edge; the edge belongs to whoever has a clear method, disciplined testing and strict risk management. AI strengthens those three; it doesn’t replace them.
Frequently asked questions
Can AI predict the price of gold?
Not with certainty. Machine learning models can, in specific conditions, estimate probabilities slightly better than chance, but no model “knows” the future price. Even Citadel’s CEO said in 2025 that AI cannot yet beat the markets. Language models such as ChatGPT and Claude weren’t built to predict prices at all.
Which AI is best for trading?
The right question is: for which job? For coding, news summaries and journal analysis, large language models are excellent. For work on TradingView charts, its own Copilot. For MetaTrader bots, the MetaEditor assistant or an agent via MCP. For numerical prediction, machine learning models you have trained and tested yourself on your own data.
Are ready-made AI trading bots for sale profitable?
Most are not. If a bot were truly profitable and stable, its seller would have little reason to sell it cheaply. Judge every bot with this article’s checklist and start only on demo.
Can AI replace the trader?
In repetitive work, yes, and that’s a good thing. In judgement, risk management and responsibility for results, no; even funds that have built agentic systems say these systems need human oversight and direction.
Do I need to know programming to start using AI in trading?
No. Journaling, scenario writing, learning and news summaries need no code. For indicators and bots, AI writes the code, but you need to learn enough to understand its logic and check it on the chart.
Is it safe to give account details to AI tools?
Never give your account password or withdrawal access to any tool. For bots, create keys or access with the lowest level needed, and test on a demo account first.
Sources
- MetaQuotes: the history of machine learning in MQL5 and MetaTrader 5
- MetaEditor help: MCP and AI
- MetaEditor help: working with machine learning models (ONNX)
- TradingView launches AI Copilot
- Bloomberg: Man Group says agentic AI is now devising quant trading signals
- Hedgeweek: Man Group partners with Anthropic
- Business Insider: how big-name hedge funds are using AI
- Investor.gov: artificial intelligence fraud alert
- OECD.AI: SEC case on AI-powered crypto investment scams
- AATTOM method courses: structure, zones, order flow and liquidity-based structure
This article is educational and is not financial advice. Platforms and companies are named for education only; there is no affiliation or sponsorship.