OPEN-SOURCE SCRIPT

Squeeze Momentum Regression Clouds [SciQua]

396
╭──────────────────────────────────────────────╮
‎ ‎ ‎ ‎ ‎ ‎ ‎‎ ‎‎ ‎ ‎ ‎ ‎ ‎‎ ‎‎ ‎ ☁️ Squeeze Momentum Regression Clouds [SciQua]
╰──────────────────────────────────────────────╯

🔍 Overview

The Squeeze Momentum Regression Clouds (SMRC) indicator is a powerful visual tool for identifying price compression, trend strength, and slope momentum using multiple layers of linear regression Clouds. Designed to extend the classic squeeze framework, this indicator captures the behavior of price through dynamic slope detection, percentile-based spread analytics, and an optional UI for trend inspection — across up to four customizable regression Clouds.

────────────────────────────────────────────────────────────

╭────────────────╮
‎ ‎ ‎ ‎ ‎‎ ‎‎ ‎ ⚙️ Core Features
╰────────────────╯
  • Up to 4 Regression Clouds – Each Cloud is created from a top and bottom linear regression line over a configurable lookback window.
  • Slope Detection Engine – Identifies whether each band is rising, falling, or flat based on slope-to-ATR thresholds.
  • Spread Compression Heatmap – Highlights compressed zones using yellow intensity, derived from historical spread analysis.
  • Composite Trend Scoring – Aggregates directional signals from each Cloud using your chosen weighting model.
  • Color-Coded Candles – Optional candle coloring reflects the real-time composite score.
  • UI Table – A toggleable info table shows slopes, compression levels, percentile ranks, and direction scores for each Cloud.
  • Gradient Cloud Styling – Apply gradient coloring from Cloud 1 to Cloud 4 for visual slope intensity.
  • Weight Aggregation Options – Use equal weighting, inverse-length weighting, or max pooling across Clouds to determine composite trend strength.

────────────────────────────────────────────────────────────

╭──────────────────────────────────────────╮
‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎‎ ‎‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ 🧪 How to Use the Indicator
‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎‎ ‎‎ ‎ ‎ ‎ ‎ ‎ ‎ 1. Understand Trend Bias with Cloud Colors
╰──────────────────────────────────────────╯
Each Cloud changes color based on its current slope:
  • Green indicates a rising trend.
  • Red indicates a falling trend.
  • Gray indicates a flat slope — often seen during chop or transitions.

Cloud 1 typically reflects short-term structure, while Cloud 4 represents long-term directional bias. Watch for multi-Cloud alignment — when all Clouds are green or red, the trend is strong. Divergence among Clouds often signals a potential shift.

────────────────────────────────────────────────────────────

╭───────────────────────────────────────────────╮
‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎‎ ‎‎ ‎‎ ‎‎ ‎ ‎ ‎ ‎ 2. Use Compression Heat to Anticipate Breakouts
╰───────────────────────────────────────────────╯

The space between each Cloud’s top and bottom regression lines is measured, normalized, and analyzed over time. When this spread tightens relative to its history, the script highlights the band with a yellow compression glow.

This visual cue helps identify squeeze zones before volatility expands. If you see compression paired with a changing slope color (e.g., gray to green), this may indicate an impending breakout.

────────────────────────────────────────────────────────────

╭─────────────────────────────────╮
‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎‎ ‎‎ ‎ ‎ ‎ 3. Leverage the Optional Table UI
╰─────────────────────────────────╯

The indicator includes a dynamic, floating table that displays real-time metrics per Cloud. These include:
  • Slope direction and value, with historical Min/Max reference.
  • Top and Bottom percentile ranks, showing how price sits within the Cloud range.
  • Current spread width, compared to its historical norms.
  • Composite score, which blends trend, slope, and compression for that Cloud.

You can customize the table’s position, theme, transparency, and whether to show a combined summary score in the header.

────────────────────────────────────────────────────────────

╭─────────────────────────────────────────────╮
‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎‎ ‎‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ 4. Analyze Candle Color for Composite Signals
╰─────────────────────────────────────────────╯

When enabled, the indicator colors candles based on a weighted composite score. This score factors in:
  • The signed slope of each Cloud (up, down, or flat)
  • The percentile pressure from the top and bottom bands
  • The degree of spread compression

Expect green candles in bullish trend phases, red candles during bearish regimes, and gray candles in mixed or low-conviction zones.

Candle coloring provides a visual shorthand for market conditions, useful for intraday scanning or historical backtesting.

────────────────────────────────────────────────────────────

╭────────────────────────╮
‎ ‎ ‎ ‎ ‎‎ ‎‎‎ ‎ ‎ ‎ 🧰 Configuration Guidance
╰────────────────────────╯

To tailor the indicator to your strategy:
  • Use Cloud lengths like 21, 34, 55, and 89 for a balanced multi-timeframe view.
  • Adjust the slope threshold (default 0.05) to control how sensitive the trend coloring is.
  • Set the spread floor (e.g., 0.15) to tune when compression is detected and visualized.
  • Choose your weighting style: Inverse Length (favor faster bands), Equal, or Max Pooling (most aggressive).
  • Set composite weights to emphasize trend slope, percentile bias, or compression—depending on your market edge.


────────────────────────────────────────────────────────────

╭────────────────╮
‎ ‎ ‎ ‎‎ ‎‎‎ ‎ ‎ ‎ ✅ Best Practices
╰────────────────╯
  • Use aligned Cloud colors across all bands to confirm trend conviction.
  • Combine slope direction with compression glow for early breakout entry setups.
  • In choppy markets, watch for Clouds 1 and 2 turning flat while Clouds 3 and 4 remain directional — a sign of potential trend exhaustion or consolidation.
  • Keep the table enabled during backtesting to manually evaluate how each Cloud behaved during price turns and consolidations.


────────────────────────────────────────────────────────────

╭───────────────────────╮
‎ ‎ ‎ ‎‎ ‎ ‎ ‎‎ ‎‎ ‎ 📌 License & Usage Terms
╰───────────────────────╯

This script is provided under the Creative Commons Attribution-NonCommercial 4.0 International License.

✅ You are allowed to:
  • Use this script for personal or educational purposes
  • Study, learn, and adapt it for your own non-commercial strategies

❌ You are not allowed to:
  • Resell or redistribute the script without permission
  • Use it inside any paid product or service
  • Republish without giving clear attribution to the original author

For commercial licensing, private customization, or collaborations, please contact Joshua Danford directly.

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.