TL;DR
Build an AI agent that reads financial charts like a pro trader. This workflow combines TradingView's chart API with Claude's vision capabilities to analyze candlestick patterns, RSI, volume, and trends. Ask it about any stock ticker in plain English and get instant technical analysis complete with charts and markdown-formatted insights.
| Difficulty | Who's It For | Problem It Solves | Time to Build | Tools Used |
|---|---|---|---|---|
| ⭐⭐⭐⭐ | Traders, finance folks, anyone drowning in chart analysis | Eliminates hours of manual chart reading and pattern recognition | 45 minutes | n8n, Anthropic Claude, TradingView, ChartImage.com |
- Algorithmic and AI-driven trading now accounts for 60–73% of all US equity trading volume (Bloomberg, 2025)
- AI chart pattern recognition processes visual data up to 40× faster than manual analysis
- The AI trading tools market is projected to reach $47.2 billion by 2031, growing at 10.5% CAGR (MarketsandMarkets)
- Retail investors using AI analysis tools reported a 12% performance edge over manual-only approaches in backtested strategies (Wall Street Zen, 2026)
David has a confession: he once spent three hours analyzing a stock chart only to realize he'd been looking at the six-month view when he meant to check the daily. The AI told him this in about eight seconds, with what I can only describe as algorithmic smugness. If you've ever squinted at candlesticks wondering if that's a bullish engulfing pattern or just your screen being dirty, this one's for you.
What This Workflow Does
Technical analysis is part science, part art, and mostly staring at charts until patterns emerge from the chaos. This workflow automates the science part by building an AI agent that can analyze financial charts on demand.
Here's what happens when you ask it to analyze a stock: The agent receives your question through a chat interface, fires up a specialized sub-workflow that fetches real-time chart data from TradingView via the ChartImage API, downloads the rendered chart image, feeds it into Claude's vision model along with your specific question, and returns a detailed analysis covering candlestick patterns, RSI indicators, directional movement, volume trends, and overall market direction.
The clever bit is the architecture. Rather than cramming everything into one bloated workflow, it uses a main agent with a tool that calls a separate analysis workflow. This modular approach means you can reuse the technical analysis component across different projects, and the conversational memory ensures the agent remembers your previous questions in the same session.
Quick Start Guide
You'll need three accounts before building this. First, grab an Anthropic API key from console.anthropic.com. Claude's vision capabilities are central here, and you'll want access to Claude 3 Sonnet or better. The free tier works for testing, but you'll burn through credits quickly if you're analyzing dozens of charts daily.
Second, head to ChartImage.com and sign up for their chart generation API. This service transforms TradingView data into clean PNG charts that Claude can actually read. The free tier allows a few hundred chart generations per month, which is plenty for personal use. Finally, you'll need a TradingView account to understand ticker symbols and chart configurations, though you don't need their paid API access.
The workflow structure uses n8n's AI agent capabilities extensively, so make sure you're running a version that supports LangChain nodes. If you're still on an older build, this is your excuse to update. Not familiar with n8n yet? Our complete n8n beginner's guide covers everything before you dive in. Import the workflow, add your Anthropic credentials to both chat model nodes, configure the ChartImage API endpoints in the HTTP request nodes, and you're ready to start asking questions about stock movements.
Building Your Chart-Reading AI
Start with the conversational layer. The Chat Trigger node creates your interface for asking questions. Think of this as your trading desk phone line. Someone calls in with "What's happening with AAPL today?" and the trigger wakes up your agent to handle it. Configure it to accept messages from your preferred channel, whether that's a web interface, Slack, or even SMS if you're feeling fancy.
The Technical Analysis Agent node is where the magic orchestration happens. This isn't just a simple LLM call. It's a reasoning loop that can decide when to fetch charts and when to just answer from memory. Connect it to the Anthropic Chat Model set to Claude 3 Sonnet or Opus. The agent needs the horsepower for both vision processing and conversational quality.
Add the Window Buffer Memory component to keep track of conversation history. Set the buffer to remember the last five to ten exchanges. This lets you ask follow-up questions like "What about the weekly chart?" without repeating the ticker symbol. The memory knows you're still talking about Apple.
Now for the analysis sub-workflow. Create a new workflow triggered by the Execute Workflow Trigger node. This keeps your chart analysis logic separate and reusable. The first node in this sub-workflow should be a Settings node that extracts the ticker symbol and timeframe from the incoming request.
Chain two HTTP Request nodes together. The first one calls the ChartImage API to generate your TradingView chart. You'll construct a URL that specifies the ticker, indicators like RSI and DMI, and the timeframe. The API returns a direct link to the generated chart image. The second HTTP Request node downloads that image as binary data, which you'll pass to Claude's vision model.
For Advanced Readers: The ChartImage URL structure looks like this: https://api.chart-img.com/v1/tradingview/advanced-chart?symbol=NASDAQ:AAPL&interval=D&studies=RSI,DMI&theme=dark. You can add multiple technical indicators by comma-separating them in the studies parameter. The interval accepts values like 1, 5, 15, 60 for minute charts or D, W, M for daily, weekly, and monthly views.
Connect the downloaded chart to a LangChain LLM Chain node configured with your second Anthropic Chat Model. This is where you craft the prompt that tells Claude what to look for. Ask it to identify candlestick patterns, interpret RSI levels, check DMI for trend direction, analyze volume compared to recent averages, and provide an overall bullish or bearish assessment. Be specific about the format you want back.
The final node formats the response. Use a Set node to construct a clean markdown output that includes both the chart image URL and Claude's analysis. This makes it easy to render in chat interfaces or email reports. Your main agent workflow calls this sub-workflow as a tool, receives the formatted analysis, and passes it back to the user with memory intact.
For Advanced Readers: The connections object in the workflow JSON shows how data flows through the agent's reasoning loop. The chatTrigger feeds the agent, which has three inputs: the language model for reasoning, the memory for context, and the toolWorkflow for chart analysis. When the agent determines it needs visual data, it invokes the tool, waits for the sub-workflow to complete, and incorporates those results into its response. This architecture prevents the main workflow from becoming unwieldy while keeping the conversational flow smooth.
Key Learnings
The first major concept here is AI agent tool orchestration. Unlike simple prompt-and-response setups, agents can decide which tools to use based on the question. Ask about company fundamentals and it might skip the chart entirely. Ask about price action and it knows to fetch visual data. This decision-making layer transforms a chatbot into something that actually assists rather than just parrots.
Vision model integration is the second unlock. Claude doesn't just see images, it understands context within them. Feed it a candlestick chart and it recognizes patterns that would take humans minutes to spot. The key is prompt engineering: tell the model exactly what indicators matter for your use case. Generic "analyze this chart" requests get generic responses. Specific "identify the RSI divergence and relate it to the current price action" prompts get actionable insights.
Workflow modularity rounds out the lessons. By splitting the chart analysis into its own workflow, you create a reusable component. Need chart analysis in your morning briefing automation? Call the same workflow. Want to analyze charts in batch for portfolio reviews? Loop through tickers and invoke the workflow repeatedly. The Execute Workflow Trigger pattern is n8n's version of functions in programming: write once, use everywhere.
What's Next
The real test of any automation is whether you actually use it. Deploy this to a Slack channel where your team discusses trades. Hook it up to your morning routine workflow to get overnight market analysis before your coffee gets cold. Add a cron trigger that checks your watchlist every hour and alerts you when the AI spots pattern breakouts.
Looking to expand your trading AI toolkit? You might also enjoy letting AI analyze screenshots of your existing stock positions for quick portfolio reads, or turning your browser into a full AI trading analyst without any backend infrastructure. All three workflows complement each other well.
Watch how a solo developer built a similar no-code stock analyst AI agent from scratch using n8n:
David would tell you to start small and iterate, which is rich coming from someone who spent his first week with n8n trying to automate his entire life before successfully automating his grocery list. But he's right. Get the basic chart analysis working, use it for a few days, then add features like sentiment analysis from news headlines or comparison mode that analyzes multiple tickers side-by-side.
The financial markets generate more data than any human can process. This workflow doesn't replace your judgment, it amplifies it. Build it, break it, make it yours, and ship something that turns chart overload into actionable intelligence.
Last updated: February 19, 2026
Frequently Asked Questions
How much does it cost to run this AI stock chart analysis workflow?
Running costs are minimal. Claude 3 Sonnet charges approximately $0.003 per 1,000 input tokens and $0.015 per 1,000 output tokens. Each chart analysis request typically uses 1,000–2,500 tokens including the image, coming to roughly $0.01–$0.05 per analysis. ChartImage.com's free tier covers several hundred chart generations monthly. For active traders analyzing 10–20 charts per day, expect to spend $3–15/month total on API costs.
Can this workflow analyze cryptocurrency charts too?
Yes. ChartImage.com supports crypto tickers via TradingView — just use the correct exchange prefix in your symbol (e.g., BINANCE:BTCUSDT or COINBASE:ETHUSD). The Claude vision model analyzes whatever chart it receives, so BTC candlesticks, Ethereum RSI, and altcoin volume patterns work exactly the same as equities. The workflow is exchange-agnostic by design.
How accurate is the AI's technical analysis compared to a human trader?
The AI excels at pattern identification speed and consistency — it won't miss a head-and-shoulders pattern because it's tired or distracted. Think of it as a very fast, systematic analyst: excellent for pattern recognition, indicator reading, and hypothesis generation, but requiring your judgment for final trading decisions. Never treat AI chart analysis as financial advice.
Can I swap Claude for GPT-4 Vision or Gemini Pro Vision?
Absolutely. n8n's LangChain LLM Chain node supports multiple model providers. Replace the Anthropic Chat Model node with an OpenAI node (using gpt-4o) or a Google Gemini node. The architecture remains identical. Claude tends to give more verbose, structured analysis; GPT-4o is often more concise. Running a quick A/B comparison across models is a worthwhile experiment.
