Automate Stock Trades with AI-Driven Technical Analysis & Alpaca Trading
Go to WorkflowDescription
π AI-Powered Stock Analysis & Auto-Trading Workflow
Supercharge your trading decisions with this end-to-end AI automation that connects market intelligence, technical analysis, and automated trade execution β all without manual intervention.
My results so far:
(100k paper trading account with the current template strategy)
π What This Workflow Does
Live AI-Driven Market Scanning**
Integrates with Danelfinβs AI scoring system to identify top stocks daily based on technical, fundamental, sentiment, and risk scores.
Advanced Technical & Trend Analysis**
Combines chart patterns, Fibonacci retracements, Bollinger Bands, MACD, RSI, EMA trends, and support/resistance detection with real-time news sentiment to produce clear, professional-grade analysis reports.
Chart Image AI Analysis**
Uses LLM-powered vision models to interpret candlestick charts visually and extract pattern, trend, and indicator insights.
Automated Trade Execution**
Integrates with Alpaca Paper Trading API for secure, rule-based buy/sell execution.
Includes:
Risk management (position sizing, stop-loss/take-profit)
Account balance & buying power checks
No-repeat-loss policy
Data Storage & Strategy Memory**
Logs trades, PnL, and objectives in PostgreSQL for ongoing strategy refinement.
Automated Reporting**
Sends deep-dive market and trade reports directly to your email.
π Integrated Services
Danelfin API** β AI-based stock ranking
Supabase Vector Store** β Strategy and knowledge retrieval
TwelveData API** β Market prices & indicators
Chart-img API** β TradingView chart generation
Alphavantage** β News sentiment feed
Alpaca API** β Automated order execution
OpenAI, Anthropic, Cohere, OpenRouter** β Multi-model AI reasoning
π₯ Perfect For
Quantitative analysts testing strategies
Investors looking for data-backed, automated execution
Educational environments for learning AI-based market strategies
People that want to know Real results Results
πΌ What You Get
Full Setup
Pre-configured n8n workflow with all nodes and logic ready to run
Step-by-step API key integration guide for Danelfin, Alpaca, TwelveData, Alphavantage, Chart-img
Database logging setup with PostgreSQL schema
Automated email reporting template
Detailed Description
Explanation of every sub-agent and AI integration
How the strategy agent selects stocks based on AI scores and past trades
Deep technical indicators breakdown (EMA, RSI, MACD, Fibonacci, Bollinger, Support/Resistance)
Risk management methodology and allocation rules
Examples
Daily Automated Analysis:** Every morning the system emails you the top 3 stocks to watch, with price, chart, and sentiment score
Trade Execution:** System buys AAPL with a defined stop-loss and take-profit based on technical setup
Chatbot Mode:** Ask βWhatβs the trend on TSLA?β and get a concise, professional-grade market report instantly
π‘ Why Youβll Love It
This isnβt just an automation β itβs a full-stack AI trading assistant that thinks, analyzes, and executes while keeping risk in check. From sourcing the idea to placing the trade, itβs all covered.
π Get Started
Replace the placeholder API keys, set your trading preferences, and let the automation do the heavy lifting.
This workflow was created by Paul and shared publicly on the n8n community template library. n8nFind indexes it for discovery — the workflow remains the property of its original creator.