OPEN-SOURCE SCRIPT

CVD Divergence Strategy – Backtest v6 + UI

323
🚀 Advanced crypto backtesting strategy using CVD divergence, Open Interest simulation, ATR-based entries and exits, and a full visual UI – now with test mode switch!
Designed to help traders explore momentum exhaustion, buyer/seller imbalance, and precise risk/reward setups.
🔍 Features:

✅ CVD Divergence Detection
Detects bullish and bearish divergences between price action and cumulative volume delta

✅ Simulated Open Interest Filter
Signals require rising OI (approximated via volume delta) – optional in test mode

✅ ATR-Based Risk/Reward System
Entry/Stop/Target are dynamically calculated with a customizable R-multiple (e.g. 1.5R)

✅ Direction Filter
Dropdown lets you test Long Only, Short Only, or Both directions

✅ Strategy Tester Integration
Full backtesting support using TradingView’s built-in metrics

✅ 📊 Chart Overlay Reporting
Shows total trades, win rate %, and net profit directly on the chart

✅ 🖥️ Live Dashboard Panel
Displays current signal status, ATR, CVD, OI change and entry mode

✅ 🧪 Built-in TEST MODE
Use the checkbox to activate a simplified signal logic to ensure trades are fired for testing purposes
⚠ Notes:

CVD is based on volume delta: volume * sign(close - open)

Open Interest is simulated using volume changes (since real OI is unavailable in Pine Script)

Best used on futures symbols like BINANCE:BTCUSDT, BYBIT:ETHUSDT.P, etc., in 5–30min timeframes

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.