Dev.to
7/29/2026

Building an LLM Trading Bot: From Failed Prompts to Visual Chart Inference with Gemini
Original: LLM TRADER BOT
Short summary
A developer shares lessons from building an LLM-based trading bot, moving from failed text-prompt approaches to feeding 4K candlestick chart images to Google Gemini 3.6 Flash for visual pattern inference. The bot uses 50 custom JIT-compiled NumPy/Numba indicators running on CPU, a single-prompt dual-perspective bull/bear analysis strategy, and an expected-value framework with Kelly fraction position sizing. The author claims the AI's visual reads outperformed hand-coded pattern detection algorithms.
- •Feeding candlestick chart images to Gemini for visual inference outperformed hand-coded pattern detection
- •50 custom JIT-compiled technical indicators built from scratch with NumPy and Numba, no external TA libraries
- •Single-prompt dual bull/bear analysis approach saves API tokens vs multi-agent architectures
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



