π CryptomarketAI: Autonomous Market Technical Analysis Agent
Conversational AI trading agent delivering Wall Street-grade technical analysis directly on Telegram.
Powered by GPT-4o Vision, LangChain memory, Chart-img API, and n8n autonomous orchestration.
π― Overview
Stop spending hours buried beneath multi-monitor chart setups. CryptomarketAI transforms a conversational Telegram bot into a 24/7 personal market analyst. Simply message "Analyze BTCUSD", and the agent automatically executes an institutional-grade technical analysis pipeline:
- Chart-img API Integration: Fetches high-resolution candlestick charts directly from TradingView, complete with 14-period RSI and MACD indicators.
- GPT-4o Vision Parsing: Examines candlesticks, trend patterns, and momentum oscillators like an experienced human charter.
- Conversational Memory: Retains chat context (last 10 interactions) using LangChain memory for contextual follow-up inquiries.
- Autonomous Decision-Making: Orchestrated via a dynamic LangChain Tool-Calling Agent inside n8n.
ποΈ Architecture & Execution Flow
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MAIN WORKFLOW β
β Telegram β AI Agent (LangChain) β [fetch_chart tool] β Out β
β β β
β GPT-4o + Context Memory β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β TOOL SUB-WORKFLOW β
β Symbol Parser β Chart-img API β GPT-4o Vision β β
β β Deliver Candlestick Chart + Structured Report on Telegramβ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Analysis Dimension |
Details |
| π Trend Detection |
Directional bias (Bullish / Bearish / Accumulation / Distribution) |
| π― Key Price Levels |
Immediate support and resistance barriers with high liquidity confluence |
| π Momentum Oscillators |
RSI overbought/oversold states, MACD crossovers & divergence detection |
| β° Tactical Outlook |
High-probability short-term trade scenario planning |
| π¬ Conversational Context |
10-message conversational buffer for persistent session dialogue |
π¬ Interactive Example
User:
Analyze BTCUSD on 1h
Agent:
π BTC/USD (1H) Technical Analysis Report
ββββββββββββββββββββββββββββββββββββββββ
π Current Price: $96,420
π Directional Bias: Bullish Momentum (Ascending Channel)
π― Key Levels:
β’ Resistance 1: $97,800 (Local high liquidity wick)
β’ Resistance 2: $99,200 (Psychological breakout target)
β’ Support 1: $95,300 (20 EMA & Value Area High)
β’ Support 2: $93,800 (Ascending Trendline Confluence)
π Momentum Oscillators:
β’ RSI (14): 62.4 β Bullish expansion with healthy room before overbought (>70)
β’ MACD: Bullish crossover confirmed with expanding positive histogram
π‘ Tactical Outlook:
Price consolidating above the $96,000 baseline. High probability of testing
$97,800 liquidity if hourly candles close above $96,500.
[Sent with full dark-mode TradingView 1H Candlestick Chart with RSI + MACD]
π Quickstart & Deployment
Step 1: Prerequisites
Step 2: Spin Up n8n
docker run -d \
--name n8n \
-p 5678:5678 \
-v n8n_data:/home/node/.n8n \
n8nio/n8n
Access the n8n console at http://localhost:5678.
Step 3: Import Workflow
- Navigate to Workflows β Import from File.
- Select
xCodeWraith Market Teknik Analiz Agent AI.json.
- Click Import.
Step 4: Configure Credentials
In Settings β Credentials, set up:
- Telegram API: Paste your BotFather token.
- OpenAI API: Paste your OpenAI secret key (
sk-...).
- Chart-img API (Header Auth):
- Header Name:
Authorization
- Header Value:
Bearer YOUR_CHARTIMG_API_KEY
Step 5: Self-Referencing Tool Setup
This workflow utilizes a modular self-referencing sub-workflow structure:
- Note the workflow ID in the browser URL (
http://localhost:5678/workflow/<WORKFLOW_ID>).
- Open the Grafik Γek / Fetch Chart node.
- Select this workflow under Workflow to Call (either by selection or ID).
- Save and activate the workflow toggle.
π§ Technical Details & Chart Configuration
Chart-img Payload Specification
{
"symbol": "BINANCE:BTCUSD",
"interval": "1h",
"width": 800,
"height": 600,
"style": "candle",
"theme": "dark",
"timezone": "UTC",
"studies": [
{ "name": "RSI", "inputs": { "length": 14 } },
{ "name": "MACD" }
]
}
π¨βπ» Author
xCodeWraith
GitHub: @xCodeWraith
X (Twitter): @DEV
π License & Disclaimer
This project is licensed under the MIT License.
Disclaimer: This software is strictly for informational, educational, and research purposes. It does not constitute financial, investment, or trading advice. Cryptocurrency trading involves substantial financial risk. The author accepts no liability for any trading losses incurred through the use of this software.