AI Trading Assistant — Telegram + TradingView Charts + Technical Analysis
Summary
This workflow turns your Telegram bot into a complete AI-powered Trading Assistant.
Users can send any ticker symbol (e.g., AAPL, TSLA, XAUUSD, EURUSD 1h) and instantly receive:
- A real-time TradingView-style chart
- A professional AI-generated technical analysis
- Key metrics: RSI, MACD, SMA20/50, ATR, volatility %, support & resistance
- Clean Telegram-friendly Markdown output
Perfect for traders, analysts, crypto/forex groups, community bots, or personal automation.
Overview
This workflow automates the entire lifecycle of market analysis:
- Receives a ticker symbol from Telegram
- Fetches real market data from TwelveData
- Computes technical indicators
- Converts the symbol to TradingView format
- Generates a full chart using Chart-IMG
- Produces an AI-written analysis using OpenAI
- Sends both back to Telegram
The result is a self-contained AI trading system built entirely inside n8n — no coding needed.
Key Features
Telegram Interface
Users message your bot directly with a ticker like:
AAPL
TSLA 1h
XAUUSD 1day
BTCUSD 4h
Intelligent Symbol Parsing
Automatically extracts:
Ticker
Interval
Removes command prefixes (/chart, /stock, etc.)
Defaults safely when no interval is provided
Market Data (via TwelveData)
Pulls:
100-candle OHLC time series
RSI(14)
MACD (macd, signal, hist)
Technical Indicator Engine (Custom JS)
Calculates:
Price change %
RSI interpretation
MACD momentum
SMA20 & SMA50 averages
SMA crossover direction
ATR14
Volatility %
Support / resistance from recent highs/lows
Bullish / Bearish / Neutral stance
TradingView Symbol Converter
Converts any instrument into proper format:
AAPL → NASDAQ:AAPL
TSLA → NASDAQ:TSLA
AMD → NASDAQ:AMD
XAUUSD → OANDA:XAUUSD
EURUSD → OANDA:EURUSD
BTCUSD → CRYPTO:BTCUSD
Interval Mapper
Converts intervals:
1h → 60
4h → 240
1day → 1D
1week → 1W
Chart Rendering (via Chart-IMG)
Generates a TradingView-style chart with:
Candlesticks
Volume
RSI
Stochastic RSI
Returns a shareable chart URL.
AI Market Summary (OpenAI)
GPT-4 produces:
Trend explanation
Momentum view
Overbought/oversold signals
MACD interpretation
Volatility context
IF/ELSE level map
Final stance summary
Formatted in perfect Telegram-friendly Markdown.
Telegram Output
The bot replies with:
Chart image
AI-generated analysis
Clear & clean formatting
How it Works (Node-by-Node)
- Telegram Trigger
Captures every message sent to the bot.
- Parse User Input
Extracts:
Symbol
Interval
Chat ID
Normalizes text and handles errors gracefully.
- Credential Loader
Imports all API keys from n8n Credentials Manager:
TwelveData
OpenAI
Chart-IMG
Telegram Bot Token
- Symbol Search
Matches user ticker with the correct asset.
- Market Data Retrieval
Fetches:
OHLC candles
RSI
MACD
- Merge Indicators
Combines all data into a single unified object.
- Technical Analysis Engine
Calculates every indicator, level, and stance.
- TradingView Format Conversion
Converts ticker + interval into proper TradingView format.
- Chart Generator
Requests chart rendering from Chart-IMG.
- OpenAI Summary Generator
Creates a structured market summary.
- Telegram Output
Sends:
The chart
AI analysis
Market stance
Requirements
Before activating the workflow, configure:
Telegram Bot Credentials
TwelveData API Key
Chart-IMG API Key
OpenAI API Key
All API keys must be stored in the n8n Credentials Manager.
No secrets exist in the workflow (Marketplace compliant).
Usage Examples
Send to Telegram bot:
AAPL
TSLA 1h
GOLD 4h
EURUSD 15min
BTCUSD 1day
Bot replies with:
Live chart
Technical summary
RSI / MACD
SMA crossovers
Support & resistance
Bullish/Bearish/Neutral stance
Use Cases
Traders wanting instant analysis
Telegram financial group automation
Private or public trading bot
Forex analysis bot
Crypto signal bot
Portfolio and watchlist monitoring
AI-based charting tool
Compliance Notes
No hardcoded API keys
Uses Sticky Notes for clarity
All logic is original
Works on both n8n Cloud & Self-Hosted
Meets Marketplace requirements
Final Output
Every time a user sends a ticker:
➡ Chart-IMG generates a TradingView chart
➡ GPT analyzes market structure
➡ Telegram bot replies instantly
This workflow turns n8n into a full AI Trading Intelligence System—all automated, all real-time.