Claude × TradingView
the AI that codes your Pine Script indicators(and what it will never do)
The Captain connected Claude, Anthropic's AI, to TradingView. The result: Pine Script indicators coded in a few sentences, in plain English, without writing a single line of code yourself — plus, new: the full 13-minute tutorial to wire up the same setup at home. But let's be clear from the start: the AI assists, it doesn't trade for you. This page shows you both sides, videos included.
What we actually plugged in
No magic involved. An open-source MCP server (Model Context Protocol) — in plain terms, a bridge that lets Claude drive another piece of software, here TradingView Desktop. Claude doesn't "enter" TradingView, it controls it: it opens the app, selects assets, and above all it writes Pine Script, the language behind TradingView indicators. You describe what you want in plain English. It executes. No need to be a developer, no need to understand what's happening under the hood.
It all started with a slightly provocative question, asked in the live session on June 23rd: does Claude trade better than you? The Captain's answer fits in one sentence: the real question isn't whether the AI will trade in your place, but how you can get better with its help. Two exploratory live sessions later, everything this setup makes possible — building a custom Pine Script indicator from a simple price action idea, building watchlists on your own technical criteria, setting alerts where TradingView doesn't offer any, or backtesting a strategy — now fits in the tutorial below: 13 minutes flat to reproduce the full connection, step by step. The full replays of both live sessions are still further down this page.
The short from July 3rd — the setup summed up in 42 seconds.
▶ The tutorial — the full connection in 13 minutes
The tutorial from July 27th: Claude connected to TradingView, step by step, without writing a single line of code.
Watch every video in English — Our videos are recorded in French, but YouTube dubs them all into English automatically: as soon as your YouTube language is set to English, the English audio track plays by default. On youtube.com, click your profile picture → "Language" → English — the mobile app simply follows your phone's language. You can also switch any video by hand, right in the player: ⚙️ Settings → "Audio track" → English.
Reproduce the setup at home, step by step
The Captain took the installation bruises so you don't have to — here is the condensed Windows quick-start, tested and re-tested: 9 steps in order, from the first MCP server to the final health check. The same path can be followed on video — the 13-minute tutorial featured higher up this page. It deploys right here, with a free account — email, Google or Discord.
The Captain's condensed quick-start for Windows: the commands in order, the traps already cleared for you (PowerShell, PATH, debug port…) and the express recap to keep at hand. Read-only setup — Claude reads your chart, it never places an order.
100% free account — sign in with email, Google or Discord. The guide then deploys right on this page.
Pine Script without knowing how to code: what it lets you do
A week later, it's time to put it into practice: part 2 happens live, no safety net. The team loves the Choppiness Index — the "chop" —, an indicator that measures whether the market is going sideways or ripe to send a trend. Problem: TradingView doesn't offer any native alert for it. Until now, you needed real Pine Script skills to build one. In a few commands, Claude wrote the alert indicator. A compile error along the way? It fixed it itself. End result: an alert on crossing the 70 threshold, on H1, H4 and daily — on crossing only, to avoid spam. All of it live, in front of the members, hesitations and corrections included.
Here's the detail that changes everything: the Captain can't code. Zero programming knowledge, and his first indicator was born in a matter of moments. And that's only the start: building other custom indicators, generating then backtesting strategies without coding, building dashboards and watchlists on your own parameters. In the short from July 7th — shown here —, the Captain goes further: instead of combing through 200 charts by hand, Claude scans the market against his criteria in a single command, and surfaces a trade he would probably have missed on his own.
The short from July 7th — 200 charts scanned in 49 seconds.
▶ The replay — the indicator coded live
Part 2 — the live session from June 30th: the Pine Script indicator coded live, then the market analysis (46 min).
The community channel is plugged live into this page — the Captain and the members talk AI, bots and automation all day long, auto-translated into English in real time. Read freely; to ask your question, log in and write it in English: it lands in the Discord, translated into French for the community.

You can read freely — to join in, log in.
Log inThe limits, no filter
We're not here to sell you a dream, that's not how this place works. Three things to know before you get started.
You need a paid Claude subscription and a paid TradingView plan, and the tokens burn fast.
It can be a real pain — the Captain struggled with it, a colleague didn't, go figure.
The AI doesn't have a hidden holy grail wired into its circuits. An excellent assistant, not an oracle.
"It will never replace your judgment as a trader, only the time you used to waste on repetitive tasks."
And what the AI produces can be checked: a backtest is only ever a test on the past, never a promise about the future.
What the AI won't do in your place
The last video on this page isn't about AI, and that's on purpose. A NASDAQ trade, pure method, in three steps: spotting a key zone — here a supply zone —, reading the volume of the last rally on the Volume Profile, then waiting for the breakout to fail. Take profit set on the next key zone, counter-trend and fully owned, and a line that sums it all up: "no need to shoot for the moon."
Look closely: no AI is involved. Reading the market, the plan, the patience, the execution discipline — that's all brought by the trader. That's the real verdict of the "AI vs trading" match: there isn't one. The AI absorbs the repetitive mechanics, the trader keeps the decision. And that part — the only one that really matters — is something you learn.
A NASDAQ trade in 3 steps — 100% human judgment.
The latest AI videos
We keep exploring AI applied to trading, live session after live session. New videos in the series are added here automatically, as soon as they're published on the YouTube channel.
Claude x TradingView Épisode 7 : Claude prépare ton marché — August 10, 2026
Claude x TradingView Épisode 6 : L'IA au Service du Trader, On Va Plus Loin — July 24, 2026
Claude Trade Maintenant sur Comptes Réels : Où en Est Vraiment l'IA ? Partie 5 — July 17, 2026
Mieux Trader Grâce à Claude ? Avec CryptoSkud en Invité — July 13, 2026
Carlita Trade avec Claude Code : L'IA qui Trade avec Toi en Direct — July 8, 2026
Trader avec Claude Connecté à TradingView : Partie 3, On Passe au Concret — July 7, 2026
Claude Trade Mieux que Toi ? L'IA Qui Code Tes Stratégies de Trading — June 23, 2026
AI Trading: the complete guide
The Claude × TradingView demo is the visible tip. For the substance, the complete guide from our free trading course now lives here: what AI trading really covers, how machine learning changes analysis, the traps to know — and the automated BTC/ETH strategy built with the community.
Expand the complete guide (≈ 23 min read)
AI trading is defined as the use of artificial intelligence in the process of analyzing market data, either to generate investment ideas or to act directly on our behalf. The use of AI in the markets has revolutionized the financial sector and the trading world by making it more efficient. If AI trading has grown so popular in recent years, and so many traders and investors are adopting it, there’s a good reason for it: the Results!
AI trading generally involves the use of algorithms and machine-learning techniques to analyze vast amounts of data and identify patterns and trends in the market.
Thanks to a computer program, the risk of errors between intention and execution — what we also call human error — can be considerably reduced!
Precision is another undeniable asset of trading assisted by artificial intelligence!
In short, you get the idea: going without artificial intelligence in the markets today is a shame at the very least, if not a considerable amount of money left on the table.
That’s why the Captain Trading community has begun developing automated systems dedicated to decision-making in the financial markets.
So in this guide on AI trading, alongside an overview of the topic, we’ll walk you through the full logic of an automated BTC and ETH strategy, designed from A to Z by a member of our community!
⚠️ Heads-up: if you’re mainly interested in our automated strategy, please note that it relies on perpetual and inverse perpetual contracts; we run it on OKX. Check whether derivatives are available from your country before you start. Depending on the platform you choose, your results will differ: this is a strategy that borders on high-frequency trading, where the smallest differences in market movements can have a considerable impact!
On the agenda:
AI Trading: the Guide!
AI Trading: Definition
AI trading, also known as algorithmic trading or algo trading. It’s a method of executing transactions on the financial markets using computer algorithms. These algorithms analyze larger or smaller amounts of data — such as historical price movements, market trends, and economic indicators — in order to identify patterns and make trading decisions.
Recently, the use of artificial intelligence in the markets has gained ground thanks to its ability to analyze large amounts of data quickly and accurately, which lets it identify patterns and make decisions faster than any human could ever hope to.
Trading-focused AIs have evolved considerably over the years, using increasingly sophisticated machine-learning algorithms. The use of AI in trading has quite simply allowed traders to make better decisions by analyzing large amounts of data quickly and accurately.
On top of that, AI has enabled some traders to automate their trading strategies, allowing them to seize market opportunities 24 hours a day, 7 days a week. And I’ve already given you a taste of this in the first part!
Of course, artificial intelligence is used on traditional markets as well as in cryptocurrency trading.
AI Trading: the Main Uses and Technologies
- machine learning,
- natural language processing
- massive-data analysis: big data
- Automatic order execution
Machine-learning algorithms are used to analyze large amounts of data in order to identify patterns and make longer-term trading decisions.
Natural language processing makes it possible to analyze news articles and other information sources in order to identify market trends and opportunities.
Massive-data analysis (big data) is used to analyze large amounts of data in order to identify patterns and trends in the market.
Beyond these 3 main aspects, AI trading platforms also use advanced algorithms to execute transactions automatically. These algorithms are designed to capitalize on market opportunities the moment they arise, letting traders make better decisions without delay and thereby increase their profitability.
Overall, AI trading is a fast-moving field that offers traders a whole range of advantages. By using advanced algorithms and technologies, traders can analyze large amounts of data quickly and accurately, identify market trends and opportunities, and automate their trading strategies to capitalize on market opportunities 24 hours a day, 7 days a week.
AI Trading: the Advantages
There are many reasons why investors and traders may be drawn to artificial intelligence — we’ve already mentioned a few, but it can go much further! Here are some of the specific benefits of using artificial intelligence in trading:
- Reduced research time
- Automation
- Better forecasts and reporting
- Cost reduction
- Scalable technology
- No emotions
- Fast trade execution
- Effective backtesting
All in all, AI trading — trading assisted by artificial intelligence — brings tremendous added value to the financial markets!
Algo Trading: the Different Types of Algorithmic Trading
Quantitative Analysis
Quantitative analysis can be applied to both technical and fundamental analysis. It’s a popular approach to algorithmic trading. It involves using mathematical models and statistical techniques to identify patterns and trends in market data. A trader can use these models to develop trading strategies that exploit market inefficiencies and other opportunities.
For example, regression analysis is a very common quantitative-analysis technique. In fact, if you went to business school, the term should ring a bell — especially if I say “linear regression,” right?!
Regression analysis is a statistical approach used to explore the connection between dependent and independent variables. In other words, it serves to analyze how the independent variable influences the dependent variable.
This technique involves analyzing the relationship — even the correlation — between two or more variables in order to identify patterns and trends and capitalize on the projections!
High-Frequency Trading
High-frequency trading (HFT) is a type of algorithmic trading that involves executing transactions at very high speed.
HFT strategies rely on sophisticated algo trading, but also on ultra-high-speed data-transfer networks, in order to execute transactions within fractions of a second. This speed is essential, which
HFT strategies are designed to profit from small price movements in the market. As such, for a trader, using HFT to execute large transaction volumes quickly and efficiently can also cut fees considerably, making it possible to turn a profit in niches that wouldn’t be profitable otherwise.
Indeed, High Frequency Trading, in essence, “means”:
- Large transaction volume
- A very high number of orders
- Low but steady profitability
So it’s essential not to get it wrong when it comes to calculating the break-even point!
I dug up a documentary I watched a while back on high-frequency trading. If this is a topic you’re passionate about, it’s a solid watch for understanding what’s at stake with this strategy!
Arbitrage
Arbitrage strategies consist of profiting from price differences between two or more markets.
One of the most common arbitrage strategies is statistical arbitrage. This strategy consists of identifying assets that are mispriced relative to one another, then buying and selling those assets to make a profit.
Statistical arbitrage is designed to capitalize on market inefficiencies and other opportunities.
This term — if I’ve read my audience right — you’ve probably heard more than once, so we won’t dwell on it; let’s just recall a solid definition! Arbitrage was an incredibly lucrative activity as recently as 2 or 3 years ago on the crypto market. In fact, for those who still remember, that’s how SBF started building his fortune through Alameda Research!
Today, arbitrage on the crypto market is probably still profitable, but it has certainly become far more competitive!
In the past, all it took was being registered on a few crypto platforms around the world, holding substantial funds, buying on the platforms where a market imbalance leaned toward supply and selling on the platforms where the imbalance leaned the other way.
Wars, for example, have in recent years created significant arbitrage opportunities on local platforms for anyone — but it’s also a profession, and some people do nothing else!
As a result, in a market whose competitiveness is growing exponentially, AI trading has become indispensable to the practice of arbitrage on the financial markets.
AI Trading and Machine Learning
Predictive Models
Predictive models have almost certainly been used ever since people had information, data, and a method to interpret them. That said, modern predictive modeling reportedly began in the 1940s, when governments used the first computers to analyze weather data, among other things…
Over the following decades, software and hardware capabilities grew, making it possible to store large amounts of data and access it more easily for analysis.
Internet connectivity has made it easier for anyone with access to accumulate, share, and examine vast amounts of data. As a result, modeling has expanded to cover almost every area of business and finance. For example, it’s perfectly common in the marketing world to see predictive modeling used. And of course — this is the part that interests us — financial analysts also use it to estimate trends and events on the stock market.
Uses of Predictive Models
Predictive analytics uses predictors, or identified features, to build models with the goal of reaching an outcome.
Predictive analytics can be used in hundreds, even thousands, of ways. For example, investors use it to spot trends in the stock market or in individual securities that could signal investment opportunities or decision points.
One of the models most commonly used by investors is the moving average of an investment, which smooths out price fluctuations to help them identify trends over a defined period. In addition, autoregression is used to establish a correlation between the past values of an investment or an index and its future values.
Predictive modeling is also a valuable risk-management tool for investors, since it makes it possible to identify the potential outcomes of various scenarios. For example, the data can be adjusted to predict what might happen if a fundamental condition were to change.
The Various Forms of Predictive Modeling
There are several distinct forms of predictive modeling that can be used to analyze most datasets in order to uncover insights about upcoming events.
Classification Predictive Models
Classification models draw on machine learning to sort data into categories or classes according to criteria defined by the user. There are several types of classification algorithms, a few examples of which are below:
Logistic regression: An estimate of whether an event will occur, usually a binary classification such as a yes-or-no answer.
Decision trees: A series of yes/no, if/else, or other binary outcomes presented in a visualization called a decision tree.
Decision tree: An algorithm that combines unrelated decision trees using classification and regression.
Neural networks: Machine-learning models that comb through enormous volumes of data to detect correlations that only emerge after analyzing millions of data points.
Naive Bayes: a modeling system that relies on Bayes’ theorem to establish conditional probability.
Clustering (Grouping) Models
Outlier Models
Time-Series Models
AI Crypto Trading, Scalping Style!
For research purposes, we’ve decided to share this strategy, built from A to Z by a member of the community. The original spreadsheet is no longer distributed, but its logic is broken down below, step by step — everything you need to rebuild and test it yourself. It’s relatively easy to get the hang of, but you absolutely need a bit of practice before going live! And to discuss it with the community, the live chat is a little higher up on this page.
Building a Screener from a Simple Strategy
There are countless ways to build an automated trading system, as well as many levels of automation: you might want to automate everything (from decision-making all the way to order execution) or simply give yourself a personal, complementary tool while continuing to act manually on the market.
Community-Built Automated Strategy
From here, we’ll hand things over to one of our students, who’s going to walk you through an automated model he developed based on USD/USDT disparities to capture trade opportunities on a very short timeframe.
Today, I’m going to introduce you to a screener based on a simple strategy, designed to hand you entries as well as scalp trade setups. The idea is to grab moves on very short timeframes to keep your exposure to an absolute minimum.
You’ve got the full breakdown of my reasoning; don’t hesitate to ping me if you have questions or suggestions for improvements 🙂
Test Statistics as of 27/04/24
- roughly 1 setup every 3 minutes (across all reliability levels)
On average (the sample is small, so not necessarily representative) - 5% strong
- 16% medium
- 43% weak
- 36% kamikaze
Success rate : 64% across all sensitivity levels
Sample: 403 Setups
Context
The USD/USDT Correlation
In theory, 1 USD = 1 USDT; however, temporary divergences can sometimes appear. Several reasons can explain this:
- Liquidity
- Volatility
- External influences (confidence in USDT or USD)
The goal of my strategy is to spot these divergences and profit from them.
Perpetual and Inverse Perpetual Contracts
These are futures contracts with no expiration date, so you can keep a position open indefinitely, as long as you can cover the fees associated with the contract.
The advantage? They let us speculate without having to own the underlying in question.
In our strategy, we use inverse perpetuals as a hedging tool; and finally, one last point worth noting, perpetual contracts also let us use leverage
* Disclaimer: Leverage is dangerous — stay humble, or you risk getting wiped out 🙂
Choosing the Platform
For our strategy, we use OKX: the platform offers both USDT-margined perpetuals (the “PERP,” e.g. BTCUSDT) and coin-margined perpetuals (the “Inverse PERP,” e.g. BTCUSD) on the major pairs like BTC, ETH, and XRP
Perfect for our strategy: we can play the USD/USDT correlations on these pairs.

Hedging
Simply put, hedging means opening a long position and a short position on the same asset to protect yourself in case the market moves the opposite way from what you anticipated.
Typically: 1 long, 1 short
- If the price drops, the short covers the long
- If the price rises, the long covers the short
Strategy: Let’s Get Down to Business!
As mentioned earlier, we’re going to build a simple strategy based on USD/USDT divergences, using perp and inverse perp contracts to our advantage, with a dash of leverage on top 🙂
The USD/USDT Correlation
1 USD = 1 USDT, most of the time.. the USD/USDT correlation is extremely strong, and the divergence periods, although very short, still exist.

Here, we can see a micro-gap of 8.4 points between BTCUSDT and BTCUSD.
Starting from the premise of the USD/USDT correlation, two conclusions are possible:
- USDT could rise to meet USD
- USD could fall to meet USDT
So the question is: how do we know which one will meet the other?
Technical Analysis to the Rescue
We know that USD/USDT divergences occur on very short timeframes, so we can use a bit of technical analysis on BTCUSDT to identify a trend.
Note: other technical-analysis methods and other indicators can be used; here, I’m going to give you simple indicators. You can make the technical analysis I’m proposing more complex, modify it, or alter it however you like — the goal is to understand the strategy as a whole.
Correlation of Technical Indicators
For our example, we’ll use the correlation of technical indicators to infer the direction (USDT toward USD or USD toward USDT).
The chosen ones are: MACD / RSI, / Bollinger Bands and EMA
A blend of these technical indicators to define a (very short-term) trend intention on BTCUSDT: this consensus then gives us a sense of the market’s potential direction on this pair. We’re literally playing the probabilities.
The Logic of Our Strategy
- If BTCUSDT < BTCUSD
- If technical analysis suggests a rise on BTCUSDT
- Then BTCUSDT should meet/exceed BTCUSD
Suggested position:
- Long Perp BTCUSDT, with leverage to increase the expected gain
- Short Inverse Perp BTCUSD, without leverage (for hedging)
Conversely:
- If BTCUSDT > BTCUSD
- If technical analysis suggests a drop on BTCUSDT
- Then BTCUSDT should meet/drop below BTCUSD
Suggested position:
- Short Perp BTCUSDT, with leverage to increase the expected gain
- Long Inverse Perp BTCUSD, without leverage (for hedging)
Important considerations
- Basis risk: The positions won’t fully hedge each other if the USD/USDT ratio doesn’t normalize
- Transaction costs: In this kind of strategy, where profits are fragile, you absolutely must factor in the platform’s fees! A trade can look attractive, but once the fees are deducted, it wasn’t worth it
- Volatility: Cryptos are extremely volatile, market conditions can be extreme, and liquidity can have a big impact on your trades — better safe than sorry
- Your PnL depends on your leverage, your analysis, and your appetite for risk — again, be careful
⚠️ Finally, an important point to keep in mind: the moves we’re after are on extremely short timeframes, and placing 2 orders correctly within a few seconds is a challenge — ease into it and practice!
The Weakness of This Strategy
The big weakness of this strategy lies in the reactivity it demands. Between analyzing the elements we mentioned above, setting up the 2 trades, and execution, you’ll have your hands full!
For the boldest among you, I’ve put together a cheat sheet that gives you setups based on this strategy. You’ve already seen it go by — it’s right at the top of this article! What you may not have noticed is that it updates automatically !
It’s laid out as follows:
- Reliability: Ranging from Kamikaze to High, the reliability tells you about the risk of the proposed setup
- Direction : Bullish/bearish
- The product: Perp or Inverse Perp
- The ticker: BTC/ETH/XRP or EOS
- The platform’s Last Traded Price
- Order type: Long or Short
- TP: Take Profit
- SL: Stop Loss
All the elements of the document speak for themselves, but a few of them need some clarification:
- The Last Traded Price is the last price traded on the platform for the product (perp or inverse perp); it is updated every minute.
- The TP and SL are suggestions; you can fine-tune them however you like. That said, note that here they’re indexed to the ATR and the platform’s fees, and are automatically updated as market conditions evolve
⚠️ The goal isn’t to give you signals, but rather potential, attractive entries on this kind of setup!
How Do You Place the Orders?
For execution, we use OKX (remember to check availability from your country). The principle stays the same: place your main position (Long or Short) on the USDT-margined perpetual with a bit of leverage, then the opposite order on the coin-margined (inverse) perpetual for the hedge, entering the Take Profit and Stop Loss suggested by the cheat sheet.
⚠️ Leverage is dangerous: start with a small position size and practice in demo before going live.
⚠️ What Follows Is Very IMPORTANT for Beginners ⚠️
For the greenest beginners among you, here are the settings I suggest, along with how to use the sheet while you’re cutting your teeth:
- Only trade BTC and ETH
- Only place the Long and Short 1 orders, not the hedge order – You won’t have time to place both correctly
- Order size at 70 – Without a hedge, you’re not risking much, so nothing too damaging if you mess up
- Only take the Medium and High reliability levels
- Adjust your trades depending on when you entered – if you see you can move your SL up, do it! Conversely, on the TP, don’t get too greedy
Finally, and more generally, the ideal is to keep the sheet visible on one of your screens, or minimized, so you’re ready to act on BTC and ETH. Pre-fill your order sizes, and let it roll 🦾!
You’ll see it works in cycles: quiet > it fires off > quiet > it fires off > etc.
Conclusion
Every trading strategy has a goal and variables; the one I’ve shown you today is meant to support you with scalping and booking small but ultra-regular profits. It won’t suit every profile, but we can say with certainty that it does its job.
If artificial intelligence in the markets and AI trading interest you, don’t hesitate to send me feedback in the comments of this article — I’d be delighted to answer your questions 🙂
Finally, a big thank-you to Captain Trading for giving me the opportunity to share my work; we often work alone, and having the team’s support is always a pleasure!
Frequently asked questions
How do you connect Claude to TradingView?
Through an MCP server (Model Context Protocol), Anthropic's protocol that lets Claude drive external tools. The tutorial featured on this page shows the full connection in 13 minutes, without writing a single line of code.
Can you build a TradingView indicator without knowing how to code?
Yes — that's the whole point of this page. You describe your idea in plain English, Claude writes the Pine Script code, compiles it on TradingView and fixes its own errors. You do need a paid Claude subscription and a paid TradingView plan, though.
Can Claude build and backtest a Pine Script strategy?
It can code a strategy from your rules and run it through TradingView's backtester. Keep in mind that a backtest is only ever a test on the past: it guarantees nothing about real results.
Can the AI trade in my place?
No, and that's not the point. The AI absorbs the repetitive mechanics — the code, the alerts, the watchlists; reading the market, the plan and the decision stay with the trader. That's exactly what the last video on this page shows.
What's next at Captain Trading
We keep testing these tools first, so you don't have to hit the same snags. The step-by-step tutorial for installing the MCP server is out — it's the featured video at the top of this page — and the exploration continues live session after live session: new indicators, backtests and custom dashboards.
Watch the videos on this page, then come talk about it on Discord or subscribe to the channel so you don't miss what's next. And if you want to learn to trade with real method, the free trading course is a solid place to start.
A grid bot is a robot that places buy and sell orders at regular intervals inside a range that YOU define ahead of time. The repetitive mechanics, taken to their purest form — and still the same philosophy as the rest of this page: the tool executes the plan, the trader sets the frame, the levels and the risk. It's already being discussed in the community's dedicated channel: questions, real feedback and settings get shared there between members.
Content published for educational and informational purposes only. It does not constitute investment advice in any way. Trading carries a risk of losing capital.