How I built an FVG trading bot for OKX and made 99% of its signals useless on purpose
How I built an FVG trading bot for OKX and made 99% of its signals useless on purpose If you trade crypto futures, you know the drill. You're staring at the chart at 3am because you're scared to blink and miss "the perfect entry". Or worse, you get in emotionally, chase a pump, and hand back all your profit in one bad night. I got liquidated once because my stop was at -5% and the liquidation price was at -2%. Price gapped straight through my stop. That's how this project started. I built FVG Killer , a bot that trades one setup only: the ICT Fair Value Gap, on OKX perpetuals. The repo is open-source: https://github.com/Xbs950812/okx_fvg_agent 1. What it trades FVG stands for Fair Value Gap, from the ICT (Inner Circle Trader) framework. The idea is simple: one violent candle moves price fast and leaves a "vacuum" where almost nobody got filled. The theory says market makers rebalance and price tends to come back and fill at least half of that vacuum. So the bot waits for price to retrace into the gap, enters, takes profit at the 50% level (consequent encroachment in ICT-speak), and stops out outside the gap. Detection pipeline: Pre-filter: at least a 3-sigma move and 5x volume expansion Three-candle gap detection, scanning 1H and 4H It tracks the top 100 contracts around the clock, even when it holds nothing 2. The part nobody tells you: saying no Textbooks show you three candles and call it a day. Reality: a naive detector spits out dozens of signals a day and 99% of them are garbage. I built five gates to reject them. Each has a real log line from production: Freshness: gap older than ~100 candles? Drop it. [Freshness] SNXX 1H FVG 186 candles old > 24, drop ATR grade: gap width less than 0.5x ATR is a weak setup. [ATRGrade] width 0.16/ATR 0.37 = 0.43 < 0.5, weak C-grade Direction: don't long a coin that just pumped 14%, don't short one that dumped. [MoverDir] ETHFI 4H long rejected: +14.4% in 24h Depth: if the resting order is 6% off price, you're catching a falli