OPEN-SOURCE SCRIPT

Asterion Regime Lattice [JOAT]

515
Asterion Regime Lattice [JOAT]

Introduction

Asterion Regime Lattice is an open-source market regime oscillator designed to classify whether conditions are directional, transitional, or balanced by combining multiple independent measurements into one continuous score. Instead of relying on a single trend indicator, it evaluates trend displacement, momentum, volatility behavior, directional movement, efficiency, choppiness, entropy, and higher-timeframe confirmation.

The problem this script solves is regime ambiguity. Many entries fail because traders apply trend logic in rotational conditions or mean-reversion logic in expanding directional phases. Asterion Regime Lattice provides a higher-level state model first, so any downstream tool can be interpreted in the proper context. The pane output uses layered lattice bands, a smoothed score curve, regime shading, and a compact dashboard to make the current state readable at a glance without covering price.

สแนปชอต

Core Concepts

1. Composite Regime Scoring

The script builds a regime score from several independent components rather than one oscillator. It measures fast/slow trend displacement, momentum direction, volatility expansion, directional movement, efficiency ratio, choppiness, Shannon entropy, fractal dimension, RSI state, and ADX-derived trend strength. Each component is normalized, weighted, and added into a single signed score where positive values indicate bullish expansion and negative values indicate bearish expansion.

2. Higher-Timeframe Confirmation

Two higher timeframes are requested with `request.security()` using `lookahead = barmerge.lookahead_off`. This keeps the script non-repainting while allowing the current timeframe to compare itself against broader directional conditions. The higher-timeframe pack contributes trend bias, momentum bias, volatility bias, directional movement bias, slope, ROC, and ADX strength.

Pine Script®


3. Structure Quality and Noise Separation

The script uses efficiency, choppiness, entropy, and fractal-dimension style measurements to separate clean directional movement from noisy rotation. That matters because two markets can have similar momentum but very different trade quality. Asterion does not only ask "is price moving?" It also asks whether the move is organized enough to treat as a real regime.

4. Lattice Bands and Regime Zones

The oscillator uses inner and outer bands around the smoothed score curve to display soft and strong regime zones. When the score pushes beyond soft thresholds the state becomes directional. When it pushes through stronger thresholds with quality and higher-timeframe agreement, the state becomes more decisive. This layered presentation makes the transition from balance to expansion visible before and during the full move.

5. Confirmed State Transitions

Alerts and state changes are only confirmed on closed bars. This keeps the script suitable for live use and avoids intrabar state flips being treated as final.

Features

  • Composite regime score: Blends trend, momentum, volatility, efficiency, entropy, fractal behavior, RSI, and DMI/ADX context
  • Dual higher-timeframe confirmation: Uses two configurable timeframes with `lookahead_off`
  • Trend quality layer: Separates clean directional movement from noisy or choppy conditions
  • Inner and outer lattice bands: Visualize soft and strong directional zones
  • Pane regime shading: Background tint shifts with the current market state
  • Optional bar tinting: Can color price bars by current regime while keeping the oscillator in a separate pane
  • Dashboard summary: Reports regime, quality, HTF alignment, volatility, momentum, efficiency, entropy, and directional state
  • Confirmed-bar alerts: Bull, bear, soft bull, soft bear, and transition events trigger only after bar confirmation


Input Parameters

Core:
  • Fast Length and Slow Length: Trend displacement backbone
  • Momentum Length and Trend Slope Length: Speed and directional persistence measurements
  • Structure Length, Volume Length, Volatility Length: Core normalization windows
  • Efficiency Length, Choppiness Length, Entropy Length, Entropy Bins, Fractal Length: Noise and organization diagnostics
  • RSI Length and ADX Length: Directional strength and internal pressure inputs


Higher-Timeframe Confirmation:
  • Primary HTF and Secondary HTF
  • Strong ADX and Weak ADX thresholds


Visuals:
  • Pane shading toggle
  • Lattice band toggle
  • Score curve toggle
  • Bar tint toggle
  • Curve smoothing and band multipliers


How to Use This Indicator

Step 1: Read the Regime Row
Start with the Regime row in the dashboard and the position of the score relative to the soft and hard thresholds. This tells you whether the market is directional, balanced, or in transition.

Step 2: Check Quality Before Acting
A high-magnitude regime score with weak quality is less reliable than a slightly smaller score with strong quality. Use the Quality row to decide whether the move is organized enough to trust.

Step 3: Compare With Higher Timeframes
The HTF row helps determine whether the current timeframe is aligned with the broader backdrop or fighting it. Stronger follow-through usually appears when local and higher-timeframe states agree.

Step 4: Use It as a Context Filter
Asterion is best used as a regime filter. Trend systems generally perform better when the oscillator is directional and quality is strong. Mean-reversion logic is generally more appropriate when the score is near balance and noise metrics dominate.

Indicator Limitations

  • The script is a classifier, not a predictive model. It describes current conditions; it does not forecast future direction
  • Higher-timeframe confirmation can lag turning points because those bars must close before their state is final
  • In low-range grinding markets, the oscillator can remain transitional for extended periods
  • Any weighted composite reflects design choices; different markets may require threshold adjustments


Originality Statement

Asterion Regime Lattice is original in the way it combines directional scoring, higher-timeframe agreement, and multiple noise-quality measurements into one structured regime model. It is not a simple trend oscillator with a new color scheme. The script is built around the idea that regime is a blend of direction, organization, and alignment across timeframes, and its lattice presentation is designed to make those layers visible rather than hiding them behind a single line.

Disclaimer

This script is provided for educational and informational purposes only. It is not financial advice and does not guarantee any outcome. Regime measurements are based on historical price and volume behavior and can produce false or delayed readings, especially during sudden event-driven changes in market conditions. Always use independent judgment and risk management.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน