An LLM trading agent that reads candlestick charts and keeps memory of its closed trades.
Once per closed candle (4h on the public deployment) it renders a 1920×1080 chart, sends it to a multimodal model with 79 indicators, the news context and its trade memory, then checks the answer with deterministic rules before a paper trade is booked.
- trading
- simulated capital (paper)
- executor
- exchange testnet, no real funds
- tests
- 2,786, ~161 s full suite, ruff and pyright clean
- providers
- DeepSeek (live), Google, OpenRouter, LM Studio
Chart images, not only indicator values
A 1920×1080 Plotly candlestick chart with SMA, RSI, CMF and OBV panels goes to the model with the numeric stack. Trend strength and pattern quality claims are checked against computed values; the model's reading of the picture itself is not verified.
Memory of closed trades
Closed trades are embedded with BAAI/bge-base-en-v1.5 (768 dimensions) into ChromaDB. Before each decision the bot retrieves the three most similar past trades. Each closed trade gets a surprise ratio, and rules carry it, so a lucky outcome is annotated rather than treated as a rule.
Deterministic limits around the model
The model proposes a trade; the symbol guard, the position cap and stop/target validation are deterministic. When the model gives no size, a fallback from the config is used (1–3%, by confidence).
Reasoning and execution are separate processes
The engine emits one JSON decision; a second service places CCXT orders and writes a verdict journal the engine reads back, so the bot confirms what happened to its order instead of assuming it.
Development history
Built by one developer in the evenings. The repository holds 2,786 collected tests, an AGENTS.md per package under src/, and a separate executor service that runs against an exchange testnet.
Read the full history →Articles
Sources
Every number on this page comes from a file in the repository:
chart image 1920x1080 src/analyzer/pattern_engine/chart_generator.py
market data, 50 lvls config/config.ini · src/analyzer/data_fetcher.py
trade memory 768D src/trading/vector_memory.py (BAAI/bge-base-en-v1.5)
risk limits, pre-entry src/trading/position_management.py
agent docs AGENTS.md + one per package under src/ (src/trading, src/analyzer, ...)
tests 2,786 python -m pytest tests -q -> all passing, 0 skipped, ~161 sRisk disclaimer: experimental software, not financial advice. It trades simulated capital by default and has lost money on paper during development.Full disclaimer.