OPEN-SOURCE SCRIPT

Regime Gated Confluence Score [Pineify]

1 067
Regime Gated Confluence Score [Pineify]

Overview
This pane indicator combines trend, momentum, and volume after a four-state gate selects meaning and weight. The main score and dashboard reconcile signed contributions.

Problem Definition
Fixed-weight confluence hides a regime error. Positive RSI may confirm a trend but mark extension in a range. EMA separation can persist after efficient travel ends. Relative volume shows participation, not acceptance. A permanent sum can stay strong when path efficiency is low, factors disagree, or ATR leaves its baseline, so users cannot tell whether magnitude reflects agreement or one dominant input.

Design Rationale
ATR-normalized EMA separation and slope measure trend across price scales. Centered RSI supplies momentum; RANGE reverses it to express a fade. Volume pressure combines capped relative volume with close location without claiming aggressor flow. EMA spread and path efficiency classify structure; ATR versus baseline identifies displacement. Lower hold thresholds add hysteresis. A trained model would add hidden data assumptions, while fixed weights preserve the failure. Explicit rules accept sensitivity and lag for auditability.

Key Features
  • Four regimes with hysteresis.
  • Standardized trend, RSI, and participation factors.
  • Regime weights, range inversion, missing-volume renormalization, conflict attenuation, exact contribution totals, and confirmed alerts.


How It Works
EMA spread and fast-EMA change are normalized by ATR, blended 65/35, and clipped to -1 through +1. RSI is centered at 50, divided by 25, and clipped. Volume multiplies close location inside the bar by relative volume capped at 2.5 times baseline, then smooths it. If fewer than 80% of volume-window bars are usable, volume is omitted.

Trend strength is absolute normalized EMA spread. Path efficiency divides net movement by total one-bar movement. ATR relative to baseline measures displacement. VOLATILE has priority until its lower hold level clears. Otherwise, strong separation and efficiency enter TREND, weak evidence enters RANGE, and unresolved evidence is TRANSITION.

Trend/momentum/volume weights are 55/30/15 in TREND, 15/60/25 in RANGE, 40/35/25 in VOLATILE, and 35/40/25 in TRANSITION. RANGE reverses only RSI. Missing volume removes its weight and renormalizes the others. Agreement divides absolute net contribution by total absolute contribution and sets a 0.55-to-1 gate; VOLATILE adds an ATR penalty. Gated components sum to the score. Warm-up or invalid threshold and EMA ordering blocks output with a diagnostic.

How Multiple Indicators Work Together
Trend estimates structure, momentum locates bounded pressure, and volume tests participation plus bar acceptance. The regime interprets them before combination. Without range inversion, extension becomes a continuation vote; without trend, brief momentum can dominate; without volume, weights must be renormalized. Agreement converts remaining conflict into lower magnitude rather than hiding it.

Trading Ideas and Insights
Use the score as context, not an order. A confirmed threshold cross during TREND identifies aligned conditions. In RANGE, check whether trend or volume opposes inverted momentum before considering a fade. In VOLATILE, a compressed gate shows ATR displacement discounting the raw sum. A strong component beside a modest total indicates conflict.

Unique Aspects
The contribution is the sequence of classification, interpretation change, weighting, and attenuation. RANGE reverses momentum while other factors can veto it; hysteresis separates trend entry from persistence; missing volume is removed; and agreement scales every component so the ledger equals the score. The halo shows magnitude, the background shows regime, and the table exposes construction.

How to Use
Start with defaults and compare the regime label with visible path behavior. Wait for warm-up. Keep the ledger visible to see whether structure, oscillator pressure, or participation drives direction. Use confirmed alerts when closing-state transitions matter. Contribution lines are diagnostic; the halo and background form the primary view. Omitted volume means a disclosed two-factor score.

Customization
EMA lengths and slope lookback control structural response; RSI length controls momentum sensitivity. Volume baseline and smoothing trade speed for stability. Regime length changes path efficiency and the ATR baseline. Entry thresholds must exceed hold thresholds. Raising the score threshold reduces alert frequency but does not establish better forecasting. Visual switches change display only.

Assumptions and Limitations
The script uses chart OHLC and reported volume. Exchange, tick, and absent volume differ; close-location volume is only a proxy. EMA, ATR, RSI, and rolling baselines lag. RANGE can fade a breakout, hysteresis can delay exits, and attenuation can suppress an early shock.

Realtime factors, regime, colors, and score can change before close; alerts require confirmation. No request calls, future data, pivots, or negative offsets are used. The script does not model liquidity, news, sizing, entries, stops, or exits. Thresholds do not establish expected return. Sparse bars and unreliable volume can distort evidence.

Conclusion
This replaces a fixed sum with an inspectable state process. The score and ledger show weights, conflict attenuation, and missing-data effects. Keep separate risk and execution rules.

.

Penafian

Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.