How AI Trading Bots Work
The technology behind AnalystBuddy's automated signals
📊 Step 1 — Raw Market Data from Binance
AI trading starts with real data. AnalystBuddy calls the Binance REST API to fetch OHLCV (Open, High, Low, Close, Volume) candlestick data for your chosen symbol (e.g. BTCUSDT) across multiple timeframes simultaneously — for example, 1-minute, 15-minute, and 1-hour candles.
Each timeframe provides a different market perspective: short-term candles capture immediate momentum and microstructure; longer timeframes reveal macro trend direction and support/resistance zones. Multi-timeframe analysis is one of the most effective techniques in technical trading.
🧮 Step 2 — Technical Indicators Computed in Real-Time
Raw price data alone isn't enough context for AI analysis. AnalystBuddy computes a suite of technical indicators on the fetched candles before sending anything to Gemini AI:
RSI (Relative Strength Index) — Measures momentum to identify overbought (>70) and oversold (<30) conditions. Classic RSI crossovers are one of the most widely used entry signals in crypto trading.
EMA (Exponential Moving Average) — Tracks trend direction with more weight on recent prices than SMA. Common strategies use EMA-9/21 crossovers for entry signals and EMA-200 for trend context.
MACD (Moving Average Convergence Divergence) — Identifies momentum shifts through MACD line vs signal line crossovers. Divergence between MACD and price is a powerful trend reversal signal.
Bollinger Bands — Measure volatility. Price touching the lower band in an uptrend may signal a BUY opportunity; price at the upper band in a downtrend can signal a SELL.
VWAP (Volume Weighted Average Price) — The average price weighted by volume. Institutional traders use VWAP as a fair value reference; price above VWAP is generally bullish, below bearish.
ATR (Average True Range) — Measures market volatility in price units. AnalystBuddy uses ATR to help Gemini AI calculate appropriate stop-loss distances proportional to current market volatility.
🤖 Step 3 — Gemini AI Interprets the Data
The enriched market data (candlestick summaries + computed indicator values) is sent to Google Gemini AI alongside your custom strategy prompt. The prompt instructs Gemini on how to interpret the data and what constitutes a valid trade signal for your strategy.
Gemini AI is instructed to respond ONLY with a structured JSON object containing: the trade action (BUY / SELL / HOLD), the entry price, the stop-loss price, and the take-profit price. This strict output format ensures AnalystBuddy can reliably parse and act on every signal.
AnalystBuddy supports multiple AI models beyond Gemini — including OpenAI GPT-4o, Anthropic Claude 3.5 Sonnet, DeepSeek Chat, and Mistral Large — giving you the flexibility to compare AI performance for your specific strategy.
⚡ Step 4 — Automatic Order Execution on Binance
When Gemini returns a BUY or SELL signal, AnalystBuddy immediately places a market order on Binance for the configured trading quantity. For Futures trading, leverage is applied as configured per bot.
Immediately after the entry order is confirmed, AnalystBuddy places Stop-Loss and Take-Profit conditional orders using Binance's algoOrder API endpoint. These protect your position automatically — no manual monitoring required.
If the AI returns HOLD, no order is placed. The signal and reasoning are logged for review on the Watch page. The scheduler then waits for the next analysis window before repeating the process.