OPEN-SOURCE SCRIPT
DDCA Composite Risk Metric v2

A single 0–1 risk oscillator for Dynamic Dollar-Cost Averaging into Bitcoin. Combines 19 cross-domain indicators into one actionable signal — low readings mean opportunity, high readings mean risk.
What It Does
Instead of watching dozens of charts and trying to "feel" the market, this indicator distills macro conditions, on-chain data, technical structure, and sentiment into a single number between 0 and 1. That number maps directly to how aggressively you should be buying or selling.
0.0 = maximum opportunity → 1.0 = maximum risk
The indicator plots as a color-gradient line with 7 labeled action bands, a real-time score table, and an optional execution multiplier for position sizing.
The 19 Indicators
Organized into 4 weighted tiers:
TIER 1 — MACRO & LIQUIDITY (25%)
Answers: Is the environment cheap?
TIER 2 — ON-CHAIN (35%)
Answers: Is there capitulation NOW?
TIER 3 — TECHNICAL (30%)
Answers: Is price at a structural bottom/top?
TIER 4 — SENTIMENT (10%)
Answers: Is the crowd panicking or euphoric?
⑱ Fear & Greed Proxy — volatility + momentum composite
⑲ Altcoin Breadth — speculative froth measurement
Each indicator uses adaptive normalization (percentile rank + rate-of-change blending) to stay calibrated across market regimes. A sigmoid rescale compresses extremes while keeping the middle responsive.
Action Bands
The composite maps to 7 symmetric zones centered on 0.50:
Execution Layer (Optional)
Toggle "Show Execution Multiplier" in settings to overlay a position-sizing curve. The multiplier tells you how much to scale your base weekly allocation:
Buy side: Continuous curve from the HOLD boundary (0.45) down to the clamp point (0.15), where multiplier = 5×. At the buy pivot (0.35), multiplier = exactly 1.0×.
Sell side: Mirror curve from the HOLD boundary (0.55) up to the clamp point (0.85), where multiplier = 5×. At the sell pivot (0.60), multiplier = exactly 1.0×.
HOLD zone (0.45–0.55): Multiplier = 0. No action.
All parameters (ceiling, pivot, power, clamp) are fully configurable. The curve shape uses derived power exponents so that the maximum multiplier (5×) lands precisely at the clamp boundaries without any artificial cap.
How To Use
Weekly workflow:
Customization:
Toggle individual tiers ON/OFF to see the composite with or without macro - Adjust individual indicator weights (must sum to 100) - Enable sub-score plots for debugging tier-level behavior - All execution layer parameters are editable in the settings panel
Design Philosophy
This indicator is built for portfolio management, not trading. It pushes you toward action rather than inaction — the narrow HOLD zone (only 10% of the range) means you're almost always either accumulating or distributing. The 7-band system is symmetric by design, and the continuous multiplier curve eliminates artificial cliff edges between zones.
The macro tier compresses the composite's range (typical operating band: 0.15–0.85 with macro enabled vs 0.05–0.95 without). This is intentional — macro conditions act as a stabilizer that prevents overreaction to short-term on-chain or technical signals.
Data Sources
Uses 22 request.security() calls pulling from FRED (macro), QUANDL/BLOCKCHAIN (on-chain), and standard BTC price data (technical + sentiment). All on-chain proxies are constructed from publicly available TradingView data — no external API required.
Not financial advice. This is a systematic framework for informed decision-making, not a guarantee of returns. Always do your own research.
What It Does
Instead of watching dozens of charts and trying to "feel" the market, this indicator distills macro conditions, on-chain data, technical structure, and sentiment into a single number between 0 and 1. That number maps directly to how aggressively you should be buying or selling.
0.0 = maximum opportunity → 1.0 = maximum risk
The indicator plots as a color-gradient line with 7 labeled action bands, a real-time score table, and an optional execution multiplier for position sizing.
The 19 Indicators
Organized into 4 weighted tiers:
TIER 1 — MACRO & LIQUIDITY (25%)
Answers: Is the environment cheap?
- ① FED Rate Direction — monetary policy stance
- ② Global M2 YoY — liquidity expansion/contraction
- ③ FED Balance Sheet — net liquidity proxy
- ④ US Real Yields — opportunity cost of risk assets
- ⑤ Unemployment Trend — economic stress signal
- ⑥ DXY Dollar Index — USD strength headwind/tailwind
TIER 2 — ON-CHAIN (35%)
Answers: Is there capitulation NOW?
- ⑦ MVRV Z-Score — market value vs realized value
- ⑧ NUPL — net unrealized profit/loss
- ⑨ Puell Multiple — miner revenue stress
- ⑩ LTH Behavior Proxy — price vs 365 SMA
- ⑪ Hash Ribbons — miner capitulation signal
TIER 3 — TECHNICAL (30%)
Answers: Is price at a structural bottom/top?
- ⑫ 200-Week MA Ratio — long-term mean reversion
- ⑬ Bull Market Support Band — trend health
- ⑭ Pi Cycle Top — cycle peak detection
- ⑮ BTC Dominance — capital rotation signal
- ⑯ Log Regression Band — position within long-term channel
- ⑰ Stablecoin Supply Ratio (SSR) — dry powder on sidelines
TIER 4 — SENTIMENT (10%)
Answers: Is the crowd panicking or euphoric?
⑱ Fear & Greed Proxy — volatility + momentum composite
⑲ Altcoin Breadth — speculative froth measurement
Each indicator uses adaptive normalization (percentile rank + rate-of-change blending) to stay calibrated across market regimes. A sigmoid rescale compresses extremes while keeping the middle responsive.
Action Bands
The composite maps to 7 symmetric zones centered on 0.50:
- 🟢 < 0.25 — ALL-IN → Maximum deployment, historically rare
- 🟢 0.25–0.35 — STRONG BUY → Aggressive accumulation
- 🟢 0.35–0.45 — BUY → Favorable conditions, steady buying
- 🟡 0.45–0.55 — HOLD → Neutral, do nothing
- 🔴 0.55–0.65 — SELL → Begin distribution
- 🔴 0.65–0.75 — STRONG SELL → Accelerated profit-taking
- 🔴 > 0.75 — ALL-OUT → Maximum risk, aggressive selling
Execution Layer (Optional)
Toggle "Show Execution Multiplier" in settings to overlay a position-sizing curve. The multiplier tells you how much to scale your base weekly allocation:
Buy side: Continuous curve from the HOLD boundary (0.45) down to the clamp point (0.15), where multiplier = 5×. At the buy pivot (0.35), multiplier = exactly 1.0×.
Sell side: Mirror curve from the HOLD boundary (0.55) up to the clamp point (0.85), where multiplier = 5×. At the sell pivot (0.60), multiplier = exactly 1.0×.
HOLD zone (0.45–0.55): Multiplier = 0. No action.
All parameters (ceiling, pivot, power, clamp) are fully configurable. The curve shape uses derived power exponents so that the maximum multiplier (5×) lands precisely at the clamp boundaries without any artificial cap.
How To Use
Weekly workflow:
- Check the composite reading every Monday (buy day) and Wednesday (sell day)
- Read the band label — it tells you what to do
- If using the execution layer, multiply your base allocation by the multiplier
- Enter your position
Customization:
Toggle individual tiers ON/OFF to see the composite with or without macro - Adjust individual indicator weights (must sum to 100) - Enable sub-score plots for debugging tier-level behavior - All execution layer parameters are editable in the settings panel
Design Philosophy
This indicator is built for portfolio management, not trading. It pushes you toward action rather than inaction — the narrow HOLD zone (only 10% of the range) means you're almost always either accumulating or distributing. The 7-band system is symmetric by design, and the continuous multiplier curve eliminates artificial cliff edges between zones.
The macro tier compresses the composite's range (typical operating band: 0.15–0.85 with macro enabled vs 0.05–0.95 without). This is intentional — macro conditions act as a stabilizer that prevents overreaction to short-term on-chain or technical signals.
Data Sources
Uses 22 request.security() calls pulling from FRED (macro), QUANDL/BLOCKCHAIN (on-chain), and standard BTC price data (technical + sentiment). All on-chain proxies are constructed from publicly available TradingView data — no external API required.
Not financial advice. This is a systematic framework for informed decision-making, not a guarantee of returns. Always do your own research.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.