abyXsmart/Confluence_Reversal_Engine
<!-- ═══════════════════════════════════════════════════════════════════════════════ ⚠️ DO NOT EDIT THE YAML METADATA BLOCK ABOVE THIS LINE. Hugging Face Spaces parses that front-matter to configure the Space (SDK, version, entrypoint, card). Changing a key or breaking the YAML will cause the Space to fail to build or mis-render its card. Edit the human-readable documentation BELOW this comment only. ═══════════════════════════════════════════════════════════════════════════════ -->
🚀 Confluence Reversal Crypto Engine (CRE) v1.0
A crypto-futures reversal signal engine. CRE scans the whole USDT-perp market (filtered down to the liquid, tradeable names), and scores high-probability mean-reversion setups by combining four independent, confluent data layers into a single score. Strong setups are pushed to Telegram and shown on a live dashboard.
This is a measurement instrument first, a signal bot second. Its honest purpose for the first 1–2 months is to log and prove whether the edge exists — not to promise profit. Signals are not financial advice.
What It Does
Weighted score → tier WATCH / SETUP / SNIPER. SETUP and SNIPER fire alerts; WATCH is logged silently. Full strategy logic, formulas, and risk rules live in SKILL.md.
Data source: OKX public API (no key) — the one free, geo-reachable exchange that exposes all four layers (Binance/Bybit are geo-blocked on most free hosts). Each signal is about the coin, not the venue — so you can act on it on Bybit, Binance, or anywhere.
Universe: dynamic. CRE rebuilds its watchlist hourly from all OKX USDT perps, keeping the liquid ones (24h turnover filter) and dropping stablecoins/junk. One liquidation stream watches the entire market; only coins that actually flush get the heavy per-coin scoring — so a wide universe stays cheap. Set WATCHLIST to pin a fixed list instead.
Each signal carries a TV link (TradingView, on your chosen exchange) and a Chart (an annotated screenshot marking FVG, swings, BoS, and the entry/stop/target levels).
Configuration (Space Secrets & Variables)
Telegram token + chat id are SECRETS (encrypted, not publicly visible). The Variables tab is the one visible to anyone who can see the Space — never put the token there.
Persistence — HF Storage Bucket (recommended)
CRE persists its database to an HF Storage Bucket so state survives restarts and sleep: on boot it restores the DB from the bucket, then syncs it back periodically and on shutdown. After a reboot the dashboard reloads the last state and continues — open trades and full signal history are recalled.
- How: SQLite runs on the Space's fast local disk (reliable file locking); a background sync worker mirrors it to the bucket. We deliberately do not run SQLite directly on a mounted bucket — object storage doesn't support SQLite's locking safely. Snapshot/restore is the robust pattern (the same approach HF's own tools use).
- Setup: create a bucket, add secret
HF_TOKEN(write scope) + variableCRE_BUCKET(owner/bucket-name). SeeHF_SETUP.md. The DB is only megabytes, so storage cost is minimal. - Without a bucket: CRE still runs fully (ephemeral
DB_PATH=./cre.db), but history resets on restart — fine for evaluation, not for a long-running track record. - Sleep behavior: free Spaces sleep after ~48h with no UI traffic; a sleeping Space cannot poll or alert. CRE handles sleep/wake gracefully — gap-marked liquidation buckets are excluded from baselines.
Disclaimer
CRE is an experimental research tool. Mean-reversion strategies lose in strong trends; expect losing streaks. Judge the system on 100+ logged signals, not on 10. The log records alerted levels, not your actual fills. Nothing here is financial advice. Trade at your own risk.
Built from the Confluence Reversal Engine v1.0 specification, optimized against live data. Strategy thresholds are version-controlled config — change them deliberately, never silently.
