nOI + Funding + CVD • strategy by RezzoRedPriest
By RezzoRedPriest
Performance Metrics
- Author: RezzoRedPriest
- Symbol: BINANCE:ESPORTSUSDT.P
- Timeframe: 5 minutes
- Net P&L: +246,698.55 USDT (+24.67%)
- Win Rate: 68.2%
- Profit Factor: 4.068
- Max Drawdown: 23,279.49 USDT (2.18%)
- Total Trades: 88
Description
nOI + Funding + CVD StrategyOverviewThis strategy is designed for cryptocurrency trading on platforms like TradingView, focusing on perpetual futures markets. It combines three key indicators—Normalized Open Interest (nOI), Funding Rate, and Cumulative Volume Delta (CVD)—to generate buy and sell signals for long and short positions. The strategy aims to capitalize on market imbalances, such as overextended open interest, funding rate extremes, and volume deltas, which often signal potential reversals or continuations in trending markets.The script supports pyramiding (up to 10 positions), uses percentage-based position sizing (default 10% of equity per trade), and allows customization of trade directions (longs and shorts can be enabled/disabled independently). It includes multiple signal systems for entries, various exit mechanisms (including stop-loss, take-profit, time-based exits, and conditional closes based on indicators), a Martingale add-on system for averaging positions during drawdowns, and handling of opposite signals (ignore, close, or reverse).This strategy is not financial advice; backtest thoroughly and use at your own risk. It requires data sources for Open Interest (OI) and Funding Rates, which are fetched via TradingView's security functions (e.g., from Binance for funding premiums).Key Indicators1. Normalized Open Interest (nOI)Group: Open InterestPurpose: Measures the relative level of open interest over a lookback window to identify overbought (high OI) or oversold (low OI) conditions, which can indicate potential exhaustion in trends.Calculation:Fetches OI data (close) from the symbol's standard ticker (e.g., "{symbol}_OI").Normalizes OI within a user-defined window (default: 500 bars) using min-max scaling: (OI - min_OI) / (max_OI - min_OI) * 100.Upper threshold (default: 70%): Signals potential short opportunities when crossed from above.Lower threshold (default: 30%): Signals potential long opportunities when crossed from below.Visualization: Plotted as a line (teal above upper, red below lower, gray in between). Horizontal lines at upper, mid (50%), lower, and a separator at 102%.Notes: Handles non-crypto symbols by adjusting timeframe to daily if intraday. Errors if no OI data available.2. Funding RateGroup: Funding RatePurpose: Tracks the average funding rate (premium index) to detect market sentiment extremes. Positive funding suggests bull bias (longs pay shorts), negative suggests bear bias.Calculation:Fetches premium index data from Binance (e.g., "binance:{base}usdt_premium").Supports lower timeframe aggregation (default: enabled, using 1-min TF) for smoother data.Averages open and close premiums, clamps values, and scales/shifts for plotting (base: 150, scale: 1000x).Upper threshold (default: 1.0%): Overheat for shorts.Lower threshold (default: 1.0%): Overcool for longs.Ultra level (default: 1.8%): Extreme for additional short signals.Smoothing: Uses inverse weighted moving average (IWMA) or lower-TF aggregation to reduce noise.Visualization: Shifted plot (green positive, red negative) with filled areas. Horizontal lines for overheat, overcool, base (0%), and ultra.Notes: Custom ticker option for non-standard symbols.3. Cumulative Volume Delta (CVD)Group: CVD (Cumulative Volume Delta)Purpose: Measures net buying/selling pressure via volume delta, normalized to identify divergences or confirmations with price.Calculation:Delta: +volume if close > open, -volume if close upper threshold, falling over N bars (default: 3), delta ≥ threshold (default: 3%), funding > overheat, and CVD filter OK.Buy (Long): nOI over, nOI lower.Combined: Sell if A/B/C active; Buy if A/D active.Entry FiltersCooldown: Optional pause between entries (default: false, 3 bars).Max Entries: Limit pyramiding (default: true, 6 max).Entries only if both filters pass and direction allowed.Opposite Signal HandlingMode: Ignore (default), Reverse (close and enter opposite), or Close (exit only).Processed before regular entries.Position ManagementMartingale (3 Steps):Enabled per step (default: all true).Triggers add-ons at loss levels (defaults: 5%, 8%, 11%) by adding % to position (default: 100% each).Resets on position close.Break Even:Enabled (default: true).Activates at profit threshold (default: 5%), sets SL better by offset (default: 0.1%).Exit SystemsMultiple exits checked in sequence.Exit 1: SL/TPEnabled: Separate for long/short (default: true).SL: % from avg price (defaults: 1% long/short).TP: % from avg price (defaults: 2% long/short).Exit 2: FundingEnabled: Separate for long (up) / short (down) (default: true).Long Exit: Funding > upper exit threshold (default: 0.8%).Short Exit: Funding upper exit (default: 85%).Short Exit: nOI < lower exit (default: 15%).Exit 4: Global SLEnabled: Default true.Exit: If position loss ≥ % (default: 7%).Exit 5: Break Even (integrated in position block)Exit 6: Time LimitEnabled: Separate for long/short (default: true).Exit: After N bars in trade (defaults: 30 each).Timer updates on add-ons if enabled (default: true).Visual ElementsBuy/Sell Labels: Small labels ("BUY"/"SELL") on bars with signals, limited to last 30.All indicators plotted on a separate pane (overlay=false).Usage NotesBacktesting: Adjust parameters based on asset/timeframe. Test on historical data.Data Requirements: Works best on crypto perps with OI and funding data.Risk Management: Incorporates SL/TP and global SL; monitor drawdowns with Martingale.Customization: All thresholds, enables, and scales are inputs for fine-tuning.Version: Pine Script v6.For questions or improvements, contact the author. Happy trading!