Free Course📊FundamentalsStrategies📐Technical Indicators🧠Psychology🛠Trader ToolsAI vs TradingLive TradingScheduleBlog
🌐 Language
AI vs Trading · Claude Series

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.

🎬The 13-min tutorial + the lives + the shorts
🧠Claude (Anthropic) + open-source MCP server
⌨️Zero lines of code written by hand
The setup

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 EnglishOur 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.

The Windows guide

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.

Exclusive guide · for platform members only
Install Claude × TradingView at home, in 9 steps

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.

The demo

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).

Got a question? Ask the Captain directly

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.

#ia-et-trading · live from the Discord
AI, bots and automation — the community's dedicated channel, auto-translated from French.
900 online10,584 members
Le captain25 Jul 18:49
for those trading the up and down on polymarket this little tool in version 2 is starting to look pretty solid
Image partagée dans le salon
Sushisushisuchi26 Jul 06:26
i spent 2 weeks working on this
Sushisushisuchi26 Jul 06:26
mixed results
Le captain26 Jul 06:34
what is that
Le captain26 Jul 08:42
can you explain what it is cause i'm not clicking on links
Sushisushisuchi26 Jul 08:43
it's a recap of what worked and what didn't trying to train lora with an llm
Le captain26 Jul 18:57
@everyone ||Attention Early Bird spots!|| # 🤖 **New Live Bootcamp: Build Your Trading Bot** Want to automate your trading strategy but don't know where to start? This bootcamp is designed to guide you from A to Z. 📅 **Sunday, September 13** 🕙 **6:00 PM (Paris time)** ⏳ **2 hours live on Zoom** What's covered: ✅ Understand what a trading bot really is. ✅ Turn a strategy into an algorithm. ✅ Discover the right languages (MQL5, Pine Script, Python...). ✅ Steps to develop a solid and profitable bot. ✅ How to run reliable backtests and avoid the most common pitfalls. ✅ Deploy your bot and ensure its maintenance. ### 🎯 By the end of the bootcamp, you'll know how to: * Validate a strategy idea. * Build a stable and scalable bot. * Use the right tools to develop efficiently. * Run relevant backtests. * Launch your bot and evolve it over time. 👨‍🏫 **Hosted by BBS**, trader and developer specialized in automating trading strategies. ⚠️ Spots are **limited** and the price increases progressively as the bootcamp fills up. 👉 **Reserve your spot now:** https://captain-trading.com/evenements/concois-ton-bot-de-trading
Le captain29 Jul 18:21
FOMC indicator to copy paste on pinescript tradingview
TomusTheOne29 Jul 19:40
hey hey!
Vsp472 Aug 15:13
@membre Hey, if I had to pick a prop firm this year which one would you recommend? Of course regulated
Le captain2 Aug 15:20
regulated I'm not sure there are any that are regulated what assets are you looking to trade and on what timeframe
Safe Protectbot2 Aug 15:43
@membre
Vsp472 Aug 15:55
@membre does the Kiyotaka site that became open market have all the necessary orderflow tools? Is their €7 subscription enough?
Vsp472 Aug 15:55
Us500, gold, btc usd those are the assets I want to trade
C-Lakata2 Aug 16:55
Hey everyone, to your knowledge can an abnt at Mammouth (allows access to multiple AIs through 1 abnt) replace the Claude abnt for the TradingView link? Thanks 🙏🏻
TomusTheOne2 Aug 17:26
I'd be pretty surprised but I wondered about it too... I'm thinking an abnt is already being tested to check what the Chinese model does, supposedly as good as fable and with no limitations...
Le captain2 Aug 17:29
I have a complete tutorial on Kyotaka https://www.youtube.com/watch?v=9K-iObk8XFU that might answer your question but this isn't the right channel to talk about it. You can continue the convo in the channel https://discord.com/channels/739401711000748062/739419343649112086
Vsp472 Aug 18:00
@membre Thanks Captain🫡, I'm gonna switch to the other channel...
TomusTheOne2 Aug 18:17
thanks so much @membre !
Le captain4 Aug 18:33
**I'm sharing a prompt I designed to analyze a VIP trading journal (420+ trades) with Claude.** @everyone The goal isn't just to get standard stats, but to detect hidden patterns, psychological biases, costly mistakes, best setups, and all possible optimizations to improve future performance. If you keep a trading journal on Excel or better yet have your broker's history, that's perfect to try it out. The more data you have, the more relevant it'll be. Feel free to test it and share your results or any improvements you make to it. 👇
Le captain4 Aug 18:33
***You are a hedge fund quant analyst, a professional trader, and a data scientist specialized in trader behavioral analysis. I'm going to provide you with an Excel file containing approximately 420 trades. I want you to perform an exhaustive analysis to identify absolutely everything that can improve my future performance. Don't limit yourself to standard statistics. I want you to look for hidden patterns, weak correlations, statistical anomalies, and behavioral biases. Analyze the data from every possible angle.***
Le captain4 Aug 18:34
***Here are the areas I want you to explore: ## 1. Overall Performance - Win rate - Profit Factor - Expectancy - Average R - Distribution of gains - Distribution of losses - Simplified Sharpe - Drawdowns - Equity Curve - Variance - Consistency --- ## 2. Best Setups Determine precisely: - the most profitable setups - the least profitable setups - those that generate the best expectancy - those that destroy the most capital Rank them. --- ## 3. Context Analysis Compare results based on: - day of week - time - session (Asia/London/New York) - month - quarter - volatility - market type - trend - range - news - before/after news - trade direction - long vs short Find all significant differences. --- ## 4. Behavioral Analysis Automatically detect: revenge trading overtrading FOMO impulsive trades risk increase after losses risk increase after gains trading after multiple losses trading after multiple gains tilt effect potential fatigue loss of discipline plan non-compliance find all recurring behaviors. --- ## 5. Series Analysis Analyze: average number of consecutive wins average number of consecutive losses probability of continuing a streak probability of reversal psychological impact of streaks ---***
Le captain4 Aug 18:34
***## 6. Correlations Calculate all possible correlations between columns. Even weak correlations can be interesting. Look especially for: which variables increase profit which variables increase losses which variables make the result more stable. --- ## 7. Extreme Analysis Identify: the 10 best trades the 10 worst what they have in common which parameters explain these extremes. --- ## 8. Costly Mistakes Analysis Calculate precisely how much money would be saved if: - I removed the worst setup - I removed certain hours - I removed certain days - I removed certain market conditions - I removed certain behaviors Rank the potential gains. --- ## 9. Optimization Build the optimal version of my strategy. If you could remove only 5 to 20% of my trades to maximize my expectancy, which ones would you remove? Justify each decision. --- ## 10. Simulation Simulate several variants: Version A: no trades after 2 losses. Version B: only the best setups. Version C: only certain hours. Version D: only certain days. Version E: fixed risk. Version F: no revenge trading. Compare the results. --- ## 11. Hidden Pattern Detection Use all possible statistical methods to discover: - clusters - market segments - trade profiles - behavior groups - market regimes - particularly profitable variable combinations. --- ## 12. Machine Learning If the data allows: - Decision Trees - Random Forest - Gradient Boosting - SHAP Feature Importance - PCA - Clustering Objective: identify the variables that actually explain gains. --- ## 13. Recommendations Rank all recommendations by expected impact on my performance: Very High Impact High Impact Medium Impact Low Impact Estimate the potential gain of each recommendation. --- ## 14. Final Report I want a structured report containing: - executive summary - statistics - charts - tables - correlations - patterns - psychological biases - priority recommendations - concrete action plan For each conclusion, indicate your confidence level (low, medium, high) based on sample size and statistical significance. Never draw a conclusion without verifying it's sufficiently robust. If a column is missing or information would be useful, start by asking me for the necessary details before proceeding.***
Vsp475 Aug 02:38
@membre Thank you
Ampolkir5 Aug 22:08
Thanks Captain
Gatsby9 Aug 18:43
😅😅
Le captain12 Aug 17:29
Here's my Choppiness Multi Frame indicator https://fr.tradingview.com/script/Pg9r81ne/

You can read freely — to join in, log in.

Log in
Transparency

The 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.

💸
The cost

You need a paid Claude subscription and a paid TradingView plan, and the tokens burn fast.

🔧
The setup

It can be a real pain — the Captain struggled with it, a colleague didn't, go figure.

🔮
No miracle strategy

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."

The Captain, live session of June 30th

And what the AI produces can be checked: a backtest is only ever a test on the past, never a promise about the future.

The verdict

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 series continues

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 LoinJuly 24, 2026

Claude Trade Maintenant sur Comptes Réels : Où en Est Vraiment l'IA ? Partie 5July 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 DirectJuly 8, 2026

Trader avec Claude Connecté à TradingView : Partie 3, On Passe au ConcretJuly 7, 2026

Claude Trade Mieux que Toi ? L'IA Qui Code Tes Stratégies de TradingJune 23, 2026

The deep dive

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

  1. machine learning,
  2. natural language processing
  3. massive-data analysis: big data
  4. 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”:

  1. Large transaction volume
  2. A very high number of orders
  3. 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!

“In 2 minutes, there can be up to 2 million transactions”

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

Clustering is a technique for grouping data points together. Cluster analysts therefore assume that data belonging to similar groups should share the same characteristics, and that data belonging to different groups should have very different properties. The most common clustering algorithms are as follows:

  • K-Means / Mean: K-means is a modeling technique that uses clusters to identify the central tendencies of different groups of data.
  • Mean-Shift: In the Mean-Shift model, the algorithm shifts the mean of a group so as to identify the “bubbles,” or maxima, of a density function. When the points are plotted on a graph, the data appears to cluster around central points called centroids.
  • DBSCAN, or Density-based Spatial Clustering With Noise : DBSCAN is an algorithm that groups data points based on an established distance between them. This model builds relationships between the different groups in order to screen out outliers. That said, there are other, more specialized models dedicated to that!

Outlier Models

It’s perfectly normal for a data series to contain outliers. The problem is that these exceptional values can skew our predictions in a fairly unwarranted way. That’s why it’s important to be able to remove outliers.

  • Isolation Forest: An algorithm that detects the few, deviant data points within a sample.
  • Minimum Covariance Determinant (MCD): Covariance is the relationship of change between two variables. The MCD measures the mean and covariance of a dataset in a way that minimizes the influence of outliers on the data.
  • LOF, or Local Outlier Factor : An algorithm that identifies the nearest data points and assigns them scores, which makes it possible to flag the most distant points as outliers.

Time-Series Models

Commonly used before other types of modeling, time-series modeling uses historical data to forecast events.

Here are 2 of the most common time-series models:

  • ARIMA: The Autoregressive Integrated Moving Average model uses autoregression, integration (differences between observations), and moving averages to forecast trends or outcomes.
  • Moving Average: The moving average uses the average over a given period — for example the MA50 and the MA200, with 50 and 200 days respectively — in order to smooth out fluctuations.

AI Crypto Trading, Scalping Style!

In the meantime, if you're looking for more in-depth, educational trading content, check out the rest of our free course.

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.

big data algo trading artificial intelligence

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.

ai trading crypto

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:

  1. Reliability: Ranging from Kamikaze to High, the reliability tells you about the risk of the proposed setup
  2. Direction : Bullish/bearish
  3. The product: Perp or Inverse Perp
  4. The ticker: BTC/ETH/XRP or EOS
  5. The platform’s Last Traded Price
  6. Order type: Long or Short
  7. TP: Take Profit
  8. 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!

See you on Discord!

FAQ

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.

Already happening in the community
So what's next? Step through the door of grid bots

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.