Lab / R&D · autonomous trade executor (demo account)
OpenClaw Trader — an autonomous trade executor, built like a production system
LAB / R&D · demo account only
Disclaimer: OpenClaw Trader is a research and development project with an exclusively educational and technical purpose, operated on a demo account. No financial results are communicated, claimed, or promised. Nothing on this page constitutes investment advice. Trading financial instruments carries a substantial risk of loss and is not suitable for everyone.
Context
OpenClaw Trader runs on an open-source agent runtime and operates exclusively on a demo account. It is on this site for one reason: it demonstrates, under demanding conditions, the same technical rigor as the systems delivered to clients — layered guardrails, auditable code, published measurements.
Problem
Existing copy-trading tools fail in two symmetrical ways: either they trust the upstream signal blindly — one stale entry is enough to put an account at risk — or their logic is locked inside a GUI that cannot be audited. Separately, the first version of the pipeline, where an LLM interpreted every message, took 30 to 118 seconds between signal and order: unusable on entry zones that expire within seconds.
Approach
The principle applied to every DjbrAutomation system: deterministic wherever possible, AI only where necessary. Concretely, a regex parser of about 200 lines handles the fast path (known signal formats), and an LLM only steps in as a fallback for unusual phrasings. Every safety check is a readable, auditable Python branch — not a black box.
What was delivered
- Execution chain: a Telegram listener filters incoming messages (direction, entry, stop-loss, and take-profit mandatory; everything else rejected before the executor), a parser extracts the parameters, then three blocking pre-trade checks run before any order — zone validation (never chase the price), a late-take-profit guard, and a minimum risk/reward threshold. Any single failure short-circuits execution with an explicit “ABANDON” line.
- Volume hard-locked to 0.05 lots in code (any other value forced back down) and TP1 discipline: when a signal carries several take-profits, only the first is honored.
- Nightly learning layer: every closed trade reconstructed from MT5 history, a classifier retrained on a pipeline of about 46 technical indicators, an auto-tuner rewriting the risk thresholds over a rolling 7-day window — under hard limits and with a maximum delta per night to prevent drift.
- Three scheduled jobs: a daily report, an hourly MT5 health check, and the nightly retraining.
Stack
- Python 3.10+
- MetaTrader 5
- Telethon (Telegram listener)
- OpenClaw (agent runtime)
- LLM as fallback only
- scikit-learn (nightly retraining)
- Windows Task Scheduler
- 22 unit tests
- benchmark harness
Observed results
Replacing the LLM pipeline with the regex fast path brought signal-to-order latency from 30–118 s down to 0.84 s (latency divided by 35 to 140×); parsing itself drops from 25–100 s to about 200 µs, and LLM token consumption per signal falls from roughly 22,000 to zero.
REPORT.md + bench.py · reproducible measurements
22 unit tests and the benchmark harness that produces these figures are part of the project.
22 unit tests · benchmark harness · reproducible measurements
What stays human
Choosing which signal channels to follow, defining the hard risk limits the auto-tuner cannot cross, supervising the daily reports — and above all the decision to ever connect a real account, which has not been taken: the project's documented rule requires two consecutive conclusive months on demo first.