This isn't a moonshot
I spent the last few months building and refining an automated trading bot for OKX (US spot). Here's what I learned from live testing, fixing real losses, and locking down risk.
The strategy (AI-weighted scalping)
· Scans 300+ pairs every 7 seconds for market moves
· Uses an AI confidence score (min 50%) and market regime filter (avoids choppy/bear-ish conditions)
· Trailing stop locks in profits after +2% gain
· Hard stop-loss on every trade: -1.5% to -2.5% (depending on strategy)
· Cooldown after any loss (30 min – 2 hours) to avoid revenge trading
· Daily loss cap: bot shuts down for the day if total losses hit 3–5%
· Only trades a whitelist of 30 top-cap coins (BTC, ETH, SOL, ADA, etc.) — blacklist for anything that failed before
What I learned (the hard way)
- Stop-loss must be hard-coded and checked every cycle. An early version set stop-losses in the database but never placed them on the exchange. A database sync event wiped them, and two positions sat unprotected, bleeding -21% and -10% before I caught it. Every buy now has an automatic stop-loss at the code level — never trusting the DB alone again.
- Coin whitelist is not optional. The bot originally scanned all OKX tickers. It bought illiquid low-cap coins (FLUID, BASED, etc.) that couldn't even be sold on OKX US. Sell orders kept failing with "All operations failed" while the positions sank. Now only 30 established coins are tradeable, period.
- Cool down after a loss. Without a cooldown, the bot would hit a stop-loss and immediately buy another coin that also dropped. A simple timer after each losing trade dropped the daily loss rate significantly.
- Multiple trading systems silently conflict. At one point I had three separate bots running against the same account (Node.js executor, Python spot bot, Python futures bot). They all had different configs, some with stop-loss disabled entirely. Consolidating to one system with unified risk controls was the biggest stability win.
Results (from recent controlled forward-testing)
· Win rate: ~60% on closed trades
· Average win: +2.5% to +4.5%
· Average loss: -1.5% to -2.5%
· Max drawdown days: stopped early by daily loss limit
This isn't a moonshot bot. It's designed to preserve capital first, then grow slowly with small, frequent wins. Every safeguard I added came from a real loss that I never want a user to experience. The bot now runs 24/7 on a VPS with Telegram notifications for every buy/sell/stop-loss event.
Happy to answer questions about the strategy or risk controls. Imali-Defi.com noncustodial trading.