AI Trading Bot with a Claude Analyst
A rules-based forex and stock backtest where Claude approves or blocks every trade, built with strict risk limits.
- Status
- Backtest and paper trading only
- Year
- 2026
- Built with
- Python, Claude (Anthropic API), OANDA practice API

I wanted to see how far AI automation can go in a field where mistakes cost real money. The goal was not a get-rich bot, but a system with clear rules, a second opinion on every decision and hard safety limits.
The bot follows a classic rules strategy on hourly candles: an EMA crossover for direction, an RSI filter to avoid chasing moves, and ATR-based stop losses. It watches EUR/USD and GBP/USD through OANDA and Apple and Microsoft stock through Alpaca, all on practice accounts.
Every signal then goes to Claude acting as an analyst, which approves or rejects the trade. It fails closed: if anything goes wrong, no trade is placed. A risk manager caps each trade at 1% of the account, allows at most three open positions and stops trading for the day after a 3% loss. Real-money trading is locked behind an explicit setting.
I tested it honestly first. On about two years of hourly data, only Apple came out positive (+16.5%, profit factor 1.52). EUR/USD and GBP/USD each lost about 10% and Microsoft 16.3%. In other words, the strategy is not profitable yet, which is exactly why it stays on paper.
What I learned: the safety layer and the backtester are the most valuable parts. They make it easy to prove an idea wrong before it costs anything, and a dashboard that shows every decision builds the kind of trust a black box never does.

Let's build something great
Tell me about your project in a free 30-minute call. No pressure, just a clear plan.
Book A CallReady to build something great?
Let's make it happen!

Butch Orpeza
© 2026 by Butch Orpeza
butchorpeza.com
Message Me: