OPEN-SOURCE SCRIPT

Prismatic Depth [JOAT]

5 611
Introduction

Prismatic Depth is an open-source multi-pillar institutional signal filter that scores bullish and bearish market pressure across nine independent analytical dimensions simultaneously. Rather than generating a signal from any single indicator, Prismatic Depth requires a weighted composite score above a configurable threshold, a minimum directional lead between bull and bear scores, and alignment of up to five optional confirmation gates — all at the same time.

The problem this solves is signal noise. Most indicators produce signals from a single input: a moving average crossover, an RSI threshold, a volume spike. Each of these fires constantly in all market conditions, including conditions where it has no historical edge. Prismatic Depth measures nine separate market properties and only produces a signal when a statistically unusual number of them agree simultaneously. The result is a lower-frequency, higher-context signal that reflects a broader institutional consensus rather than a single technical event.

snapshot

Core Concepts

1. The Nine-Pillar Scoring Architecture

Each pillar measures a distinct market property independently. Pillar weights are user-configurable and sum to produce a maximum possible score of 100. The nine pillars are:

Structure: Detects higher-high / higher-low and lower-high / lower-low sequences using confirmed pivot highs and lows. A bullish structural sequence adds the Structure weight to the bull score.

Volume: Measures the slope of On-Balance Volume using linear regression over 20 bars. A rising OBV slope contributes to the bull score; falling contributes to bear.

Momentum: Blends three momentum inputs — Kaufman Adaptive Moving Average position, RSI relative to 50, and Williams Percent Range relative to midpoint. Each sub-component is weighted equally at one-third.

Liquidity: Detects swing-low sweeps — bars where price wicks below the last confirmed swing low and closes back above it. These represent stop-hunt events followed by institutional absorption.

Volatility: Evaluates whether the ATR-to-SMA(ATR) ratio falls within a productive range (0.8 to 1.6). Markets outside this range are either too compressed for trend signals or too expanded for reliable entries.

Session: Measures the current bar's position relative to the daily session midpoint. Bars in the lower half of the daily range carry a bullish session score; bars in the upper half carry a bearish score.

Higher Timeframe: Compares current close to a 50-period EMA on a user-selected higher timeframe via request.security() with lookahead disabled.

Delta Pressure: Tracks cumulative signed volume and detects when its moving average crossing direction aligns with price movement. A Pressure Score blending the volume delta ratio, volume rate, and bar body ratio is computed.

Fractal Efficiency: Computes the Fractal Efficiency Ratio — the ratio of the net directional price move to the total path length of individual bar changes. An FER above 0.60 in conjunction with ADX above 20 passes the efficiency gate.

Pine Script®
// Fractal Efficiency Ratio float ferNet = math.abs(close - close[ferLen]) float ferPath = math.sum(math.abs(ta.change(close)), ferLen) float ferVal = ferPath > 0.0 ? ferNet / ferPath : 0.0


2. Weighted Score Gating

The final bull and bear scores are compared against a minimum threshold (default: 70 of 100) and a minimum directional lead (default: bull must exceed bear by at least 20 points). Both conditions must hold simultaneously before a signal is considered.

Pine Script®
bool longSignal = bull >= threshold and (bull - bear) >= scoreGap and inSession and noiseGate and vwmaGate and stGate and ribbonGate


3. Optional Confirmation Gates

Five binary gates can be independently enabled or disabled: VWMA(200) price relationship, Supertrend direction, 8-line HMA ribbon direction, ADX minimum threshold (noise filter), and session time filter. Each gate is AND-logic — all enabled gates must pass before a signal fires.

4. Kaufman Adaptive Moving Average

The momentum pillar uses KAMA rather than a standard moving average. KAMA adjusts its smoothing constant based on the Efficiency Ratio of recent price movement, reacting quickly during trending phases and becoming nearly flat during choppy periods.

5. 8-Line HMA Gradient Ribbon

Visual context is provided by an 8-line Hull Moving Average ribbon (using every other increment for performance while retaining the full gradient effect). A normalization factor (ribbon spread divided by its 200-bar EMA, clamped to -1 to +1) drives a color gradient from the bear theme color to the bull theme color. The gradient reflects conviction intensity, not just direction.

6. Trade Block Visualization

When a signal fires, entry, stop, and up to four take-profit levels are plotted as horizontal lines and labeled at the right edge of the chart. Risk and reward zones are shown as translucent boxes. All drawn objects are updated every bar to extend rightward until closed.

snapshot

Features

  • Nine-pillar weighted confluence scoring: Structure, Volume, Momentum, Liquidity, Volatility, Session, HTF Trend, Delta Pressure, and Fractal Efficiency each scored independently and summed
  • Configurable pillar weights: Each pillar's contribution to the total score is independently adjustable
  • Five optional binary gates: VWMA, Supertrend, HMA Ribbon, ADX noise filter, and session filter independently toggled
  • Threshold and directional lead gating: Score must exceed minimum AND directional lead must exceed gap before any signal fires
  • Extreme signal tier: Separate threshold for extreme confluence readings with distinct visual treatment
  • 8-line HMA gradient ribbon: rFactor-normalized color gradient reflecting momentum spread intensity vs. its 200-bar historical average, with gradient fills between all adjacent ribbon lines
  • Gradient glow bar coloring: Glow color mode uses barcolor() to highlight signal bars in the bull or bear theme color; when disabled, falls back to RSI-intensity gradient bar coloring
  • Regime background tint: Subtle chart background tint on regime transitions, clearing after 10 bars
  • Four TP levels with live boxes and lines: TP1–TP4 plotted as gradient green lines and translucent boxes extending right in real time
  • Four stop modes: Supertrend, ATR cap, fixed percentage, pivot-based
  • Built-in backtest tracker: Win rate, expected value in R, and trade count
  • Four color themes: Phantom (cyan/magenta), Neon (teal/pink), Classic (green/red), Solar (orange/blue)
  • Institutional dashboard: 14-row table showing all nine pillar scores, signal state, and performance metrics
  • Non-repainting: All signals gated by barstate.isconfirmed; HTF request.security() uses lookahead=barmerge.lookahead_off


Input Parameters

Scoring Engine:
  • Min Score to Signal: Minimum composite score required (default: 70)
  • Extreme Score: Score for extreme tier (default: 90)
  • Min Directional Lead: Bull-bear gap required (default: 20)


Pillar Weights:
  • Individual weight sliders for each of the nine pillars (defaults sum toward 100)


Trend Gates:
  • VWMA Gate toggle and length (default: 200)
  • Supertrend Gate toggle, ATR length, multiplier
  • Ribbon Gate toggle, base length, step
  • ADX Noise Gate toggle and minimum ADX value


Signal Control:
  • Cooldown bars between signals (default: 5)
  • Session filter toggle and session string


Trade Levels:
  • Show Trade Block toggle
  • Stop mode: Supertrend / ATR Cap / Fixed % / Pivot
  • RR multiples for TP1, TP2, TP3, TP4 (defaults: 0.5, 1.0, 1.5, 2.0)


How to Use This Indicator

Step 1: Select a Theme and Configure Gate Sensitivity
Choose a color theme that suits your chart. Start with all five gates enabled and default weights. Observe signal frequency across several recent weeks of history.

Step 2: Interpret the Dashboard Score Rows
Each pillar row in the dashboard shows its current directional score in the stronger direction. A row colored in the bull theme means that pillar is contributing to bullish confluence. The Signal row shows the final output.

Step 3: Use Signals as Context, Not Directives
A signal fires when an unusual number of market dimensions agree. It does not predict how far price will move or guarantee a profitable outcome.

Step 4: Set Stop Mode Before Live Use
The Supertrend stop mode trails the stop with the Supertrend level. ATR Cap limits maximum stop distance. Fixed % uses a fixed percentage of price. Pivot uses the last confirmed structural pivot.

Step 5: Review Backtest Statistics Skeptically
The win rate and expected value displayed are calculated from signal history on the current chart only. They reflect past performance on historical data. Optimizing weights to maximize these numbers on a single chart produces overfitted results that will not generalize.

Indicator Limitations

  • Pivot-based pillars (Structure, Liquidity) confirm with a lookback offset — the structural event is labeled bars after it occurred. This is non-repainting behavior inherent to pivot detection
  • The Fractal Efficiency gate may delay signals following sharp, fast moves where path length temporarily normalizes
  • High pillar weights placed on a single pillar can effectively reduce this to a single-factor indicator. Weight distribution should be reasonably balanced
  • The session pillar score assumes intraday context. On daily and higher timeframes, it contributes a neutral fixed value
  • The backtest tracker embedded in this indicator does not account for slippage, commission, or partial fills. It is not a substitute for a properly configured strategy backtest
  • Enabling all gates simultaneously will produce very few signals. Tune gate selection to the market and timeframe being analyzed


Originality Statement

Prismatic Depth is original in its nine-pillar architecture and the specific combination of inputs it assembles. This publication is warranted because:

  • The Fractal Efficiency Ratio as a scoring pillar and gate condition — measuring the directional efficiency of price movement over a lookback, distinct from ADX — is not present in existing open-source Pine Script v6 publications as of this writing
  • Weighted pillar scoring where the user controls the relative contribution of each dimension, combined with both a score threshold and a directional lead gap as dual gatekeeping conditions, produces a more selective output than threshold-only systems
  • The Delta Pressure pillar — computing a composite of volume delta ratio, volume rate versus average, and candle body compression — is an original implementation distinct from standard OBV or CMF approaches
  • The combination of nine independently scored dimensions with five independently toggled binary confirmation gates in a single configurable framework, with a built-in per-signal performance tracker, is not replicated in existing open-source publications


Disclaimer

This indicator is provided for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Confluence readings are based on historical price data and do not guarantee any future market outcome. Past win rate statistics shown by the built-in tracker do not predict future performance. Always apply proper risk management. The author accepts no responsibility for trading losses resulting from the use of this indicator.

Made with passion by jackofalltrades

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.