Automatic Support & Resistance1. Overview
This is an automatic Support and Resistance (S/R) level detector for TradingView. It identifies significant price pivots (peaks and troughs) based on user-defined settings and plots up to 8 dynamic levels on your chart.
The script is intended for educational and informational purposes to demonstrate automatic S/R detection using pivot points and to help traders identify potential areas of interest.
2. Key Logic & Features
A. Pivot Detection
The script detects price pivots (local highs and lows) using ta.pivothigh() and ta.pivotlow().
Two detection speeds:
Regular Pivots: Use the Right Bars setting to define the confirmation period.
Quick Pivots: Use the Quick Right setting for more sensitive, faster-moving levels.
Source Selection: Choose between using Close price or High/Low values for detection.
B. Level Hierarchy
The script plots eight levels, organized as:
Resistance Levels (Red/Green): Levels 1, 3, 5, 7 (top 4 lines).
Support Levels (Red/Green): Levels 2, 4, 6, 8 (bottom 4 lines).
C. Visual Customization (NEW)
Line Styles: Independently set the style for Resistance and Support lines:
Solid (default for both)
Dotted (uses plot.style_circles)
Dashed (uses plot.style_stepline)
Color Logic: Each level dynamically changes color:
Green: Current close price is above the level (bullish context).
Red: Current close price is below the level (bearish context).
D. Additional Features
show_last=1: Only the most recent segment of each level is shown, keeping the chart clean.
trackprice=true: Extends the line horizontally to the right edge of the chart for easy reference.
3. User Inputs (Customization)
Input Description Default
Left Bars Number of bars to the left of a pivot. 50
Right Bars Number of bars to the right of a pivot (confirmation). 25
Quick Right Faster confirmation period for quick pivots. 5
Source Use Close or High/Low for pivot detection. Close
Resistance Line Style Style for top (resistance) levels. Solid
Support Line Style Style for bottom (support) levels. Solid
4. How to Use
Add the script to any chart.
Adjust Pivot Sensitivity:
Increase Left Bars and Right Bars for longer-term, stronger S/R levels.
Decrease them for more, shorter-term levels.
Use Quick Right to add a more sensitive, faster-responding layer.
Interpret the Levels:
Resistance (top lines): Price may face selling pressure when approaching these levels from below.
Support (bottom lines): Price may find buying pressure when approaching these levels from above.
Green level: Price is currently trading above that level (potentially acting as support).
Red level: Price is currently trading below that level (potentially acting as resistance).
Combine with other tools: Use this as one component of a complete trading strategy, alongside trend indicators, candlestick patterns, or volume analysis.
5. Compliance & Transparency
No Financial Advice: This script is strictly for educational and informational purposes. It does not provide financial advice, trading recommendations, or guaranteed results. All trading decisions are your own responsibility.
Original Work: The code is the original work of the author, based on standard Pine Script pivot functions (ta.pivothigh, ta.pivotlow). It is published under the Mozilla Public License 2.0.
No Guarantee: The accuracy, reliability, or profitability of the detected S/R levels is not guaranteed. Different market conditions may require different parameter adjustments.
6. Technical Notes & Limitations
Version: Converted to Pine Script v6 for optimal performance and future compatibility.
Repainting: Pivot-based levels are non-repainting by nature (ta.pivothigh/low only confirms after the right bars have passed). However, the dynamic coloring reacts to each new bar's close.
Performance: The script is lightweight and runs efficiently on most charts.
7. Credits & Open Source
This script is published under the Mozilla Public License 2.0. You are free to use, modify, and share this code for non-commercial purposes, provided you retain the original license and attribution. No private keys, external dependencies, or hidden functions are included. インジケーター

SAO RUBIQ Regime v2# SAO · RUBIQ — Regime Visualizer (v2)
**by SNP420 · Jarvis Claudos · Finexus s.r.o.**
*Pine Script v6 · Build 2026-05-26*
---
## What is it
A research-grade market regime overlay that classifies every confirmed
bar into one of **five regimes** and paints the chart accordingly.
Born out of a simple insight:
> *"The right algorithm in the wrong phase of the market still fails —
> even when it is 100% correct under ideal conditions."*
This is the central thesis of the **SAO · RUBIQ** project: every
strategy lives or dies inside a specific regime × timeframe cell.
Without active regime perception, every trading system is necessarily
under-performing on the bars it was not designed for. This indicator
makes those cells visible.
## What's new in v2
v2 throws out the v1 AND-stack of ADX / BB-width / drift cutoffs and
replaces it with four orthogonal signals that vote together:
- **Fractal pivots** (3-bar centered) labeled **HH / LH / HL / LL**
- **Trend state machine** with **re-anchoring**:
UP / DOWN / RANGE / REVERSAL_UP / REVERSAL_DOWN
- **Multi-TF RSI** on M30 / H1 / H4 / D1 / W1 with per-TF thresholds
and a **≥3 of 5 agreement** rule
- **S/R level clustering** (±0.3 ATR tolerance) with **double-bounce**
reversal flag that persists for 10 bars
Measured improvements over v1.1 on EUR/USD M30, 2024-2025 (24,863 bars):
| Metric | v1.1 calibrated | v2 |
| ----------------------- | --------------- | ----------- |
| Confident coverage | 44.87% | **53.96%** |
| Transitions (less whipsaw) | 1,567 | **855** |
| BULL_CALM Sharpe (h=5) | +0.085 | **+0.271** |
| BEAR_CALM direction | +0.04 ⚠ (wrong)| **−0.19 ✅** |
| Shuffle F-stat (h=5) | 0.0027 | **0.0068** |
| Strategy diagonal score | 1 / 5 | **2 / 5** |
All validated by 1000-iter shuffle Monte Carlo (p < 0.001) and a
strategy × regime P&L matrix.
## The five regimes
| Regime | Meaning |
| ------------- | -------------------------------------------------------- |
| **BULL_CALM** | Trend UP + ≥3 of 5 RSI TFs agree bullish |
| **BEAR_CALM** | Trend DOWN + ≥3 of 5 RSI TFs agree bearish |
| **RANGE** | Mixed last pivots (no clean HH+HL or LH+LL) |
| **CHOPPY** | Trend UP/DOWN without RSI agreement, or active reversal |
| **STRESS** | Volatility spike: rv20_norm > 2 OR atr_z > 2 |
| *UNCERTAIN* | Fallback — pre-warmup or no labels yet (no box drawn) |
Priority order (highest wins): **STRESS > BULL > BEAR > CHOPPY > RANGE.**
## How it works
For every confirmed bar the indicator:
1. Computes ATR(14), realized vol (20), z-scored ATR — used by stress
detection and S/R cluster tolerance.
2. Requests RSI(14) on five timeframes via `request.security`
(M30 / H1 / H4 / D1 / W1) and counts bull / bear agreements.
3. Detects fractal pivots with `ta.pivothigh / pivotlow(3, 3)` and
labels each as HH / LH / HL / LL versus the previous same-type
pivot.
4. Adds each pivot to a greedy S/R level cluster (±0.3 ATR). On the
second touch within 500 bars it fires a **double-bounce reversal**
flag (type H → REVERSAL_DOWN, type L → REVERSAL_UP) that persists
for 10 bars.
5. Maintains a trend state machine: **UP** when last H=HH and last L=HL,
**DOWN** when last H=LH and last L=LL, **RANGE** otherwise.
6. Combines trend × RSI × stress into the final label, then applies
a hysteresis smoother (`min_run = 5 bars`) so single-bar flips
never get committed.
## Visualization (FX-Sessions-style)
- **Dashed segment box** per confirmed regime run, sized to that
segment's high/low.
- **Background tint** — semi-transparent regime color over the span.
- **Bar color** (off by default) — paints OHLC bars with regime color.
- **Segment label** anchored to the top of each box.
- **Pivot markers** — HH / LH / HL / LL drawn at every confirmed pivot
with bull/bear tint.
- **Reversal arrows** — ▲ green at support double-bounces, ▼ red at
resistance double-bounces.
- **Info table** (top-right) — current state, trend, last H and L labels,
RSI per TF, bull/bear agree counts, rv20_norm, atr_z.
- **Stats table** (bottom-right) — N bars and % share per regime across
the visible history.
UNCERTAIN bars deliberately render no box and no tint (clean chart).
## Settings worth knowing
- **Hysteresis min_run** (5) — bars of consistent raw state before
commit. Bigger = less flicker, more boundary lag.
- **Pivot left/right** (3) — fractal pivot window. Smaller catches
more pivots but more noise.
- **Per-TF RSI thresholds** — defaults are 65/35 (M30), 62/38 (H1),
60/40 (H4), 55/45 (D1), 50/50 (W1). Overridable per pair / TF.
- **RSI agree min** (3) — TFs that must agree to qualify as
BULL_CALM / BEAR_CALM. Lower = more sensitive.
- **S/R cluster tolerance** (0.3 × ATR) — width of an S/R level zone.
- **S/R max age** (500 bars) — oldest first-touch still eligible for
double-bounce reversal.
- **Reversal persistence** (10 bars) — how long after the second touch
the REVERSAL state stays active.
- **Max active S/R levels** (200) — FIFO ceiling on level memory.
- **All six regime colors + reversal arrow colors** — fully overridable.
## Sanity-check expectation (EUR/USD M30, 2 years)
If the v2 baseline distribution holds on your data window:
| State | Share |
| --------- | ------ |
| BULL_CALM | ~2.6% |
| BEAR_CALM | ~1.8% |
| RANGE | ~2.4% |
| CHOPPY | ~38.7% |
| STRESS | ~8.4% |
| UNCERTAIN | ~46.0% |
v2 deliberately has stricter BULL / BEAR (needs trend state + 3-of-5
RSI agreement) and a wider CHOPPY (catches trend bars without RSI
agreement + all active reversals). Cleaner regime blocks, better
direction mapping.
## Honest limitations — please read
- **Tuned to EUR/USD M30 vol scale.** Features and rules are
TF-agnostic in math, but the thresholds were calibrated on M30.
On H1 / D1 / crypto / equities the distribution will be approximate
unless you re-tune.
- **v2 direction mapping is improved but not perfect.** Diagonal
score = 2 / 5 (vs 1 / 5 in v1.1). BULL_CALM and BEAR_CALM now point
the right way; RANGE drifts slightly up; CHOPPY and STRESS still
show counter-intuitive mean-reversion edge. **Treat the indicator
as a labeled regime overlay for research, not a stand-alone
trade-direction signal.**
- **Streaming lags exist.** Pivot detection lag ≈ 3 bars,
hysteresis commit lag ≈ `min_run − 1` bars, multi-TF RSI uses
`lookahead=barmerge.lookahead_off` so higher-TF RSI updates only on
higher-TF bar close.
- **S/R level memory capped at 200 (FIFO).** The Python reference
keeps levels unbounded; on very long charts you may see different
bounce decisions than the offline version near the cap.
## Alerts
Seven alert conditions ship in:
- Regime → STRESS
- Regime → BULL_CALM
- Regime → BEAR_CALM
- Regime → RANGE
- Regime → CHOPPY
- Double-bounce UP (support held, second touch)
- Double-bounce DOWN (resistance held, second touch)
Regime alerts fire on transition (state differs from previous bar).
Double-bounce alerts fire at the second-touch bar of any cluster.
## Credits & attribution
- **Visual style** inspired by *FX Market Sessions* by **boitoki**
(Mozilla Public License 2.0). The segment-box-per-run pattern is
borrowed from that script; all classifier logic, feature math,
pivot state machine and S/R clustering is original to SAO · RUBIQ.
- **RUBIQ thesis** — *Rubik's-cube model of the market*: the right
algorithm in the wrong market phase still fails. Distilled from
100+ failed variants across the SAO portfolio.
- **Built by** SNP420 · Jarvis Claudos · Finexus s.r.o.
## License
Same as the parent SAO_RUBIQ project. Use freely, modify freely,
attribute when republishing.
---
*"Trh je proměnlivé prostředí. RUBIQ je centrální nervová soustava,
která to řeší pro všechny SAO strategie."*
— SNP420
インジケーター

SAO RUBIQ Regime v1.1# SAO · RUBIQ — Regime Visualizer
**by SNP420 · Jarvis Claudos · Finexus s.r.o.**
*Pine Script v6 · Build 2026-05-26*
---
## What is it
A research-grade market regime overlay that classifies every confirmed
bar into one of **five regimes** and paints the chart accordingly.
Born out of a simple insight:
> *"The right algorithm in the wrong phase of the market still fails —
> even when it is 100% correct under ideal conditions."*
This is the central thesis of the **SAO · RUBIQ** project: every
strategy lives or dies inside a specific regime × timeframe cell.
Without active regime perception, every trading system is necessarily
under-performing on the bars it was not designed for. This indicator
makes those cells visible.
## The five regimes
| Regime | Meaning |
| ------------- | -------------------------------------------------------- |
| **BULL_CALM** | Trending up with low realized volatility |
| **BEAR_CALM** | Trending down with low realized volatility |
| **RANGE** | Sideways with narrow Bollinger width |
| **CHOPPY** | Sideways with high noise / many directional flips |
| **STRESS** | Volatility spike — any 2 of {rv, ATR z-score, bar range} |
| *UNCERTAIN* | Fallback — nothing fits cleanly (no box drawn) |
Priority order: **STRESS > BULL > BEAR > RANGE > CHOPPY > UNCERTAIN.**
## How it works
The indicator computes the full RUBIQ v1.1 feature stack on every bar:
- ATR(14), ADX/DI(14), Bollinger(20, 2)
- 20-bar realized volatility, 30-bar directional flips
- HH / HL / LH / LL pivot-swing counts in a 30-bar window
- 500-bar rolling medians for BBwidth, RV, ATR, bar range
- ATR z-score, bar-range ratio, price drift in ATR units
It then applies a calibrated rule set (per-feature thresholds derived
from EUR/USD M30 2024-2025 baseline) and assigns one of the six labels.
A hysteresis smoother (`min_run = 5` bars, configurable) suppresses
flicker — a regime is only committed after enough confirming bars.
## Visualization (FX-Sessions-style)
- **Dashed segment boxes** — one box per confirmed regime run, sized
to that segment's high/low range. Mirrors the FX Market Sessions look.
- **Background tint** — semi-transparent regime color over the active span.
- **Bar color** (off by default) — paints OHLC bars with the regime color.
- **Segment label** — regime name anchored to the top of the box.
- **Info table** (top-right) — current state + live feature values.
- **Stats table** (bottom-right) — N bars and % share per regime across
the visible history.
UNCERTAIN bars deliberately render no box and no tint — keeps the
chart clean and matches the "no session" look of FX Sessions.
## Settings worth knowing
- **Calibrated v1.1 rules** (default on) — ~45% confident coverage on
EUR/USD M30. Turn off for strict v1 (~6% coverage, mostly UNCERTAIN —
useful for research only).
- **Hysteresis min_run** — bars of consistent raw state before commit.
Bigger value = less flicker, more boundary lag.
- **Norm median lookback** (500) — window for the rolling median of
BBwidth / RV / ATR / bar range. Lower it for faster adaptation.
- **Swing / drift window** (30) — pivot-count window and `price_drift_atr`
reference horizon.
- **All six regime colors** — fully overridable.
## Sanity-check expectation (EUR/USD M30, 2 years)
If the calibration baseline holds on your data window, the stats
table should land near:
| State | Share |
| --------- | ------ |
| BULL_CALM | ~12% |
| BEAR_CALM | ~12% |
| RANGE | ~7% |
| CHOPPY | ~10% |
| STRESS | ~3.5% |
| UNCERTAIN | ~55% |
Any major divergence on a fresh window = signal to re-validate
(regime shift, threshold drift, or data-feed alignment).
## Honest limitations — please read
- **Tuned to EUR/USD M30 vol scale.** Features themselves are
TF-agnostic, but the cut points (`rv20_norm < 1.8`, `ADX > 20`,
`price_drift_atr > 1.5`, etc.) were calibrated on M30. On H1, D1,
crypto or equities the regime distribution will be approximate
unless you re-tune.
- **v1.1 direction-mapping is incomplete.** Validation diagonal score
is 1/5 — BEAR_CALM bars in the 2024-2025 baseline have a slight
*positive* forward drift. The labels are statistically informative
(shuffle MC p<0.001) but trade-direction routing needs a v1.2 fix.
**Treat this indicator as a labeled regime overlay for research, not
as a stand-alone trade-direction signal.**
- **Streaming hysteresis ≠ offline two-sided smoothing.** Boundary
detection lags by approximately `min_run - 1` bars in real time.
## Alerts
Five alert conditions ship in:
- Regime → STRESS
- Regime → BULL_CALM
- Regime → BEAR_CALM
- Regime → RANGE
- Regime → CHOPPY
Each fires on transition (state differs from previous bar).
## Credits & attribution
- **Visual style** inspired by *FX Market Sessions* by **boitoki**
(Mozilla Public License 2.0). The segment-box-per-run pattern is
borrowed from that script; all classifier logic and feature math
is original to SAO · RUBIQ.
- **RUBIQ thesis** — *Rubik's-cube model of the market*: the right
algorithm in the wrong market phase still fails. Distilled from
100+ failed variants across the SAO portfolio.
- **Built by** SNP420 · Jarvis Claudos · Finexus s.r.o.
## License
Same as the parent SAO_RUBIQ project. Use freely, modify freely,
attribute when republishing.
---
*"Trh je proměnlivé prostředí. RUBIQ je centrální nervová soustava,
která to řeší pro všechny SAO strategie."*
— SNP420
インジケーター

Kinetic Momentum Vectors [BigBeluga]Kinetic Momentum Vectors is a high-performance analytical framework that reimagines price action as a physical system. By calculating the "mass" (volume) and "velocity" (rate of change), the script identifies the Kinetic Energy driving a trend. Instead of traditional lagging oscillators, this tool projects momentum as external "propulsion vectors" anchored to a trend baseline, allowing you to see exactly when a move is fueled by institutional conviction or retail exhaustion.
🔵 THE PHYSICS OF MOMENTUM
Energy Normalization (0-1 Engine): The indicator processes volume-weighted price movement through a Min-Max normalization scaler. This isolates the most explosive "Kinetic Spikes" within your chosen lookback period, ensuring you only react to the most significant institutional surges.
Propulsion Fuel Candles: Momentum is visually detached from price and plotted as "fuel candles" relative to a central EMA. Bullish energy accelerates downward from the baseline, while bearish energy expands upward, creating a "momentum vacuum" that reveals the true strength of a trend's engine.
Kinetic Spike Anchors: When normalization hits the "Spike Threshold," the script locks in a structural vector. These are the exact price levels where maximum work was performed by the market, serving as high-probability pivots for future support and resistance.
🔵 STRUCTURAL INTELLIGENCE
Refining Vector Levels: Unlike static lines, these levels feature a 3-bar confirmation window . The script dynamically updates the vector to the absolute high or low of the momentum event, ensuring your structural anchors are pixel-perfect.
Adaptive Level States: Vectors transition from solid to dashed the moment they are breached. This "Style-Override" logic provides an instant visual alert that a momentum barrier has failed and a potential "S/R Flip" is in progress.
Auto-Scaling ATR Visuals: The vertical height of the momentum candles is governed by current volatility (ATR). This ensures that the visual data remains legible and proportional, whether you are trading a low-volatility Asian session or a high-volatility New York open.
🔵 CORE UTILITY
Identifying "Empty" Trends: A healthy trend requires increasing Kinetic Fuel. If price continues to climb while the fuel candles shrink back toward the baseline, you are looking at a "low-kinetic" divergence—a primary warning sign of a trend reversal.
Institutional S/R Mapping: Use the Kinetic Spike labels as "hard" targets. Because these levels are generated by high-volume price displacement, they represent areas where big players have already shown their hand.
Momentum Breakout Confirmation: Enter trades when a price breakout is accompanied by a full-sized kinetic vector. If the fuel candles remain small during a breakout, it lacks the "mass" required to sustain the move.
The Baseline Magnet: The trend baseline acts as the gravitational center. When price overextends and kinetic energy hits a 1.0 spike, look for a mean-reversion move back toward the EMA baseline.
Kinetic Momentum Vectors strips away the noise of standard technical analysis to reveal the raw energy moving the market. By monitoring the fuel behind the price, you can trade with the flow of institutional kinetic energy and avoid the traps of exhausted trends. インジケーター

インジケーター

Helios Pullback Framework [JOAT]Helios Pullback Framework
Introduction
Helios Pullback Framework evaluates pullback quality using ALMA trend stack, regression trajectory, pullback depth, wick recovery, liquidity capture, compression, and HTF bias.
This open-source indicator is designed as a context tool, not a standalone trading system. It focuses on explaining the current market state with restrained visuals and confirmed-bar logic where signals are used.
Core Concepts
1. ALMA Trend Stack
Fast and slow ALMA lines define execution and institutional spines.
2. Regression Trajectory
A regression envelope provides dynamic path context rather than static zones.
3. Pullback Quality
Pullback depth, wick recovery, phase impulse, and stretch are scored.
4. Liquidity Capture
Confirmed sweeps of recent highs or lows contribute only when aligned with bias.
score = bias + pullDepth + wickRecovery + sweep + compression + htf
Features
ALMA trend stack
Regression trajectory envelope
Pullback depth and wick recovery scoring
Liquidity capture markers
Sparse P+ and P- labels
Input Parameters
ALMA lengths
Volatility and trajectory length
HTF and optional session gate
Signal score, cooldown, and max stretch
Display toggles
How to Use This Script
Use P+ and P- labels as pullback-quality events inside an existing bias. Gold circles mark liquidity capture without full confirmation.
Limitations
The script uses historical OHLCV data and cannot know future prices.
Signals and states can be late during fast reversals because confirmed-bar logic is used to reduce repainting.
Model outputs should be interpreted with market context, risk controls, and independent analysis.
No visual state should be treated as a certain trade outcome.
Originality Statement
Helios is original in replacing supply/demand boxes with a cleaner model that scores pullback elasticity, trajectory, and liquidity capture.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice, investment advice, or a recommendation to buy or sell any financial instrument. All calculations are derived from historical market data and may produce inaccurate readings in some market conditions. No indicator can predict future market behavior. Use proper risk management and independent judgment.
-Made with passion by jackofalltrades
インジケーター

Veyra Shift Ledger [JOAT]Veyra Shift Ledger
Introduction
Veyra Shift Ledger is an open-source execution-context ledger that combines trend, pressure, structure, auction location, displacement, and volatility state. It also draws qualified supply and demand zones anchored to confirmed swing memory.
The indicator is designed to show when several independent context layers align, while keeping signals confirmed and visually organized.
Core Concepts
1. Trend and Regime
Fast, mid, and slow EMAs define trend alignment. ADX, RSI, MACD, and VWAP context contribute to directional quality.
2. Pressure Engine
Signed candle body, range location, and volume are used to estimate bid or ask pressure.
3. Auction Location
Weighted price and deviation bands identify premium, discount, and value conditions.
4. Structure and Displacement
Confirmed pivots define swing memory. BOS, sweeps, and FVG-style gaps contribute to the structure side of the ledger.
5. Supply and Demand Zones
Zones are created only when quality gates pass. Demand zones anchor around confirmed pivot lows and supply zones anchor around confirmed pivot highs, with ATR-scaled height.
Features
Long and short ledger scores: Combines trend, momentum, pressure, structure, auction, and HTF context
Confirmed HTF filter: Optional higher-timeframe EMA uses confirmed previous HTF data
Supply/demand zones: Anchored to confirmed swing memory and ATR-scaled
Zone lifecycle: Zones change appearance when mitigated or invalidated
Execution rails: Optional educational entry, stop, and target projections
Dashboard: Shows scores, pressure, auction, structure, volatility, HTF, and trigger state
Input Parameters
EMA lengths control trend memory
Pressure and auction inputs control volume/weighted-price calculations
Pivot confirmation controls structure sensitivity
Score thresholds control signal selectivity
Risk inputs control optional rail projection
How to Use This Indicator
Step 1: Compare ledger scores
The dashboard shows whether long or short context has stronger evidence.
Step 2: Inspect zones
Supply and demand zones are contextual areas, not certain turning points.
Step 3: Watch mitigation state
Zone color changes help distinguish active, mitigated, and invalidated areas.
Indicator Limitations
Supply and demand zones are approximations from chart data
Pivot confirmation creates natural delay
Pressure is candle-derived and not true order book data
Execution rails are educational projections only
Originality Statement
Veyra Shift Ledger combines a multi-factor score ledger with swing-anchored supply/demand zones, auction context, pressure state, displacement logic, and zone lifecycle visualization.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Zones and scores can fail in live markets.
-Made with passion by jackofalltrades
インジケーター

Multi-Factor Regime Engine Pro [MarkitTick]💡 This indicator represents a robust framework designed to quantify market regimes by analyzing an array of price action, volatility, and momentum metrics. By synthesizing ten distinct market features into a unified confidence score, it dynamically adjusts its threshold bands, providing a highly adaptive approach to trend identification on any standard chart.
✨ Originality and Utility
Standard trend-following tools often rely on static lookback periods and fixed multipliers, which can lead to delayed signals during sudden market shifts or excessive false signals during consolidation. This indicator diverges from traditional methods by introducing a dynamic, feature-engineered confidence score. Instead of relying on a single data point like closing price or standard volatility, it aggregates inputs from momentum oscillators, directional movement indices, volume profiles, and standard deviation bands. This multi-dimensional analysis allows the indicator's bands to compress during high-confidence trends and expand during uncertain, low-confidence environments, offering a highly responsive and adaptive utility for modern chart analysis. Furthermore, it incorporates strict internal safeguards to prohibit execution on non-standard charts, ensuring the integrity of the data and preventing repainting vulnerabilities.
🔬 Methodology and Concepts
● The Feature Engineering Engine
The core of this indicator is built upon extracting ten distinct normalized features from the market data, evaluating multiple dimensions of price action simultaneously:
Momentum Normalization: Utilizes relative strength metrics, centered and scaled, to gauge underlying momentum bias without relying on absolute thresholds.
Directional Strength: Analyzes directional movement indices to quantify the strength of the current trajectory, applying directional penalties when negative movement overpowers positive movement.
Moving Average Distances: Measures the current price relative to fast and slow moving averages, standardizing the distance using the Average True Range to identify structural overextension.
Rate of Change Standardization: Normalizes the rate of change against its own rolling standard deviation to detect statistical anomalies in speed and acceleration.
Standard Deviation Extremes: Evaluates the position of the price relative to upper and lower Bollinger Bands, calculating the precise percentile of the close within the volatility envelope.
Volatility Stability: Compares short-term volatility against long-term volatility baselines to measure market stress and detect rapid expansions.
Volume Anomalies: Assesses current volume against its simple moving average, clamping the result to identify participation spikes that validate price movement.
Price Action Consistency: Calculates the ratio of bullish to bearish closes within the defined lookback period, serving as a raw footprint of buyer versus seller control.
● The Confidence Score Assembly
These standardized features are separated into distinct sub-components. A Directional Score identifies the probable path of the trend by weighting momentum and moving average slopes. A Quality Score measures the structural integrity of that trend by analyzing volume participation and volatility stability. These are mathematically combined to produce a Raw Confidence value. This raw output undergoes an adaptive smoothing process using a dynamic moving average, resulting in a highly stable, final Confidence Score bounded precisely between 0% and 100%.
● Adaptive Ratcheting Bands
The calculated Confidence Score directly influences the width of the trend bands. When the confidence is high, the internal multiplier decreases, tightening the bands closer to the price action to capture shifts quickly and protect accumulated distance. Conversely, when confidence is low, the bands expand to avoid noise and erratic whipsaws. The bands utilize a state-machine logic that only ratchets in the direction of the trend, acting as a trailing threshold that reacts to both price crosses and sudden regime shifts identified by extreme volatility spikes.
🎨 Visual Guide
● Heatmap Candles
The indicator actively repaints the chart candles based on a calculated mathematical "stress" metric.
Colors transition dynamically from a baseline trend color (Deep Sky Blue for bullish conditions, Radical Red for bearish conditions) to a bright orange "Regime Alert" color when underlying volatility spikes significantly.
Candle body opacity is heavily controlled by the alignment of the price action with the overall trend direction, fading to a darker tone during contrary movements or low-confidence pullbacks.
● ML Supertrend Band
Displayed as a prominent, solid line representing the adaptive trailing threshold on the chart.
This band is colored Deep Sky Blue during bullish market phases and Radical Red during bearish phases, updating in real-time as the state machine ratchets.
● Confidence Gradient Cloud
This visual element fills the spatial gap between the median price baseline and the trailing Supertrend band.
The exact opacity and gradient of this cloud are mapped directly to the Confidence Score. A highly opaque, solid cloud represents high confidence, while a highly transparent, fading cloud visually indicates low confidence and potential market transition.
● Visual Labels
Small directional visual markers appear directly above or below the price action when a trend flip occurs.
These labels display an arrow alongside a precise percentage value, representing the exact calculated Confidence Score at the moment the signal was generated.
● Info Table
Located statically in the top right corner, this dashboard displays crucial real-time internal metrics.
It includes the current trend direction, a visual text-based progress bar for the Confidence Score, the live Adaptive Multiplier value adjusting in real-time, the selected Model configuration, and a dynamic text alert that triggers during active Regime Shifts.
📖 How to Use
● Trend Identification
Observe the dominant color of the ML Supertrend Band and the Confidence Gradient Cloud. Deep Sky Blue strongly indicates a bullish environment, while Radical Red suggests a bearish environment. The visibility and thickness of the cloud serve as your primary visual gauge of the trend's structural health.
● Interpreting the Confidence Metric
Monitor the Confidence Score inside the Info Table or at signal generation. A high percentage (e.g., above 70%) suggests that multiple underlying market factors (volume, momentum, standard deviation) are in full agreement with the current directional bias. A rapidly dropping confidence score often precedes a period of choppy consolidation or warns of a potential reversal, allowing for tighter risk parameters.
● Reading Heatmap Candles for Shifts
When the standard colored candles begin transitioning toward the bright orange Regime Alert color, it indicates an abnormal spike in volatility combined with a directional momentum shift. This visually warns the user of a potential "Regime Shift" where the market is undergoing severe internal stress. These specific visual cues often signal an impending breakout from a range or a violent capitulation event.
⚙️ Inputs and Settings
● Model Configuration
Strategic Cycle Mode: Allows the choice between an "Auto" mode and a "Custom" mode. Auto mode dynamically selects the most mathematically optimal lookback lengths, thresholds, and weighting coefficients based purely on the current timeframe in seconds.
Strategic Cycle: When in custom mode, this determines the core lookback period for all volatility and momentum calculations. Smaller values drastically increase reactivity, while larger values provide smoother, long-term macroeconomic analysis.
Macro Trend Threshold: Sets the baseline mathematical width of the threshold bands. Higher values require significantly larger price movements to trigger a trend flip, reducing noise.
Prediction Weight: Controls the internal sensitivity of the bands to rapid changes in the Confidence Score, determining how aggressively the bands compress.
● Visual Settings & Colors
Dedicated toggles are provided to enable or disable the Confidence Labels, the Info Table, and the Heatmap Candles to keep the chart interface as clean as desired.
All core graphical colors, including the specific bands, gradient clouds, table text, and alert highlights, are fully customizable by the user via hex selection.
● Webhook Settings
The indicator is pre-configured to output detailed, formatted JSON payloads designed for external execution automation.
Users can securely define specific action strings for entering and closing both long and short positions directly within the settings menu, mapping exactly to their webhook parser logic.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
● Multi-Variate Feature Standardization
The mathematical foundation of this tool relies heavily on statistical normalization techniques designed to process heterogeneous data. Financial time series data is notoriously non-stationary and spans vastly different numerical scales. To effectively combine disparate metrics like Volume (often measured in millions) and relative strength oscillators (strictly bounded between 0 and 100), the indicator employs rigorous Min-Max scaling and localized Z-score approximations. For instance, the rate of change is evaluated against its own rolling standard deviation over a defined period, successfully standardizing the momentum readout into a continuous, comparable spectrum bounded cleanly between -1.0 and 1.0.
● Linear Weighted Ensembles
The internal architecture utilizes a deterministic linear weighted model to synthesize the final output. By assigning highly specific fractional coefficients to directional features (like the exponential moving average slope and relative strength) and structural features (like Bollinger Band width extremes and volatility stability), the script constructs a singular composite index. This mirrors standard ensemble methodologies found in data science, where the consensus of multiple independent weak learners generates a stronger, more reliable predictive metric than any single indicator could achieve in isolation.
● Volatility-Adjusted State Machines
The adaptive threshold logic operates as a strict finite-state machine incorporating the Average True Range metric. The specific mathematical innovation lies in rendering the ATR multiplier as an inverse linear function of the composite confidence index. In quantitative terms, this produces a dynamically dampened volatility envelope. When the composite index approaches a maximum value indicating high convergence, the dampening factor aggressively compresses the envelope, mathematically acknowledging that high-conviction trends exhibit less erratic mean-reversion behavior and therefore require drastically tighter invalidation levels to preserve structural alpha.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. インジケーター

Easy Trend DirectionEasy Trend Direction (ETD) – Smart UI Arrow
Keep your charts completely clean! Easy Trend Direction (ETD) places a dynamic trend arrow directly in the top right corner of your chart , giving you instant, distraction-free visual feedback on the current market structure and momentum.
Instead of cluttering your workspace with multiple moving averages and oscillators, ETD combines the logic of structural EMAs and RSI momentum into one single, elegant UI element.
How it Works
The indicator analyzes two key technical factors to dynamically update the symbol, angle, and color of the arrow in real-time:
Trend Structure (Direction): The script calculates the relationship between a Fast EMA (default 50) and a Slow EMA (default 200).
Fast EMA > Slow EMA = Bullish (Green)
Fast EMA < Slow EMA = Bearish (Red)
If both EMAs are extremely close to each other (defined by the customizable "Neutral Zone"), the market is consolidating, resulting in a Neutral state (Gray, horizontal arrow) .
Momentum (Strength): Once a trend direction is established, the script uses the RSI (default 14) to determine the angle of the arrow.
High momentum (RSI hitting extreme thresholds like 70 or 30) points the arrow straight up or down.
Normal momentum results in a diagonal arrow, indicating a steady, healthy trend.
Key Features
Zero Chart Clutter: Designed for minimalists. The UI table sits quietly in the top right corner, leaving your candles and price action fully visible.
Customizable Arrow Styles: Use the dropdown menu in the settings to choose between three clean, built-in design sets: "Classic Line", "Heavy Blocks", or "Simple Triangles".
Fully Adjustable Logic: Tweak the EMA lengths, RSI momentum thresholds, and the percentage-based "Neutral Zone" to perfectly fit your preferred asset and timeframe.
Theme Integration: Personalize the Bullish, Bearish, and Neutral colors to match your specific chart setup.
ETD is the perfect confluence filter for daytraders and swing traders who want to stay aligned with the trend at a single glance. Add it to your favorites and never lose sight of the market direction again! インジケーター

Market Strategies - Smart Money ConceptsMarket Strategies – Smart Money Concepts
This indicator is a Smart Money Concepts and market structure toolkit designed to help traders visually identify shifts in market behavior, structural continuation, liquidity sweeps, volumetric order blocks, fair value gaps, and trend transitions in real time.
Unlike simple support/resistance or trend-following indicators, this script attempts to model how price transitions between bullish and bearish auction phases by tracking structural highs/lows, displacement behavior, liquidity interaction, and continuation vs reversal logic.
The script combines multiple institutional-style concepts into a single framework:
Change of Character (CHoCH)
Break of Structure (BOS)
Liquidity Sweeps
Volumetric Order Blocks
Fair Value Gaps (FVGs)
Breaker Structures
Dynamic Market Structure Mapping
Trend State Candle Coloring
Order Block Activity Metrics
Real-Time Structural Transitions
This tool is intended for traders who want a deeper understanding of auction behavior and structural price delivery rather than relying only on lagging indicators.
━━━━━━━━━━━━━━━━━━
CORE CONCEPTS
━━━━━━━━━━━━━━━━━━
■ CHANGE OF CHARACTER (CHoCH)
A CHoCH represents a possible transition in market control.
The script identifies when:
a bullish market loses higher-low continuation and breaks lower,
or
a bearish market loses lower-high continuation and breaks higher.
This is designed to help traders identify potential:
reversals,
momentum shifts,
auction transitions,
or failed continuation conditions.
The CHoCH logic is built from structural pivot analysis and real-time directional state tracking rather than using fixed moving averages or simple crossover conditions.
Bullish CHoCH:
price breaks above a protected structural high after bearish behavior.
Bearish CHoCH:
price breaks below a protected structural low after bullish behavior.
These areas are displayed visually on the chart and can now also trigger alerts.
━━━━━━━━━━━━━━━━━━
■ BREAK OF STRUCTURE (BOS)
━━━━━━━━━━━━━━━━━━
BOS logic is used to identify continuation behavior within an existing trend.
Unlike CHoCH, which suggests possible reversal or transition, BOS confirms that the current directional auction remains intact.
Bullish BOS:
continuation through structural highs.
Bearish BOS:
continuation through structural lows.
This allows traders to visually separate:
continuation conditions,
from
reversal conditions.
━━━━━━━━━━━━━━━━━━
■ LIQUIDITY SWEEPS
━━━━━━━━━━━━━━━━━━
The script can optionally build sweep behavior around structural levels.
This attempts to identify situations where price:
temporarily violates structure,
sweeps liquidity,
then reclaims the level.
These conditions are commonly associated with:
stop runs,
engineered liquidity grabs,
failed breakout conditions,
and reversal setups.
Sweep logic is displayed using dotted structural extensions and “x” interaction markers.
━━━━━━━━━━━━━━━━━━
■ VOLUMETRIC ORDER BLOCKS
━━━━━━━━━━━━━━━━━━
The order block engine attempts to identify the candle or price region responsible for initiating displacement moves.
The script dynamically builds bullish and bearish order blocks using:
structural pivot logic,
directional displacement,
ATR-adjusted range calculations,
and continuation validation.
Features include:
bullish and bearish order blocks,
optional breaker conversion,
order block overlap filtering,
mitigation tracking,
activity metrics,
and midline plotting.
Order blocks can be constructed using:
candle body length logic,
or
full candle range logic.
Mitigation methods include:
Close,
Wick,
Average price.
━━━━━━━━━━━━━━━━━━
■ ORDER BLOCK ACTIVITY METRICS
━━━━━━━━━━━━━━━━━━
The script tracks directional activity inside active order blocks.
This attempts to visualize:
bullish participation,
bearish participation,
and relative order block influence.
Metrics are displayed directly inside the zones and can help traders gauge:
active interest,
participation imbalance,
and zone significance.
━━━━━━━━━━━━━━━━━━
■ FAIR VALUE GAPS (FVG)
━━━━━━━━━━━━━━━━━━
The Fair Value Gap engine detects imbalanced price delivery between candles.
The script identifies:
bullish inefficiencies,
bearish inefficiencies,
and optional breaker conversions after mitigation.
Features include:
overlap filtering,
extension mode,
mitigation tracking,
threshold filtering,
optional raid detection,
and midpoint visualization.
The FVG system can be used to identify:
inefficient price delivery,
potential rebalance areas,
continuation zones,
and reaction levels.
━━━━━━━━━━━━━━━━━━
■ BREAKER STRUCTURES
━━━━━━━━━━━━━━━━━━
Both Order Blocks and Fair Value Gaps can convert into breaker structures after mitigation.
This allows traders to monitor:
invalidated zones,
flipped supply/demand behavior,
and potential continuation or reversal reactions after structural failure.
━━━━━━━━━━━━━━━━━━
■ STRUCTURE MAPPING
━━━━━━━━━━━━━━━━━━
The Mapping Structure feature dynamically plots market swing transitions using pivot relationships.
This creates a visual representation of:
directional auction flow,
structural rotation,
and trend progression.
This feature is useful for traders wanting a cleaner visualization of overall structural movement.
━━━━━━━━━━━━━━━━━━
■ TREND STATE CANDLE COLORING
━━━━━━━━━━━━━━━━━━
Optional candle coloring changes based on detected structural trend state.
This is not based on moving averages.
The coloring is derived from:
active structural bias,
BOS transitions,
and CHoCH transitions.
This helps traders quickly visualize:
bullish auction conditions,
bearish auction conditions,
and transition phases.
━━━━━━━━━━━━━━━━━━
HOW TO USE THE INDICATOR
━━━━━━━━━━━━━━━━━━
This indicator is designed to be used as a structural framework rather than a standalone buy/sell system.
Common use cases include:
• Identifying trend continuation using BOS.
• Identifying potential reversals using CHoCH.
• Watching for liquidity sweeps into structural areas.
• Using order blocks as reaction zones.
• Monitoring Fair Value Gaps for imbalance fills.
• Combining structural shifts with volume, delta, VWAP, or order flow tools.
• Using breaker structures for failed auction analysis.
━━━━━━━━━━━━━━━━━━
BEST USE CASES
━━━━━━━━━━━━━━━━━━
This tool is best suited for:
Smart Money Concepts traders,
market structure traders,
order flow traders,
auction market traders,
intraday traders,
swing traders,
and liquidity-based trading models.
It can be used across:
forex,
futures,
crypto,
indices,
and equities.
━━━━━━━━━━━━━━━━━━
ALERTS
━━━━━━━━━━━━━━━━━━
Current alerts include:
Bullish CHoCH
Bearish CHoCH
Any CHoCH
Bullish Order Block Interaction
Bearish Order Block Interaction
Any Order Block Interaction
These alerts are designed to notify traders when significant structural interaction or directional transition occurs.
━━━━━━━━━━━━━━━━━━
NOTES
━━━━━━━━━━━━━━━━━━
This script is intended as a structural analysis and visualization tool. It does not predict future price movement and should be used alongside proper risk management and broader market context.
The calculations inside this script are based on dynamic structural relationships, pivot logic, displacement behavior, mitigation tracking, and auction-based price interpretation. インジケーター

Auric Reference Crucible [JOAT]Auric Reference Crucible
Introduction
Auric Reference Crucible is an open-source reference-price state engine. It tracks daily open, weekly open, monthly open, and previous close, then classifies how price behaves around each anchor.
The indicator is built for traders who use opening prices and prior closes as decision levels but want a structured way to separate untouched levels, tests, reclaims, rejections, and active control.
Core Concepts
1. Multi-Timeframe Reference Anchors
Daily, weekly, and monthly opens are tracked as higher-timeframe anchors. Previous close is tracked separately. Each reference can be enabled or disabled.
2. Anchor State Classification
Each reference is classified by interaction state: untouched, touched, tested, reclaimed, rejected, or active control. This creates a state machine instead of a static horizontal-line tool.
3. ATR Touch and Reaction Bands
ATR defines touch distance and reaction band thickness so levels adapt to each symbol's current volatility.
4. Control Score
The script scores anchors using state, distance, pressure, and reaction behavior. The strongest anchor becomes the active control reference.
5. Reclaim and Reject Execution Zones
When the active reference and confirmation logic agree, the script can draw compact long or short execution rails with entry, stop, TP1, and TP2.
Features
Daily, weekly, monthly, and previous close references: Core anchors used for session and swing context.
Reference state machine: Tracks touch, test, reclaim, and reject behavior.
Dominant control anchor: Scores references so the most relevant level is emphasized.
ATR reaction bands: Volatility-adjusted zones around active references.
Confirmed state changes: Optional confirmed-bar logic reduces intrabar repaint risk.
Execution rails: Optional long/short plans with stop and target references.
Fade untouched anchors: Keeps inactive references less visually dominant.
Dashboard: Shows anchor state, bias, and control information.
Alerts: Anchor touch, reclaim, reject, long crucible, and short crucible.
Input Parameters
References: Show Daily Open, Show Weekly Open, Show Monthly Open, Show Previous Close.
Signals: Touch Zone ATR, Reaction Band ATR, Reclaim Confirmation Bars, Wick Rejection Multiple, Confirmed-Bar State Changes.
Execution and Visuals: Trend Filter EMA, Pressure Window, Minimum Control Score, Stop ATR, TP1 R, TP2 R, Execution Cooldown Bars, Stored Setup Zones, Reaction Bands, Dashboard, Execution Rails, Signal Zones, Reference Price Tags.
How to Use This Indicator
Step 1: Identify the active reference
Start with the dashboard. It shows which anchor is currently most relevant and whether price is treating that anchor as bullish, bearish, or neutral.
Step 2: Watch reclaim and reject states
A reclaim means price moved back through a reference with confirmation. A reject means price tested the area and failed to hold through it.
Step 3: Use execution rails after confirmation
When a long or short crucible appears, use the plotted entry, stop, and target references as a structured review plan.
Indicator Limitations
Higher-timeframe opens update according to exchange/session boundaries.
Reference levels are context zones, not automatic entries.
ATR bands widen during volatility expansion and narrow during quiet periods.
Confirmed-bar mode means some state changes appear after the bar closes.
Originality Statement
Auric Reference Crucible is original in its reference-state approach. It does not simply plot opens and closes; it classifies anchor behavior, scores active control, adapts reaction zones with ATR, and optionally converts confirmed reclaim/reject behavior into structured execution rails.
Disclaimer
This script is provided for educational and informational purposes only. It is not financial advice and should not be treated as a recommendation to buy or sell. Reference prices can fail, especially during news, gaps, and thin liquidity. Use proper risk management.
Made with passion by jackofalltrades
インジケーター

インジケーター

Vesper Structure Ledger [JOAT]Vesper Structure Ledger
Introduction
Vesper Structure Ledger is an open-source market structure indicator built around KAMA trend context, pivot-based BOS and CHoCH events, liquidity sweeps, equal high/low probes, premium/discount zones, demand/supply boxes, right-side structural rails, managed signal boxes, and a top-right dashboard.
The script is intended to make structure easier to read without relying on arrows or cluttered labels. It distinguishes continuation structure from potential character shifts, then adds trend, impulse, volume, and higher-timeframe context before qualifying stronger events.
Core Concepts
1. KAMA Trend Core
The KAMA engine uses an efficiency ratio to adapt smoothing. When price moves efficiently, the trend line responds faster. In noisy conditions, it slows down and reduces whipsaw sensitivity.
2. Pivot Structure Memory
Confirmed pivot highs and lows are stored as structural references. These levels become the next possible break points for BOS or CHoCH events.
// Conceptual summary
// pivot high and pivot low become current structure rails
// confirmed closes through those rails create BOS or CHoCH events
3. BOS vs CHoCH
A Break of Structure confirms continuation in the current structural direction. A Change of Character marks a break against that direction and can signal a potential shift. Vesper also tracks BOS counts before allowing some character changes to carry more weight.
4. Sweeps and Equal Levels
Liquidity sweeps occur when price probes beyond a swing level and closes back through it. Equal high and equal low probes mark nearby repeated liquidity levels.
5. Demand/Supply and Managed Structure Map
Confirmed qualified signals can create demand or supply zones and a managed visual box with entry, invalidation, and target levels. These levels are for context and planning only.
Features
Adaptive KAMA trend line: Efficiency-ratio smoothing for trend context
BOS and CHoCH logic: Separates continuation breaks from possible character shifts
BOS-count gating: Adds context before stronger reversal interpretation
Liquidity sweeps: Detects confirmed wick-and-reclaim events around swing levels
Equal high/low probes: Marks repeated nearby liquidity levels
Premium/discount fill: Shows position inside the recent structure range
Demand and supply boxes: Projects reaction zones from qualified structure
Right-side rails: Labels KAMA, swing high, swing low, and equilibrium
Managed signal box: Displays entry, invalidation, and target levels
Top-right dashboard: Shows trend, KAMA, slope, structure, BOS count, sweep, equal level, context, impulse, targets, and state
Input Parameters
Trend Core:
KAMA Length
Fast Period
Slow Period
Source
Structure Core:
Pivot Left and Pivot Right
Structure Objects
Show BOS
Show CHoCH
Show Target Lines
Liquidity Core:
Show Liquidity Sweeps
Sweep Lookback
Sweep Buffer ATR
Show Equal Levels
How to Use This Indicator
Step 1: Read trend context
Use KAMA and the dashboard trend row to understand whether price is above or below the adaptive trend.
Step 2: Watch BOS and CHoCH
BOS events suggest continuation. CHoCH events warn that character may be changing.
Step 3: Mark liquidity
Sweeps and equal-level probes identify areas where price has tested or reclaimed liquidity.
Step 4: Use zones as references
Demand/supply boxes and right-side rails help frame current structure. They are not automatic entries.
Indicator Limitations
Pivot-based structure confirms after the right-side pivot window completes
CHoCH events can fail in strong continuation markets
Sweeps require confirmed closes and may appear after the wick forms
Zone boxes are contextual references, not assurances of support or resistance
Originality Statement
Vesper Structure Ledger combines adaptive KAMA trend state, pivot structure, BOS/CHoCH classification, BOS-count context, sweep logic, equal-level probes, premium/discount mapping, projected demand/supply boxes, and managed structure rails in one open-source Pine v6 tool. The purpose is to create a cohesive structure ledger, not a collection of unrelated labels.
Disclaimer
This script is for educational and informational use only. It is not financial advice and does not predict future market behavior. Always use independent analysis and risk management.
-Made with passion by jackofalltrades
インジケーター

Fractional CUSUM Regime Filter [Jamallo]🔹 Intro
The Fractional CUSUM Regime Filter is a quantitative trend and volatility channel indicator designed to identify structural market regimes with high stability. Unlike traditional filters that suffer from lag or whipsaw signals, this indicator applies a dual-layered preprocessor combining Lopez de Prado’s Fixed-Window Fractional Differentiation (FFD) with a classic Cumulative Sum (CUSUM) statistical trigger.
🔹 Break down
Fractional Differentiation (FFD) : Stationarizes pricing input while retaining long-term historical memory (controlled by the "d" parameter).
Classic CUSUM Filter : Accumulates deviations from a rolling baseline relative to current volatility. When cumulative deviation exceeds the threshold multiplier (h), a new regime change is triggered, and the baseline steps dynamically to the new price level.
Vol-Adjusted Percentile Bands : Linear interpolation percentiles of price deviation relative to the stepped baseline. The distances are "locked" and only update on CUSUM regime triggers to prevent wobbly bands.
🔹 Visual Guide: Indicator Anatomy
Here we have the structure of the indicator, including the CUSUM baseline, the 68% inner percentile band, and the 95% outer percentile band.
How to use: Mean Reversion (Pullbacks to the Mean)
The channel boundaries represent statistical extremes. When the price is pushed outside the bands, it is mathematically overextended and highly likely to revert back to the CUSUM baseline.
Long Setup (Pullbacks in Bullish Trend): During a green CUSUM uptrend, watch for price to pull back to the lower bands ("micro pullback") and enter as it heads back up to the baseline mean.
Short Setup (Pullbacks in Bearish Trend): During a red CUSUM downtrend, watch for price to rally into the upper bands ("micro pullback") and enter as it reverts down to the baseline mean.
🔹 How to use: Trend Following & Risk Management
The indicator is designed to capture sustained macro trends while providing clear risk parameters.
Entering on Breakthroughs : Enter when the BUY/SELL signal flags appear (indicating a new CUSUM regime shift).
Stop Loss Placement : Place stop loss orders just below the opposite outer band or below the stepped baseline.
Letting Winners Run : Ride the trend as long as the CUSUM baseline maintains its colored regime state (Green for Long, Red for Short).
🔹 Settings Parameters
d (0.01 - 0.99) : Differentiation order. Lower values retain more historical memory; higher values approach first-difference.
CUSUM Drift & Threshold : Controls baseline sensitivity to regime changes.
Percentile Lookback & Targets : Set the statistical width of the inner and outer boundaries.
インジケーター

Trend Energy Divergence [JOAT]Trend Energy Divergence
Introduction
TED Trend Energy Divergence is an open-source oscillator that measures trend energy from EMA spread, linear-regression slope, projected support/resistance pressure, confirmed structure, and pivot divergence.
The indicator is built for trend-quality context. It shows whether the current move has internal energy, whether structure agrees with that energy, and whether confirmed divergence is appearing against it.
Core Concepts
1. Normalized EMA Spread
Fast and slow EMA spread is normalized by ATR so the oscillator adapts across symbols and timeframes.
2. Slope Pressure
Linear-regression slope contributes directional pressure to the energy model.
3. Projected Support and Resistance
Confirmed pivots build simple projected support and resistance references. Closing beyond those projections adds break pressure.
4. Confirmed Divergence
Pivot highs and lows are compared with oscillator values at the pivot offset to identify bullish or bearish divergence.
5. Energy Signal Line
Trend energy is smoothed and compared with a signal line to show positive or negative shifts.
Features
ATR-normalized energy: Adapts the oscillator to volatility
EMA and slope model: Blends trend spread and regression pressure
Structure-aware pressure: Adds support/resistance break pressure
Confirmed divergence: Uses confirmed pivots and offset oscillator values
Regime dashboard: Shows trend, expansion, or balance context
Projected levels: Displays pane-level support and resistance projections
Alerts: Includes bull shift, bear shift, and divergence confirmations
Input Parameters
Trend Engine:
Fast EMA
Slow EMA
Signal Smoothing
Energy Smoothing
ATR Length
Slope Length
Structure:
Pivot Left and Pivot Right
Structure Lookback
ADX/DMI Trend Threshold
How to Use
Step 1: Read the oscillator relative to the zero line and signal line.
Step 2: Treat upper/lower confirmation bands as higher-conviction energy zones.
Step 3: Watch divergence states as early warnings that the current move may be losing quality.
Step 4: Use the dashboard to confirm whether the environment is Trend, Expansion, or Balance.
Limitations
Divergence confirms after pivots confirm, so it is intentionally delayed
Oscillators can remain extended during strong trends
Projected support/resistance is model-based, not a guaranteed reaction point
The indicator is not a complete trade management system
Originality Statement
TED is an original JOAT oscillator combining ATR-normalized trend spread, slope, projected structure pressure, and confirmed divergence into one Pine Script v6 energy model.
Disclaimer
This script is for educational and informational purposes only. It is not financial advice and does not guarantee future results. Trading involves risk, and users should apply their own risk management.
Made with passion by jackofalltrades
インジケーター

インジケーター

AlphaTrend Momentum Matrix [MarkitTick]💡 The AlphaTrend Momentum Matrix is an advanced, comprehensive trend-following architecture designed to dynamically track market momentum, manage dynamic trade states, and seamlessly bridge the gap between technical charting and automated execution. Far from a simple overlay, this script acts as a multi-layered analytical suite. It evaluates primary trend direction using volatility and volume-weighted money flow, filters out market noise with a custom state-matrix, and projects actionable higher-timeframe data onto the active chart. Furthermore, it incorporates an internal mathematical framework capable of dynamically calculating strict risk-to-reward targets and dispatching meticulously formatted JSON payloads for external webhook execution.
✨ Originality and Utility
● The Momentum Matrix Advantage
While traditional trend indicators rigidly lock onto moving averages or standard price bands, the AlphaTrend Momentum Matrix thrives on market dynamism. Its true utility lies in its multifaceted approach to trend validation. It introduces an exclusive "ATR Breakout Override" system—a custom logic module that forces a trend recalibration if an explosive price movement severely disrupts the standard deviation envelope, regardless of standard trailing conditions. This ensures the indicator remains highly responsive to sudden, high-impact market events without waiting for lagging conditions to catch up.
● Automated Payload and State Management
A standout feature of this tool is its embedded Trade State system. It does not merely paint a signal on the chart; it internalizes the exact entry price, computes a precise stop-loss based on the active AlphaTrend baseline, and mathematically projects a 1:2 risk-to-reward Take Profit target. This localized tracking seamlessly interfaces with the built-in Alert Engine, dynamically injecting these critical metrics into formatted JSON templates ready for third-party automated execution systems.
🔬 Methodology and Concepts
● AlphaTrend Core Engine
The primary directional engine relies on the interplay between the Average True Range (ATR) and the Money Flow Index (MFI). A trailing upper band (Support) and lower band (Resistance) are calculated using a user-defined ATR coefficient. The script interrogates the 14-period MFI; if the MFI reads above 50, indicating positive money flow momentum, the algorithm biases toward the Support band, updating it only when the price makes higher lows. Conversely, an MFI below 50 shifts the bias to the Resistance band.
● Breakout Override Protocol
To counteract the inherent lag of volume-weighted smoothing, the indicator employs a momentum breakout scanner. By measuring the absolute distance between the previous two closing prices and comparing it against the prior ATR multiplied by a sensitivity factor, the script can definitively detect volatility shocks. If a shock occurs concurrently with a directional price cross over the active AlphaTrend line, the system immediately forces a directional shift, bypassing the standard MFI requirements.
● Signal Filtering and Matrix Constraints
Raw signal crossovers are notoriously noisy during consolidation. To mitigate whipsaw trades, this script implements a continuous loop counter (the K and O matrices). It tracks the consecutive bars since the last primary buy or sell condition. A signal is only declared "valid" if it successfully breaks the historical sequence of the opposing trend counter, ensuring that localized micro-fluctuations do not trigger premature trade entries.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
● Volatility and the Average True Range
Developed by J. Welles Wilder Jr. in 1978, the Average True Range is a foundational pillar of this indicator. The ATR scientifically quantifies absolute market volatility by decomposing the entire range of an asset's periodic price action, factoring in gaps and limit moves. By applying a multiplier to the ATR, this script establishes a statistically significant standard deviation envelope, distinguishing between normal market "breathing" and definitive structural shifts.
● Volume-Weighted Momentum via Money Flow Index
The MFI, created by Gene Quigley and Colin Dysart, represents an evolution of the Relative Strength Index (RSI). From an academic standpoint, the MFI incorporates volume into its momentum calculation, producing a more robust metric of buying and selling pressure. It uses the Typical Price (High + Low + Close / 3) multiplied by volume to calculate raw money flow. The 50-level threshold serves as the equilibrium point; sustaining above this level empirically signifies net accumulation, providing the mathematical justification for the indicator's bullish bias.
● Algorithmic State Machines
The signal filtering mechanism and the internal Trade State tracker are practical applications of Finite State Machines (FSM) commonly used in quantitative algorithmic design. The script holds memory of its current operational state (Long, Short, Neutral) and refuses state transitions unless specifically validated mathematical conditions (boolean logic gates) are met, significantly reducing error rates inherent in purely reactive, memory-less indicators.
● Repainting and Lookahead Warning
This script utilizes the request component to pull Higher Timeframe (HTF) context into the primary chart. Crucially, it employs the barmerge.lookahead_on parameter. While this creates a visually perfect, non-lagging representation of higher timeframe trends when analyzing historical data, it introduces lookahead bias. Traders must understand that historical HTF visuals and signals may appear with perfect precision on past bars, but real-time execution will lack this future data context, potentially resulting in different localized behavior in live markets.
🎨 Visual Guide
● The AlphaTrend Trailing Line
Up Trend (Bullish): A bold, solid step-line tracking below the price, rendered in a distinctive golden-yellow (#F0D080).
Down Trend (Bearish): A bold, solid step-line tracking above the price, colored in a deep crimson (#7A2010).
● The Cloud Fill
Dynamic Channel: A semi-transparent shaded area connecting the active AlphaTrend line to a central Cloud Reference Line (a smoothing of the typical price). This cloud visually represents the buffer zone of the current trend.
Color Coding: The cloud dynamically changes color to match the dominant trend (Gold for bullish, Crimson for bearish), allowing for rapid peripheral analysis of market conditions.
● Price Action Overrides
Colored Candles: The bodies and wicks of the actual price candles are uniformly colored to reflect the AlphaTrend matrix state, instantly identifying periods of alignment or divergence.
● Execution Elements
Signal Labels: Distinct "BUY" and "SELL" textual shapes appear precisely on the chart at the moment the state matrix validates a trend shift.
HTF Stepline: When enabled, a secondary, smoothed step-line appears to show the overarching macro trend, colored accordingly to dictate the broader market regime.
📖 How to Use
● Trend Riding and Context
The most effective way to utilize this tool is to align the primary chart timeframe with the HTF AlphaTrend line. If the HTF line is Gold, you should strictly look for "BUY" signals generated by the primary indicator to trade in the direction of the macro trend, ignoring temporary bearish signals as minor pullbacks.
● Momentum Breakout Confirmation
When you observe a sudden color change accompanied by an unusually large price bar, this is often the Breakout Override triggering. These scenarios represent high-momentum events. Instead of waiting for a retest, aggressive traders may use these specific signals to capture immediate volatility expansions, placing their stop-loss strictly on the opposite side of the newly formed AlphaTrend line.
● Automating Your Strategy
For quantitative traders, the indicator handles the heavy lifting of trade logic. Ensure you configure the exact JSON payload strings required by your third-party execution platform (like 3Commas, PineConnector, etc.) in the settings. The indicator will autonomously calculate your risk/reward parameters upon every valid signal and fire a perfectly formatted JSON alert.
⚙️ Inputs and Settings
• ⚙️ Core Calculations
ATR Multiplier: Defines the sensitivity of the trailing line. Lower values (e.g., 0.5) track price closely for scalping; higher values (e.g., 2.0) provide wide breathing room for swing trades.
ATR & MFI Lookback Period: The standard window (default 14) for calculating both volatility and volume momentum.
Display Signals: Toggles the visibility of the "BUY" and "SELL" chart labels.
• 🛡️ Breakout Override
Enable ATR Breakout Override: Turns the momentum-shock detection system on or off.
Breakout Sensitivity: Determines how large a price jump must be (relative to the ATR) to force a trend change. Lower values trigger more aggressively.
• 🕐 Higher Timeframe
Show HTF AlphaTrend: Projects the higher timeframe data onto the current chart.
HTF Timeframe: The specific macro timeframe to monitor (e.g., Daily "D" when trading on the 1-Hour chart).
• ☁️ Cloud Fill
Show Cloud Fill: Toggles the visual buffer zone on the chart.
Cloud Reference Length: Adjusts the smoothing period of the central reference line.
Color Candles: Enables or disables the overriding of standard chart candle colors based on trend direction.
• 🔌 Webhook Execution Config
Payload Actions: Four distinct text fields where you can define the exact syntax your external bot requires for entering longs, entering shorts, closing longs, and closing shorts. These values are automatically injected into the dynamic JSON alert string.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. インジケーター

Adaptive Forecast Bands [JOAT]Adaptive Forecast Bands
Introduction
Adaptive Forecast Bands is an open-source adaptive regression and mean-reversion framework. It estimates a live fair-value path from price, wraps that path in volatility-aware bands, and marks confirmed re-entry conditions only after the bar closes.
The problem this indicator solves is context around stretched price. A static moving average band can lag badly when volatility changes. Adaptive Forecast Bands uses a recursive regression engine, a live model error estimate, and an ATR blend so the envelope expands and contracts with current market behavior.
Core Concepts
1. Adaptive Regression Mean
The centerline is built from a persistent two-parameter regression state. The script uses normalized local time so the model does not depend on raw bar index growth over long histories.
forecastMean = beta0 + beta1 * xNorm
forecastErr = source - forecastMean
2. Error-Based Confidence Bands
Band width is derived from the model's exponentially weighted error plus an ATR component. This keeps the band reactive to both forecast error and realized volatility.
3. Confirmed Re-Entry Signals
The script arms a long or short setup when price reaches an outer band. A signal only prints when price confirms a re-entry back through the relevant band on `barstate.isconfirmed`.
4. Forecast Guide Lines
The right-edge guide projects the current regression slope forward for visual context. It is a guide, not a prediction, and is redrawn on the last bar to avoid object clutter.
Features
Adaptive fair-value line: Recursive regression centerline based on current price behavior
Volatility-aware envelope: Error variance and ATR combine to form dynamic upper/lower bands
Confirmed long/short labels: Re-entry signals use closed-bar logic
Right-edge forecast guide: Dashed and dotted guide lines show current slope context
Top-right dashboard: Bias, confidence, band width, slope, guide state, and signal state
Alert conditions: Long and short confirmed re-entry events
Input Parameters
Model:
Source: Price source used by the model
Forgetting Factor: How quickly the model adapts to new price information
Regression Horizon: Normalization horizon for the regression slope
Band Multiplier: Multiplier applied to model error
ATR Blend: Extra realized-volatility padding in the band width
Rebase Interval: Periodic reset to keep the adaptive model stable
How to Use This Indicator
Step 1: Use the centerline as an adaptive fair-value reference.
Step 2: Treat outer-band touches as stretched conditions, not immediate entries.
Step 3: Wait for confirmed re-entry labels when enabled.
Step 4: Read the dashboard confidence and slope before interpreting the signal.
Indicator Limitations
The right-edge guide is a visualization of current model slope, not a forecast guarantee
Mean-reversion signals can underperform during strong directional trends
The model periodically rebases by design to reduce long-history numerical drift
Signals are confirmed on closed bars and can appear after the intrabar extreme occurred
Originality Statement
Adaptive Forecast Bands is an original JOAT implementation combining normalized recursive regression, error-based confidence bands, ATR blending, confirmed re-entry logic, and a compact interpretive dashboard. It does not copy third-party source code.
Disclaimer
This open-source indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves risk, and historical behavior does not ensure future results. Always use proper risk management.
-Made with passion by jackofalltrades
インジケーター

Sentinel Trailing Bench [JOAT]Sentinel Trailing Bench
Introduction
Sentinel Trailing Bench is an open-source contextual trailing-stop overlay designed to behave differently from a standard ATR stop. It blends a sorted price-distribution engine, ATR protection, adaptive recovery behavior, and a benchmark rail so the trailing structure can react to both volatility and local value geometry.
The problem Sentinel solves is stop quality. Simple trailing stops either hug price too tightly in noisy conditions or drift too far away to be useful. Sentinel uses neighborhood structure from a sorted close buffer to estimate contextual bands, then mixes that with ATR logic and recovery tightening when the active side is under pressure.
Core Concepts
1. Sorted distribution engine
The script maintains a rolling close buffer and a sorted mirror of that buffer. This allows it to derive contextual neighborhood slices around the current price instead of relying on ATR alone.
2. Percentile-derived context bands
Supportive and defensive reference levels are estimated from the nearby distribution rather than only from recent swing points.
3. ATR-backed resilience
An ATR anchor remains part of the design so the stop still respects current volatility when distribution structure becomes thin or unstable.
4. Recovery tightening
If price moves materially against the active side relative to the last switch price, the adaptive rail is pulled closer to price to avoid stale trailing behavior.
5. Institutional bench display
The overlay shows the active stop, a benchmark line, the adaptive rail, directional clouding, candle tinting, and a compact dashboard that summarizes trend state, value state, stop gap, and recovery status.
Features
Distribution-aware trailing stop: Uses a sorted close engine and local neighborhood structure
ATR defensive anchor: Keeps the stop grounded in current volatility
Adaptive recovery pull: Tightens the guidance rail when the active side is stressed
Benchmark line and adaptive rail: Adds visual context beyond the raw stop itself
Directional cloud and candle tint: Clean visual bias cues without retail-style arrows
Top-right dashboard: Reports trend state, regime context, value position, stop gap, and recovery status
Confirmed-bar flips: Regime flips are confirmed on closed bars only
Input Parameters
Core:
Distribution Buffer
Neighborhood Radius
ATR Length
ATR Anchor
Benchmark Length
Context:
Distribution Blend
Recovery Threshold xATR
Recovery Pull
Anchor Smoothing
Visuals:
Show Benchmark
Show Adaptive Rail
Show Band Clouds
Color Candles
Show Dashboard
How to Use This Indicator
Step 1: Read the active side
The dashboard and cloud color show whether the stop is currently managing an ascent or descent state.
Step 2: Watch stop gap and rail gap
The dashboard shows how far price sits from the active stop and adaptive rail in ATR terms. This helps frame whether the trailing structure is loose or tight.
Step 3: Monitor recovery
If recovery becomes active, the stop structure is signaling that the current side is under stress and the rail is tightening.
Step 4: Use it as trade management context
Sentinel is most effective as a management tool layered onto entries generated elsewhere.
Indicator Limitations
Distribution-derived bands depend on the sample window and will evolve as new closes enter the buffer
In extremely fast conditions, any trailing stop can still gap beyond the intended exit area
Recovery tightening improves responsiveness but can also accelerate exits in choppy reversals
Originality Statement
Sentinel Trailing Bench is original in how it fuses sorted-distribution neighborhood structure, ATR resilience, and adaptive recovery behavior into one trailing-stop overlay. It is published because:
The stop uses local price distribution context instead of ATR alone
The recovery module changes behavior when the active side is materially under pressure
The benchmark, rail, cloud, and dashboard turn trailing logic into a full management framework rather than a single line
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice and does not guarantee future market behavior. Trailing stops can still be affected by volatility shocks, gaps, and structural changes in the market. Always use independent judgment and proper risk management.
インジケーター

Parallax Density Atlas [JOAT]Parallax Density Atlas
Introduction
Parallax Density Atlas is an open-source price-acceptance overlay that maps where the market has spent the most time doing business across a recent lookback. It combines a kernel density estimate of recent closing prices with percentile-based value rails so the user can see both the smooth acceptance curve and the practical operating envelope around it.
The problem Parallax solves is hidden value structure. Traders often know whether price is moving, but not whether that movement is taking place inside accepted value, above value, or below value. Parallax puts that information directly on the chart through a point of control, value area boundaries, rails, cloud zones, and a concise dashboard.
Core Concepts
1. Kernel density estimation
The script evaluates a Gaussian kernel across recent closes to estimate continuous price density:
densitySum += gaussianKernel((evalPrice - samplePrice) / bandwidth)
densityValue = densitySum / (array.size(closeSample) * bandwidth)
This creates a smooth value map instead of a stepped histogram alone.
2. Point of control and value area
The highest-density node becomes the point of control. From there, the script expands outward until the target percentage of total density is captured, defining the value area high and low.
3. Percentile rails
In parallel with the KDE engine, the script maintains sorted close samples and derives lower and upper rails from user-defined percentiles. Those rails create a stable operating envelope around recent value.
4. Density cloud
Only the densest accepted zones inside the value area are shaded as a cloud, keeping the display focused on high-importance price zones rather than every possible level.
5. Context and skew
The dashboard reports whether current price is accepted inside value, expanding above value, or trading below accepted value, along with skew and rail width.
Features
KDE value map: Smooth density estimate built from recent closes
Point of control: Highest-density price node marked directly on the chart
Value area boundaries: High and low edges of accepted price territory
Percentile value rails: Smoothed lower and upper rails from sorted price samples
Density cloud: Highlights only the strongest accepted zones
Right-side profile: Extends density visually to the right of current price
Optional candle tinting: Reflects where price sits inside the value structure
Top-right dashboard: Shows POC, value area, rail width, skew, and current location state
Input Parameters
Density Engine:
Lookback
Density Steps
Bandwidth Multiplier
Value Area Percent
Value Rails:
Lower Rail Percentile
Upper Rail Percentile
Rail Smoothing
Visual System:
Profile Width Bars
Cloud Threshold
Show Density Cloud
Show Right Profile
Tint Candles
Show Dashboard
How to Use This Indicator
Step 1: Start with location
Read whether price is inside value, above value, or below value. This defines whether the market is rotating in accepted territory or exploring away from it.
Step 2: Use POC as the acceptance anchor
The point of control marks the most accepted price in the sample window. Reactions around it can frame mean-reversion and acceptance behavior.
Step 3: Compare rails with value area
The rails provide a smoothed operating envelope while the value area shows the densest accepted region. Using both together gives a more complete value map.
Step 4: Monitor skew
Positive skew means the density center is leaning upward in the sample range. Negative skew means accepted value is leaning lower.
Indicator Limitations
The density map is lookback-dependent and will evolve as old data leaves the sample
KDE on closing prices is an acceptance approximation, not a full order-flow model
Strong trends can stay outside accepted value for extended periods
Originality Statement
Parallax Density Atlas is original in how it pairs a continuous KDE-based value map with percentile rails and a selective density cloud in one overlay. It is published because:
The script combines smooth value estimation with rail-based structure instead of using one method alone
It focuses the cloud only on high-density accepted regions, preserving chart cleanliness
The dashboard turns the density map into a practical location framework rather than a purely visual profile
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice and does not guarantee future market behavior. Value zones can shift as new data enters the sample, and persistent trends can stay outside accepted areas longer than expected. Always use independent judgment and proper risk management.
インジケーター

インジケーター

Covenant Regime Register [JOAT]Covenant Regime Register
Introduction
Covenant Regime Register is an open-source market context indicator that classifies whether price is currently behaving like a directional auction or a rotational auction. Instead of treating trend detection as a single yes-or-no output, the script builds two competing probability streams and continuously updates which state has stronger evidence.
The problem this indicator solves is context drift. Many tools are applied the same way in every environment even though trending conditions and ranging conditions reward very different decisions. Covenant Regime Register separates those environments first, then exposes confidence, directional efficiency, and bias so the trader can decide whether to lean into continuation logic or step back into rotation logic.
Core Concepts
1. Multi-factor regime observations
The regime engine does not rely on one input. It blends normalized returns, normalized volatility, directional efficiency, and slope persistence into a two-state regime model:
logReturn = math.log(close / nz(close , close))
realizedVol = ta.stdev(logReturn, volatilityLength)
efficiencyRatio = math.abs(close - close ) / math.sum(math.abs(ta.change(close)), efficiencyLength)
This keeps the classification grounded in both movement quality and volatility behavior.
2. Probabilistic state competition
Directional and rotational states each receive an emission score. Those scores are then smoothed through a persistence-heavy probability engine so the output does not flip on every small fluctuation:
posteriorTrend = emissionTrend * priorTrend
posteriorRange = emissionRange * priorRange
trendProb := trendProb + learningInput * (targetTrend - trendProb)
The result is a stable state register rather than a noisy binary switch.
3. Confidence-aware classification
The script only considers a regime confirmed when the dominant state exceeds the user-defined confidence threshold on a confirmed bar. This helps reduce false transitions during temporary turbulence.
4. Probability spread visualization
Trend probability and range probability are plotted together, while the spread between them is shaded as a separate area. This lets the user see whether the market is decisively one-sided or only marginally biased.
5. Institutional dashboard
The top-right dashboard reports current state, confirmation status, trend probability, range probability, efficiency, and directional bias using a restrained dark palette designed to stay readable on a clean chart.
Features
Two-state regime model: Directional auction versus rotational auction
Multi-factor classification: Uses returns, volatility, efficiency, and slope instead of a single oscillator threshold
Probability outputs: Trend and range are shown as separate probability streams
Confidence gate: Regimes are only considered confirmed above the user-defined threshold
Spread visualization: Shows the separation between the two competing states
Dark institutional dashboard: Compact top-right panel with current state and supporting metrics
Confirmed-bar regime alerts: Alerts only fire when a new regime is confirmed on bar close
Non-repainting design: Uses only current-timeframe information and confirmed-bar state transitions
Input Parameters
Regime Engine:
Return Lookback: Smoothing window for the return series
Volatility Lookback: Window used to normalize realized volatility
Efficiency Length: Measures directional travel versus rotational travel
Probability Learning: Controls how quickly the posterior probabilities adapt
Trend Confirmation Threshold: Minimum dominant probability required before a regime is treated as confirmed
Visual System:
Show Regime Backdrop
Show Probability Spread
Show State Ribbon
Show Dashboard
How to Use This Indicator
Step 1: Read the dominant state
If Trend Probability is above Range Probability and the confidence threshold is met, the market is behaving more directionally. If Range Probability dominates, the market is behaving more rotationally.
Step 2: Check confirmation
Use the confirmation state before treating the output as actionable. Developing readings can still change as the current bar closes.
Step 3: Use efficiency and bias together
High efficiency with strong directional bias supports continuation logic. Low efficiency with range dominance supports mean-reversion or lower-aggression decision making.
Step 4: Apply it as a filter
This indicator is best used as a context layer for other tools. It is not intended to predict the next bar by itself.
Indicator Limitations
Regime models classify the present environment; they do not forecast future direction
Extremely fast reversals can temporarily lower confidence before the new state stabilizes
Range and trend can overlap during transition periods, so marginal readings should be treated cautiously
Originality Statement
Covenant Regime Register is original in how it combines normalized return behavior, normalized volatility, directional efficiency, and slope persistence into a compact two-state probability register with an explicit confidence gate. It is published because:
The script produces competing regime probabilities rather than a single trend flag
The classification emphasizes state persistence and bar-close confirmation instead of hyper-reactive regime flipping
The dashboard surfaces regime context in a compact format suitable for use as a decision filter alongside other indicators
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice and does not guarantee future market behavior. All regime classifications are derived from historical and current price behavior and can produce false or delayed readings. Always use independent judgment and proper risk management.
インジケーター

RSI Optimized with Smoothings & Divergence (RSI Optimized)This indicator enhances the classic RSI by adding multiple smoothing layers, a dynamic background based on the average of six smoothings, an info table, and regular divergence detection.
🔹 **Core RSI**
Standard RSI calculation (Wilder) with fully adjustable length and source. Overbought/oversold levels (70/30) are highlighted with a gradient fill.
🔹 **Smoothing MA**
Optionally apply a moving average to the RSI line (SMA, EMA, SMMA, WMA, VWMA). The "SMA + Bollinger Bands" mode adds Bollinger Bands around the smoothed RSI.
🔹 **Six Smoothings (instead of a ribbon)**
Six independent moving averages of the RSI (customizable type and lengths) are plotted. Useful to visualise multiple timeframes or sensitivities at once.
🔹 **Background color (RSI vs Avg of 6 Smoothings)**
Compares the RSI value to the simple average of the six smoothings. Green background when RSI > average (bullish bias), red when RSI < average (bearish bias).
🔹 **Info Table**
Displays in real time:
- Current RSI value (color‑coded by overbought/oversold)
- Average of the six smoothings
- Ratio = (RSI + Avg)/2
- Trend direction (based on RSI vs average)
- Zone (Oversold / Overbought / Bull / Bear / Neutral)
- Smooth trend (fast smoothing 1 vs upper smoothing 6)
🔹 **Regular Divergences**
Detects regular bullish and bearish divergences between price and RSI. Pivot lookback is fixed to 5 bars left/right. An alert is available for each divergence type.
🔹 **All options are configurable via the Settings tab** – from lengths, colors, smoothing types to enabling/disabling the table or divergences.
📌 **How to use**
- Use the six smoothings to identify trend alignment (e.g., all above 50 = strong uptrend).
- The background turns green when RSI stays above the average of all smoothings.
- Watch for divergence signals (labelled "Bull" / "Bear") for potential reversals.
- The info table gives a quick snapshot of momentum and trend state.
This tool is ideal for traders who want a richer RSI experience without cluttering the chart.
NOTE PERSO :THANK TRADING VIEW FOR YOU WORKS , YOU ARE BEST !!! & ENJOY TEAM TRADING VIEW MAKE PEACE NOT WARS !!! STAY TUNED !! インジケーター
