
Posts → @plusxbt
Prompt (paste into Claude Code, fill in the brackets):
Build a crypto trading bot in this folder. Show the plan before writing any code
Settings:
Exchange: [EXCHANGE]
Pairs: [BTC/USDT, ETH/USDT]
Timeframe: [1h]
Capital: [AMOUNT]
1. Regime detector: each bar, classify market SIDEWAYS / CHOPPY / DUMP via ADX + ATR over 50 bars. Playbook per regime: mean reversion sideways, smaller size or skip choppy, no new longs in dump
2. Risk before EVERY order: max 1% equity per trade (size = 1% equity / stop distance), stop-loss required, max 3 positions, daily loss 3% -> no trades until next UTC day
3. Kill switch: equity 15% below peak -> close all, save HALT flag + peak to disk, stay halted across restarts until I delete the flag; 15% default in config; test halt survives restart
4. Backtest gate: each strategy on 3+ years with fees, slippage + unseen out-of-sample window. Tune params in-sample only; refuse if loss or drawdown >15% in-sample OR out-of-sample; print both
5. Paper default: simulated orders on live prices, no real money. LIVE false unless .env has exactly LIVE=true set by me by hand; never set it yourself, in .env, code or defaults; test no real order fires without it. .env in .gitignore, .env.example with empties; never open or cat .env; paper loads no keys, public data only. Keys from .env live only, never print/commit, redact from logs and report.md. Trade-only keys; if API exposes permissions, refuse when withdrawals enabled
6. Nightly review: cron claude -p, --allowedTools reads trades/logs + writes report.md only; no --dangerously-skip-permissions, no shell, no .env. Writes mistakes + max 3 param proposals. Never applies; I approve; approved changes re-run tests + backtest gate
7. Tests for all risk rules + full diff before running anything