Entropic Structure Bands [JOAT]Entropic Structure Bands
Introduction
Entropic Structure Bands is an open-source overlay indicator that dynamically selects the best-fitting Ordinary Least Squares regression window from recent structural pivots and surrounds that regression channel with entropy-adjusted deviation bands. The key innovation over standard regression channel indicators is twofold: the window length is selected optimally each bar by searching through available pivot anchors for the highest R² × log(N) quality score, and the band width is modulated by the current Shannon entropy of log returns — widening during chaotic periods and tightening during orderly ones.
Core Concepts
1. Optimal Regression Window Search
Rather than using a fixed lookback, the indicator records the bar index of every confirmed pivot high and low. Each bar, it tests several candidate windows anchored at recent pivots and selects the one that maximizes a performance score: R² multiplied by the natural log of the window length. This rewards both fit quality and window depth simultaneously:
float score = r2 * math.log(float(N))
// highest score wins; window updates every bar
if trial.perfScore > bestScore
bestScore := trial.perfScore
bestMdl := trial
The regression channel therefore adapts to where significant price structure has occurred, not to an arbitrary fixed period.
2. Shannon Entropy Modulation
Shannon entropy of the log return distribution is computed using a histogram-binning approach. Low entropy means returns are concentrated — price is moving in an organized, directional way. High entropy means returns are evenly distributed — chaotic, noisy conditions. Band width scales with entropy:
float entAdjDev = bestMdl.stdErr * (1.0 + entNorm * 0.8)
When entropy is low (below the configurable threshold), the market is classified as orderly and signals are enabled. This prevents signals from firing into chaotic conditions where regression bands have less predictive value.
3. Trend-Confluence Signal Logic
Signals require simultaneous alignment of six conditions: regression slope direction, price position relative to midline, recent pullback to the inner band, momentum confirmation, optional HTF slope alignment, optional ADX trending gate, and optional RSI gate. Each condition is individually toggleable. This multi-factor gate replaces simple band-crossover logic with a structured confluence requirement.
4. Forward Projection
The regression channel extends forward by a configurable number of bars beyond the right edge of the chart. A projection target label marks the estimated price at the end of the projection window based on the current slope and intercept. This gives visual context for where the regression model expects price to be if the current trend continues.
5. Z-Score Candle Coloring
Each candle's position within the channel is expressed as a Z-score (standard deviations from the regression midline). Candles far above the midline (overbought extension) are tinted bear-color; candles far below (oversold extension) are tinted bull-color. This provides immediate visual context for where price stands within its current regression structure.
Features
Dynamic regression window: Optimal window selected each bar from pivot anchor scan
R² quality gate: Configurable minimum R² prevents low-fit windows from being used
Entropy-adjusted bands: Band width scales with Shannon entropy of log returns
Multi-factor signal gate: Six independently configurable confluence conditions
Forward projection: Channel extended beyond right edge with target label
Z-score candle coloring: Candles painted by standard deviation position in channel
Inner and outer bands (±1σ, ±2σ): Gradient-filled channel layers
Glow-effect midline: Double-drawn center line with transparency for depth
10-row dashboard: R², entropy, Z-score, duration, HTF alignment, ADX, RSI, signal state
JSON webhook alerts: Alert messages formatted as JSON with EP, TP, SL, and R²
Input Parameters
Regression Engine:
Pivot Scan Horizon: Number of pivots to evaluate as regression anchors (default: 20)
Pivot Sensitivity: Left/right bars for pivot confirmation (default: 5)
Min R² Quality Gate: Minimum fit quality to use a window (default: 0.50)
Band Multiplier 1/2: Inner and outer band standard deviation multiples (default: 1.0, 2.0)
Entropy System:
Entropy Lookback: Bars for entropy calculation (default: 20)
Entropy Bins: Histogram bins for return distribution (default: 10)
Low Entropy Threshold: Threshold below which market is classified as orderly (default: 2.5)
How to Use This Indicator
Step 1: Read the Slope Bias
Check the dashboard's Slope Bias row. BULLISH or BEARISH indicates the current regression direction. This is the primary directional input.
Step 2: Check Entropy State
LOW (orderly) entropy is the condition under which signals are most reliable. HIGH entropy warns that the regression model is operating in a chaotic environment.
Step 3: Wait for Signal Labels
LONG and SHORT labels appear only when the full confluence gate is satisfied. Each label shows entry price, TP1, TP2, stop loss, and R² quality.
Indicator Limitations
Regression channels repaint historically when the optimal window shifts to a new anchor; use the confirmed-bar signals for non-repainting entry logic
In markets with very few pivots, the scan horizon may find suboptimal windows with low R²
Shannon entropy requires sufficient lookback to produce stable estimates
Originality Statement
The dynamic pivot-anchored regression window search using R² × log(N) scoring, combined with Shannon entropy-modulated band width and a six-condition confluence signal gate, is the original analytical architecture of this publication. No existing published Pine Script regression channel indicator implements adaptive window selection from pivot anchors with entropy modulation in this manner.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Regression channels are mathematical models of past price behavior and do not predict future price. Trading involves substantial risk of loss.
-Made with passion by jackofalltrades
Indicator

Indicator

Smart Trend Flow Pro [MarkitTick]💡 Navigating modern market structures requires a robust mechanism capable of filtering out transient noise while capturing the dominant directional vectors. The Smart Trend Flow pro is an advanced analytical framework designed to dynamically track market momentum and volatility, transforming complex price action into a highly readable, visual heatmap. By synthesizing trend identification with continuous volatility scaling, this tool aims to provide clarity in both ranging environments and high-expansion phases, allowing for more structured and disciplined market analysis.
✨ Originality and Utility
● A Paradigm Shift in Trend Visualization
Traditional channel-based indicators often suffer from severe lag or become entirely unreadable during periods of intense market contraction. The utility of this script lies in its adaptive ability to map structural boundaries and instantly correlate them with localized market energy. By discarding static thresholds in favor of a dynamic, self-adjusting baseline, the tool presents a unified view of both direction and conviction.
● Beyond Binary Signals
Standard indicators frequently rely on binary conditions—such as a simple moving average crossover—which ignore the underlying volatility context. This script pioneers a synthesized approach where the strength of a trend is continuously evaluated against its own historical variance. This allows users to visually differentiate between a low-conviction drift and a highly energized breakout, providing a much richer context for potential trade management and risk assessment.
🔬 Methodology and Concepts
● Dynamic Boundary Engine
At the core of the script is a reactive boundary detection mechanism. Rather than projecting fixed bands, the engine establishes fluid upper and lower parameters based on recent localized extremes. These boundaries can be structurally smoothed using various adaptive algorithms, effectively tuning the sensitivity of the channel to match the specific rhythm of the asset being analyzed.
● Volatility Normalization Process
To accurately gauge market energy, the framework continuously measures the distance between the established boundaries. This raw measurement is then subjected to a rigorous statistical normalization process. By evaluating current fluctuations against a rolling historical baseline, the engine maps the resulting variance onto a bounded curvilinear scale. This abstract transformation isolates the pure kinetic energy of the market, stripping away absolute price dependencies to provide a standardized metric of volatility expansion and contraction.
● Integrated State Tracking
The logical engine monitors the interaction between the closing prices and the smoothed boundary parameters. A structural shift is recognized only when price definitively breaches and sustains its position relative to these dynamic thresholds. This state-tracking ensures that the primary directional bias is maintained until a statistically significant reversal occurs, minimizing false positives during minor retracements.
🎨 Visual Guide
● Color-Coded Heatmap Candles
The primary visual feature is the complete transformation of the standard candlestick chart into a continuous heatmap. The colors directly correspond to the synchronized output of the trend direction and the normalized volatility metric.
Bullish Gradients: When the market establishes an upward bias, the candles transition through a cool-to-hot spectrum. Deep, cold colors represent low-volatility accumulation phases, while bright, hot neon colors signify intense, high-volatility bullish expansion.
Bearish Gradients: Conversely, downward structural shifts are mapped using a separate color spectrum. Dark, muted tones indicate slow, grinding bearish action, whereas vivid, hot colors highlight rapid, high-volatility sell-offs.
Neutral States: When the price resides within the core boundary parameters, demonstrating no clear directional dominance, the candles default to a flat, neutral gray to reduce visual noise.
● Signal Markers
Buy Labels: Distinct markers appear precisely below the price action when the engine confirms a definitive upward structural breach.
Sell Labels: Clear markers are printed above the price action upon the confirmation of a downward structural breach.
📖 How to Use
● Interpreting the Heatmap
The most effective way to utilize this tool is to read the candle colors as a topographical map of market energy. A transition from a neutral state into a cold bullish or bearish color suggests the early formation of a trend. As the colors heat up and transition toward their neon extremes, it confirms that the directional move is being supported by expanding volatility, which often characterizes the most robust phase of a trend.
● Managing Trend Exhaustion
Traders can monitor the intensity of the heatmap to gauge potential momentum decay. If a strong trend has been characterized by hot, neon colors, a gradual cooling off—where the colors revert to darker, colder shades—may indicate that the localized volatility is subsiding, suggesting potential consolidation or a pending structural shift.
● Confirming Breakouts
The printed Buy and Sell labels serve as structural confirmation points. These markers are best utilized not in isolation, but in confluence with the heatmap. A signal label accompanied by an immediate transition into a high-volatility color spectrum carries significantly more analytical weight than a signal that remains mired in a cold or neutral visual state.
⚙️ Inputs and Settings
● Channel Settings
Channel Length: Determines the primary lookback window for establishing the core upper and lower boundaries. Increasing this value creates a wider, slower-moving channel, while decreasing it makes the system highly sensitive to recent price action.
Channel MA Type: Allows the user to apply different smoothing algorithms to the boundaries. Options range from the standard baseline to advanced weighting methods, providing precise control over signal reactivity.
● Analytics Settings
Squeeze/Z-Score Length: Defines the historical window used to evaluate the relative volatility. A longer length provides a smoother, more macro-level volatility assessment, while a shorter length makes the heatmap highly reactive to sudden micro-expansions.
● Candle Heatmap Settings
Bullish/Bearish Color Controls: Fully customizable inputs allowing the user to define the exact hex values for the cold and hot extremes of both the bullish and bearish spectrums.
Neutral Market Base: The default color applied when the market is bound within the channel without a confirmed directional state.
● Signal Settings
Label Colors: Configurable color selections for the printed Buy and Sell confirmation markers.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
● Topological Price Mapping
At a fundamental level, the script treats financial time-series data not as discrete data points, but as a continuous topological surface. By evaluating the highest and lowest ranges over a specified temporal window, it effectively creates a rolling bounding box that encapsulates the probable distribution of future price vectors. The application of sophisticated moving average algorithms to these boundaries acts as a low-pass filter, mathematically attenuating high-frequency noise and exposing the true underlying macroeconomic drift.
● Non-Linear Variance Scaling
The most complex aspect of the engine is its approach to variance. Standard deviation on its own is an unbounded metric, making it difficult to utilize in a standardized visual format. The script solves this by isolating the width of the bounding box and comparing it against its own moving average and standard deviation. This transforms the raw width into a standardized probabilistic metric.
● The Sigmoidal Activation Function
To achieve the seamless visual gradient, this standardized variance must be mapped onto a finite plane. The engine employs a logistic function—specifically, a sigmoidal activation curve—to compress the unbounded variance data strictly between a 0 and 100 scale. This non-linear mapping ensures that the visual heatmap remains highly sensitive to subtle shifts around the mean, while gracefully asymptotically compressing extreme, outlier volatility spikes, thereby maintaining absolute visual coherence regardless of the asset's inherent behavior.
⚠️ 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. Indicator

Synapse Trail Pro [WillyAlgoTrader]◆ SYNAPSE TRAIL PRO — FREE & OPEN-SOURCE
Synapse Trail Pro is an overlay indicator that fuses a ratcheted ATR trail, a 3-factor market regime engine, a 5-factor signal quality score, and a complete risk-management layer (SL + TP1/TP2/TP3 + automatic break-even) into one decision-support system. Every signal arrives pre-graded (A / B / C), pre-leveled (SL and three targets drawn on the chart), and pre-contextualized (regime, HTF bias, volume, RSI, ATR percentile — all in one dashboard).
The core problem it solves: classic SuperTrend-style trails fire too many signals in choppy markets, and the trader is left guessing which ones to trust. Synapse Trail Pro keeps the clean visual of an ATR trail but scores each signal 0–100 using multi-factor confluence and tells you the market regime in plain language — so you know at a glance whether the chart wants a trend signal taken or skipped.
This is fully free, open-source Pine v6 — no paywall, no invite, no DM required. Use it, study it, adapt it.
🧩 WHY THESE COMPONENTS WORK TOGETHER
A trail line alone tells you direction. A quality score alone tells you confidence. A regime filter alone tells you environment. None of these are useful in isolation — a high-confidence signal in a choppy regime is still a coin flip, and a clean trail flip in a strong trend with no volume confirmation can still fail.
Synapse Trail Pro fuses them into a single pipeline:
ATR Trail (with optional ratchet) → Direction Flip Detection → Regime Score (ADX + Choppiness + R²) → Quality Score (HTF + Volume + RSI + Regime + Break Strength) → Grade A/B/C → Risk Levels (preset SL + TP1/TP2/TP3) → Break-Even after TP1 → Lifecycle Stats
The trail produces the raw signal. The regime engine tells you whether the market is even capable of trending right now. The quality score weighs five independent confluence factors against that regime. The grade compresses the score into a single letter you can act on. The risk layer then drops your SL, three TPs, and break-even logic onto the chart automatically — so the moment the signal fires, you already see the trade plan.
Without the regime engine, you'd take signals in chop. Without the quality score, you'd treat every flip equally. Without the risk levels, you'd still be calculating SL and TPs manually after the signal. Each component covers a blind spot of the others.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ Ratcheted ATR Trail with Adaptive Volatility Multiplier.
The trail center is an EMA (default 21) of close, with bands at ±ATR × multiplier (default base 1.618 — the golden ratio). When the Ratchet option is on (recommended), the lower band only moves up in a long position and the upper band only moves down in a short — never loosens, only tightens. On a direction flip, the band resets to its raw value.
When the Adaptive Volatility Multiplier is on, the base multiplier auto-scales based on the 100-bar ATR percentile rank:
— Low vol (rank < 30) → multiplier × 0.8 (narrower band, catch the move earlier)
— Mid vol (30–70) → multiplier × 1.0 (default)
— High vol (rank > 70) → multiplier × 1.25 (wider band, avoid noise wicks)
Why this matters: a fixed multiplier overreacts in calm markets and gets whipsawed in volatile ones. Percentile-rank scaling keeps the trail behavior consistent across market conditions.
2️⃣ Composite Market Regime Score (0–100) — three-factor blend.
Each bar, three independent measurements vote on whether the market is trending or choppy:
— ADX (weight 40%) : standard Directional Movement ADX, length 14. Score = min(ADX / 50 × 100, 100). High ADX = strong directional pressure.
— Choppiness Index (weight 35%) : ChopIdx = 100 × log10(sum(TR, N) / (highest(high, N) − lowest(low, N))) / log10(N), then inverted to a trend score: chopScore = 100 − ChopIdx. Length 14. Low choppiness = clean directional movement.
— R² Linearity (weight 25%) : R² = correlation(close, bar_index, 50)². Measures how linearly price is moving. R² near 1 = clean trend, R² near 0 = pure noise.
Final regime score = ADX × 0.40 + chopScore × 0.35 + R² × 100 × 0.25.
Thresholds:
— Score ≥ 60 → Trending (green)
— Score < 35 → Choppy (red) — signals flagged with ⚠ or hard-skipped
— Between → Mixed (yellow)
Why three indicators instead of one: ADX measures strength but lags. Choppiness measures range expansion but can spike on news. R² measures linearity but is noisy on short windows. Combined and weighted, they cover each other's failure modes.
3️⃣ 5-Factor Quality Score (0–100) with letter grading.
When a trail-flip signal fires, it's scored on five confluence factors:
— HTF Bias (max 30 points) : higher-timeframe (4× current TF by default) EMA-50 bias. Match = 30, against = 0, HTF data missing or filter off = 15 (neutral credit).
— Volume Confirmation (max 20 points) : volume > 20-bar SMA × 1.3 (configurable). Auto-bypassed and given full credit on volume-less instruments (FX).
— RSI Momentum (max 20 points) : bullish signal needs RSI > 50, bearish needs RSI < 50.
— Regime Score (max 20 points) : regimeScore × 0.20.
— Break Strength (max 10 points) : how far past the band close pierced, capped at 3 × ATR. breakStrength = min(|breakDist| / ATR, 3) / 3 × 100, then × 0.10.
Grades:
— Score ≥ 75 → A (high-quality, all factors aligned)
— Score ≥ 55 → B (acceptable, most factors aligned)
— Score < 55 → C (weak — most factors against, consider skipping)
A "Min Quality Score" input lets you hide everything below a threshold (e.g., set to 55 to show only A and B grades).
4️⃣ Risk Presets with Per-Trade Snapshot Locking.
Four risk presets (plus Custom) auto-set SL × ATR and TP1/TP2/TP3 as R-multiples:
— Conservative : SL 2.5 × ATR, TP 1R / 2R / 4R
— Balanced (default): SL 1.5 × ATR, TP 1R / 2R / 3R
— Aggressive : SL 1.0 × ATR, TP 1.5R / 2.5R / 4R
— Scalping : SL 0.8 × ATR, TP 0.8R / 1.5R / 2R
— Custom : full manual control
Critical detail: SL and TP multipliers are snapshotted at entry . If you change the preset mid-trade, the open position keeps its original levels — and the Avg R statistic stays accurate (each closed trade contributes its own-time R values).
5️⃣ Break-Even Logic with Diagnostic BE-Save Counter.
When Break-Even After TP1 is on (recommended), reaching TP1 automatically moves the stop-loss to entry price. From the next bar onward, any wick at entry stops out at break-even instead of original SL — letting winners run risk-free to TP2/TP3.
A dedicated BE Saves counter on the dashboard tracks wins that closed because BE-stop fired (TP1 reached but TP3 didn't). A high BE-save ratio is a diagnostic signal that your TP3 may be too far — consider tightening.
6️⃣ Same-Bar Hit Guard + Realistic Closure Logic.
Two guards prevent unrealistic results:
— Entry-bar hold : SL/TP hits are ignored on the entry bar itself. A hairpin wick can't instantly stop out a fresh position.
— Same-bar SL+TP1 : if both SL and TP1 are hit on the same bar, the trade closes as a LOSS (conservative — mirrors realistic broker behavior on a single wick).
Closures are routed through a single classifier function so flip-closures, SL-closures, and TP3-closures are all tallied identically.
7️⃣ Flip Detection + Dedicated Flip Alert.
A "flip" is when an opposite signal fires while a position is still active. The old trade is classified and counted (its TP-reached state determines W/L and R-multiple), THEN the new position opens. A dedicated POSITION FLIP alert fires in addition to the new buy/sell alert, with from-direction, to-direction, prior entry, and new entry — useful for closing managed positions externally.
8️⃣ Unified Dashboard with Three Toggleable Sections.
One positioned table with three sections you can switch on/off individually:
— Trade section : Direction (with grade), SL (with BE marker), TP1/TP2/TP3 (with ✓ on hit), Risk % / R:R with unicode gauge, Bars in Trade.
— Market section : Regime (with 0–100 gauge), HTF bias, Volume status, RSI, ATR | Volatility-rank with adaptive multiplier.
— Statistics section : Total signals + grade breakdown (A:N B:N C:N), Buy/Sell split, Closed trades, W/L, Win rate, Avg R-multiple, BE Saves, Flips.
Dynamic section headers carry live context (e.g., "─── Trade · LONG · 23 bars ───") so the divider itself summarizes state.
9️⃣ Three Trail Visual Schemes for Different Aesthetics.
— Adaptive (Bull/Bear) : classic bright green/red — high visibility.
— Premium Indigo (recommended): muted indigo (long) and earth-brown (short) — financial-terminal aesthetic, never competes with green TP lines.
— Monochrome : neutral grey for ultra-minimal charts.
Optional Double Trail Line adds a dashed secondary line offset by a fraction of ATR (configurable 0.05–1.0 × ATR), creating a "channel" visual. The dashed segments are drawn via a ring-buffer of line.new(... line.style_dashed) instead of plot() — this produces PulseWire's native dashed look that plot() can't render natively.
🔟 Theme Auto-Detection + Premium Color Palette.
The indicator detects whether your chart background is dark or light (using color.r(chart.bg_color) < 128) and adapts every palette element accordingly. Theme can also be force-set to Dark or Light. Light-theme variants use deeper, more saturated colors to maintain contrast (e.g., deep crimson SL on white, dark amber for BE).
All label text colors are calibrated for ≥4.5:1 contrast against their background (e.g., dark green text on bright green long labels = 7.8:1 ratio).
1️⃣1️⃣ Webhook-Ready JSON Alerts with Full Payload.
Every buy/sell/flip/SL-hit/TP-hit/BE-activation event can fire as plain text OR structured JSON. The JSON payload includes action, ticker, timeframe, price, SL, TP1/TP2/TP3, R:R, grade, quality score, regime, choppy flag, and flip flag — ready for any webhook automation.
🧠 HOW IT WORKS — STEP BY STEP
Step 1 — ATR + Trail Center: ATR(13) and EMA(21) of close are computed. Raw bands = EMA ± ATR × multiplier (base 1.618).
Step 2 — Adaptive Multiplier (optional): If on, the multiplier scales by 100-bar ATR percentile (×0.8 / ×1.0 / ×1.25).
Step 3 — Ratchet Logic (optional): In a long, the lower band can only move up. In a short, the upper band can only move down. On a direction flip, the band resets to raw.
Step 4 — Direction Flip Detection: Close > prev upper band → direction = 1 (long). Close < prev lower band → direction = −1 (short). A change in direction is the raw signal.
Step 5 — Regime Score: ADX × 0.40 + ChopScore × 0.35 + R² × 100 × 0.25. Trending ≥ 60, Choppy < 35.
Step 6 — Quality Score: HTF (0/15/30) + Volume (0 or 20) + RSI (0 or 20) + Regime × 0.20 + BreakStrength × 0.10. Grade A ≥ 75, B ≥ 55, C < 55.
Step 7 — Filtering: Min Quality threshold, choppy-skip toggle, barstate.isconfirmed gating.
Step 8 — Risk Levels: SL = entry ± ATR × slMult. TP1/TP2/TP3 = entry ± slDistance × tpMult. All snapshotted to the trade.
Step 9 — Lifecycle: On TP1 first-touch → BE activates (SL → entry). On SL or TP3 → trade closes, classified by tp1Reached (WIN if true, LOSS if false), R-multiple credited (1/3 per TP partition), state reset.
Step 10 — Visuals + Alerts: SL/TP lines drawn forward, labels updated on hit (✓ + cyan), alerts fired with full payload, dashboard updated.
📖 HOW TO USE — BEGINNER GUIDE
🎯 Quick start (5 steps):
1. Add Synapse Trail Pro to your chart on any timeframe.
2. Open Settings. Leave defaults for the first session — they are tuned for general use (Balanced preset, Premium Indigo trail, HTF filter on, BE on).
3. Wait for the first signal to fire (▲ Long or ▼ Short marker). The marker shows the grade (A/B/C) and a ⚠ flag if in choppy regime.
4. Read the dashboard (top-right by default). Note the Direction , Grade , Regime , and the SL/TP1/TP2/TP3 levels — these are your full trade plan.
5. Execute the trade in your broker using the SL and TPs from the dashboard. Optionally partition position 1/3 at each TP.
👁️ Reading the chart:
— 🟢 ▲ Long Grade-letter below a bar = Buy signal. Color matches grade quality.
— 🔴 ▼ Short Grade-letter above a bar = Sell signal.
— ⚠ next to the grade = signal fired in choppy regime (be cautious or skip).
— Trail line = current direction context. Indigo = long bias, terracotta = short bias (in Premium scheme).
— Dashed secondary line = soft/hard limit zone, offset by a fraction of ATR.
— ENTRY line (dotted blue) = your entry reference price.
— SL line (solid red) = your stop-loss.
— TP1 / TP2 / TP3 lines (dashed green) = your take-profit targets. Turn solid teal with ✓ on hit.
— Entry → SL (BE) label in amber = break-even is active (TP1 was reached, SL is now at entry).
📊 Dashboard fields (Trade section):
— Direction : LONG / SHORT / FLAT + Grade letter.
— SL : stop-loss price. Shows "BE @" prefix when break-even is active.
— TP1 / TP2 / TP3 : target prices. ✓ prefix once reached.
— Risk / R:R : distance % from entry to SL + current R:R + visual gauge.
— Bars in Trade : how many bars since entry.
📊 Dashboard fields (Market section):
— Regime : Trending / Mixed / Choppy + 0–100 gauge.
— HTF : higher-timeframe bias (Bullish / Bearish / Flat / off).
— Volume : Confirmed / Weak / no data / off.
— RSI : current 14-period RSI value, color-coded.
— ATR | Vol : ATR value, 100-bar volatility percentile, and current adaptive multiplier.
📊 Dashboard fields (Statistics section):
— Signals : total fired + breakdown (A:N B:N C:N).
— Buy / Sell : directional split.
— Closed : total wins + losses (flip, SL, and TP3 closures all counted).
— W / L : wins / losses.
— Win Rate : TP1-reached = WIN. Color-coded ≥ 55% green, ≥ 45% yellow, else red.
— Avg R : average realized R-multiple per closed trade.
— BE Saves : wins that closed because BE-stop fired (diagnostic).
— Flips : trades closed by opposite signal mid-position.
💡 Beginner trading workflow:
1. Start with the Balanced preset and HTF Bias Filter ON .
2. Only take A-grade or B-grade signals — set Min Quality Score to 55.
3. Skip every signal flagged with ⚠ (choppy regime) until you understand the regime engine — or enable Hard-skip Choppy .
4. Use the Premium Indigo trail scheme — the muted colors keep your focus on the SL/TP levels, not the trail itself.
5. Always partition position 1/3 at each TP — that's what the R-multiple math assumes.
6. After 30–50 trades, review the Statistics section: if Avg R is positive, the setup works. If BE Saves > 30% of wins, consider tightening TP3.
🔧 Tuning guide:
— Too many signals: increase Min Quality Score to 75 (A-grade only), enable Hard-skip Choppy.
— Too few signals: lower Min Quality to 0, turn off HTF filter, switch from Balanced to Aggressive preset.
— Stops too tight: switch to Conservative preset (SL 2.5 × ATR).
— Stops too wide: switch to Scalping preset (SL 0.8 × ATR).
— BE stopping you out too often: disable Break-Even After TP1.
— Trail too jumpy: increase Trail EMA Length from 21 to 34, enable Ratchet.
— Trail too sluggish: decrease Trail EMA Length to 13, decrease ATR Length to 8.
— Chart too busy: turn off Double Trail Line and Regime Background, set Trail History Bars to 50.
⚙️ KEY SETTINGS REFERENCE
⚙️ Main Settings:
— ATR Length (default 13): ATR period for volatility band.
— Base ATR Multiplier (default 1.618 — golden ratio): base band width.
— Trail EMA Length (default 21): EMA period for trail center.
— Adaptive Volatility Multiplier (default off): auto-scale multiplier by 100-bar ATR percentile.
— Ratchet Trail (default on): trail only tightens in position direction.
🔍 Signal Filters:
— Min Quality Score (default 0): hide signals below threshold (0 = all, 55 = B+, 75 = A only).
— Hard-skip Choppy Signals (default off): fully suppress signals in choppy regime.
— Use HTF Bias Filter (default on): Quality Score bonus for HTF-aligned signals.
— HTF for Bias (default empty = auto 4×): higher timeframe for bias check.
— Use Volume Confirmation (default off): bonus when volume > 20-SMA × threshold.
— Volume Threshold (default 1.3): volume × SMA20 to count as confirmation.
🌊 Market Regime:
— ADX Length (default 14)
— Choppiness Length (default 14)
— R² Regression Length (default 50)
🛡️ Risk Management:
— Risk Preset (default Balanced): Conservative / Balanced / Aggressive / Scalping / Custom.
— Custom SL × ATR (default 1.5)
— Custom TP1/TP2/TP3 × Risk (default 1.0 / 2.0 / 3.0)
— Break-Even After TP1 (default on): move SL to entry on TP1.
— Show SL/TP Lines / Labels / % Distance : all on by default.
— Entry / SL / TP Line Styles : Dotted / Solid / Dashed defaults.
🎨 Visual:
— Theme (default Auto)
— Trail Color Scheme (default Adaptive Bull/Bear) — try Premium Indigo for a financial-terminal look.
— Trail Line Width (default 2)
— Trail History Bars (default 0 = all)
— Double Trail Line (default on)
— Double Trail Offset × ATR (default 0.25)
— Show Buy/Sell Labels / Grade / Regime Background / Watermark
📊 Dashboard:
— Show Dashboard (default on) — master toggle
— Position (default Top Right) — 6 positions available
— Trade / Market / Statistics Section toggles
🔔 Alerts:
— Webhook JSON Format (default off): plain text or structured JSON.
— Alert on TP Hits (default off)
— Alert on SL Hit (default on)
— Alert on Position Flip (default on)
🔔 ALERTS
— 🟢 BUY — ticker, TF, price, SL, TP1/TP2/TP3, R:R, grade, quality score, regime, choppy flag, flip flag
— 🔴 SELL — same payload
— 🔄 POSITION FLIP — from-direction, to-direction, prior entry, new entry
— 🛑 SL HIT — entry, SL price, time
— 🛡️ BE STOP-OUT — fires instead of regular SL when break-even was active
— 🎯 TP1 / TP2 / TP3 HIT — first-touch only, no duplicate fires
— 🛡️ BREAK-EVEN — fires the bar TP1 is reached and SL moves to entry
All alerts support plain text and JSON webhook format. All fire bar-close confirmed (alert.freq_once_per_bar_close).
⚠️ IMPORTANT NOTES
— 🚫 No repainting. All signals require barstate.isconfirmed. Alerts fire once per bar close. The HTF security() call uses the canonical non-repaint pattern (close + ema with lookahead_on), reading the closed HTF bar without future leakage.
— 📐 The trail flip is the raw signal source; quality score and filters only suppress, never invent signals. Same-bar SL+TP1 always resolves as a LOSS (conservative bias toward stop).
— 📐 Statistics counters are session-scoped — they reset on script reload, input change, or by incrementing the "Reset Stats Counter" input. The Stats section is descriptive, not predictive: past behavior on a chart does not guarantee future behavior on the same chart.
— ⚖️ Win = TP1 reached (regardless of how the trade ultimately closed). Avg R assumes 1/3 position partitioned at each TP. These are conventions; your live execution may differ.
— 🛠️ This is an analysis tool, not an automated trading bot. It detects trail flips, scores quality, projects SL/TP zones, and tracks outcomes — trade decisions and execution remain yours.
— 🌐 Works on all markets and timeframes. Volume-based filters auto-bypass on instruments without volume data (FX). Adaptive multiplier and regime engine scale naturally across symbols.
— 📜 Fully open-source Pine v6. Read the code, fork it, adapt it. Feedback and forks welcome. Indicator

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
Indicator

Vesper Candle Index [JOAT]Vesper Candle Index
Introduction
Vesper Candle Index is an open-source candlestick classification engine. Instead of marking every common candle pattern equally, it scores candle patterns using body quality, wick structure, trend location, volatility, and nearby structure context.
The indicator is designed to reduce pattern noise by ranking candle events and displaying only those that meet a configurable quality threshold.
Core Concepts
1. Candle Pattern Library
The script evaluates multiple candlestick states, including engulfing candles, hammers, stars, harami, inside breaks, marubozu, tweezers, rail patterns, and reclaim/reject conditions.
2. Quality Scoring
Each candidate pattern receives a score based on candle body, wick placement, trend context, volatility, and structure alignment.
3. Structure Context
Confirmed pivot levels are used to detect CHoCH-style breaks and candle reactions near recent structure.
4. Trade Projection Labels
When a candle state qualifies, the script can display compact educational entry, stop, TP1, and TP2 information.
5. Dashboard
The dashboard shows the current candle state, quality bucket, trend, structure, and recent signal context.
Features
Ranked candle states: Patterns are scored rather than treated equally
Structure-aware candles: Uses pivots and CHoCH context
Volatility-adjusted logic: ATR helps normalize wick and body requirements
Cooldown control: Reduces repeated pattern labels
Compact dashboard: Summarizes the highest-ranked current candle state
Confirmed patterns: Pattern events use confirmed bars
Input Parameters
Pattern sensitivity controls the quality threshold
Pivot length controls structure confirmation
ATR settings control wick/body normalization
Rail projection settings control optional visual projection length
How to Use This Indicator
Step 1: Focus on high-quality states
Use the quality score to separate strong candle states from weaker pattern appearances.
Step 2: Check structure alignment
Candle events near relevant structure are often more meaningful than isolated patterns.
Step 3: Avoid treating patterns as certainty
Candlestick patterns describe current bar behavior. They do not predict continuation or reversal.
Indicator Limitations
Candle patterns can fail in strong trend or news conditions
Pivot-based structure is delayed by the selected pivot length
The script classifies candles; it does not forecast future direction
Originality Statement
Vesper Candle Index adds scoring, structure context, volatility normalization, cooldown behavior, and a dashboard to candlestick analysis. Its value is in ranking candle quality rather than simply labeling every pattern.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Candlestick patterns can be misleading when used alone.
-Made with passion by jackofalltrades
Indicator

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. Indicator

Aurelian Auction Ledger [JOAT]Aurelian Auction Ledger
Introduction
Aurelian Auction Ledger is an open-source range and auction analysis overlay designed to identify compressive trade zones, map their internal value structure, and show how price behaves when it tests the edges of that ledger. The script builds a live range shell, calculates a point of control and value area, tracks sweep events, and presents the active auction state in a top-right dashboard.
The problem Aurelian solves is hidden range structure. Consolidation zones are often treated as simple rectangles, but not all ranges are equal. Some are balanced, some lean toward accumulation, some toward rejection, and many fail through one-sided sweeps before resolving. Aurelian turns that internal auction structure into something visible.
Core Concepts
1. Compression-based ledger build
The script measures whether recent bars are tight enough in ATR terms, efficient enough in body structure, and balanced enough in directional pressure to qualify as a live auction ledger.
2. Range shell and internal value area
When a ledger is active, the script draws:
The outer ledger shell
The internal value area
The point of control
This separates broad range boundaries from the price zone where most business is actually being done.
3. Right-side auction profile
Volume is accumulated across profile rows inside the active ledger so the script can identify the highest-volume row and estimate the value area around it.
4. Sweep tracking
Upper and lower sweep events are tracked only on confirmed bars. This helps distinguish clean acceptance from failed range probes.
5. Ledger tilt
The indicator maintains a directional tilt metric so the range shell is not displayed as neutral by default. If the auction begins leaning toward acceptance or rejection, the color balance reflects that change.
Features
Compression-driven range detection: Searches for structured auction zones rather than generic boxes
Live range shell: Displays the active ledger high, low, and midpoint
Point of control and value area: Maps where the auction is most concentrated
Right-side profile: Extends the auction structure visually beyond the current bar
Sweep detection: Tracks confirmed probes beyond the ledger edges
Auction tilt readout: Shows whether the range is leaning toward acceptance or rejection
Top-right dashboard: Reports mode, compression, width, POC, value area, sweeps, and tilt
Non-repainting event logic: Sweep and breakout conditions are confirmed on bar close
Input Parameters
Ledger Core:
ATR Length
Ledger Build Bars
Compression Ceiling
Body Efficiency Ceiling
Directional Balance Ceiling
Breakout Buffer
Auction Profile:
Profile Rows
Profile Width
Value Area Coverage
Visuals:
Show Range Shell
Show Right-Side Profile
Show Sweep Marks
Tint Auction Bars
Show Dashboard
How to Use This Indicator
Step 1: Confirm that a ledger is live
Check the dashboard mode first. If the ledger is not active, the script is still scanning for a qualified auction structure.
Step 2: Watch the POC and value area
These levels show where the auction is concentrated and whether price is rotating inside value or challenging the edges.
Step 3: Track sweeps versus acceptance
Confirmed sweep events can mark failed probes. If price repeatedly sweeps one side and returns, the ledger is revealing where excess is being rejected.
Step 4: Use tilt as context, not prediction
Ledger tilt helps interpret which side has more pressure, but the actual resolution still depends on whether price ultimately accepts outside the shell.
Indicator Limitations
The script is designed for structured ranges and will naturally stand down during broad directional moves
Volume distribution inside a candle is approximated using row allocation rather than true intrabar order flow
A qualified ledger can still break without first producing a sweep event
Originality Statement
Aurelian Auction Ledger is original in how it combines a compression-qualified range state, an internal profile-derived value area, sweep tracking, and directional tilt into a single clean overlay. It is published because:
The script distinguishes a structured auction ledger from a generic consolidation rectangle
It combines shell, POC, value area, and sweep tracking in one coherent range workflow
The tilt metric provides additional auction context without cluttering the chart with heavy labels
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice and does not guarantee future market behavior. Range structures can fail abruptly, and volume-based value estimates are still interpretations of historical trading activity. Always use independent judgment and proper risk management.
Indicator

Noctis Parallel Geometry [JOAT]Noctis Parallel Geometry
Introduction
Noctis Parallel Geometry is an open-source channel-construction and ratio-lattice overlay designed to organize price into ascending or descending parallel structures built from confirmed pivots. It maps primary boundaries, internal levels, stretch lines, and dynamic tracking projections so the user can see where price is moving inside a broader geometric framework.
The problem this script solves is inconsistent channel drawing. Manually drawn channels vary from user to user, and many automatic channel tools do not show how the geometry was constructed or how price is behaving inside it after the channel is established. Noctis Parallel Geometry turns confirmed pivot relationships into a persistent structure with historical roll-forward behavior.
Core Concepts
1. Pivot-Driven Channel Construction
Ascending geometry is built from two confirmed pivot lows plus the opposing pivot high that defines channel height. Descending geometry is built from two confirmed pivot highs plus the opposing pivot low. This creates a parallel structure rather than a freehand trendline.
2. Ratio Lattice
Once the main channel is built, the script can add internal reference levels and stretch levels. These help the user see whether price is rotating around the midline, respecting inner rails, or pushing into extended geometry.
3. Historical Channel Preservation
When a new active geometry forms, the previous one can be rolled into history instead of being deleted. Historical channels are shifted and preserved so the user can study how prior geometry resolved.
4. Dynamic Projection Tracking
The script can project a live tracking geometry from the most recent active pivot anchor and evolving extreme. This provides a developing path while the full next confirmed channel is still incomplete.
Features
Ascending and descending channel construction: Built from confirmed pivot relationships
Primary channel rails: Base and top boundaries
Inner ratio levels: Optional internal guidance lines
Stretch levels: Optional extension rails beyond the main channel
Historical geometry retention: Previous channels can remain on-chart
Dynamic tracking projection: Live provisional geometry based on current extremes
Pivot tags: Optional pivot markers for transparency
Dashboard: Displays active geometry mode and structural information
Input Parameters
Channel Engine:
Pivot Length
Extend Active Geometry
Show Historical Geometry
Historical Channel Count
Show Dynamic Projection
Ratio Lattice And Display:
Inner-level toggle
Stretch-level toggle
Historical projection offset
Pivot-tag and dashboard toggles
How to Use This Indicator
Step 1: Identify whether the active geometry is ascending or descending.
Step 2: Use the midline and inner rails to gauge whether price is rotating cleanly or losing internal balance.
Step 3: Use stretch levels as warning areas where price is pushing beyond normal channel behavior.
Step 4: Compare active geometry with preserved historical geometry to see whether the market is reusing or abandoning prior pathing.
Step 5: Treat dynamic tracking as provisional context until a fully confirmed new channel is formed.
Indicator Limitations
Channels only update after pivot confirmation, so geometry changes are intentionally delayed to avoid repainting
Fast regime changes can invalidate a channel before price spends much time respecting it
Dynamic tracking lines are exploratory guidance, not confirmed structure
This indicator describes geometry; it does not by itself determine direction or trade quality
Originality Statement
Noctis Parallel Geometry is original in how it turns confirmed pivot relationships into a parallel-channel engine with internal lattice levels, stretch rails, historical roll-forward geometry, and live tracking projection. These parts work together to create a coherent geometric framework rather than a simple trendline overlay.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Channel geometry can fail abruptly in volatile or event-driven conditions, so all analysis should be paired with appropriate risk controls.
-Made with passion by jackofalltrades
Indicator

Indicator

Indicator

Crossframe Bias Ledger [JOAT]Crossframe Bias Ledger
Introduction
Crossframe Bias Ledger is an open-source non-repainting higher-timeframe bias overlay built to align an intermediate timeframe, a major timeframe, and the local chart into one directional map. It uses safely delayed `request.security()` calls, crossframe basis clouds, premium/discount rails, alignment boxes, execution-state labels, and an optional TP/SL scaffold on fresh confirmed alignment shifts.
The script solves directional context across timeframes. Many local signals fail because they are taken against dominant higher-timeframe structure. Crossframe Bias Ledger keeps the user anchored to higher-timeframe alignment while still making the output actionable on the trading timeframe.
Core Concepts
1. Safe Higher-Timeframe Requests
All higher-timeframe values are retrieved using delayed indexing so incomplete higher-timeframe bars do not leak into the current chart:
idxHigher = barstate.isrealtime ? 1 : 0
idxCurrent = barstate.isrealtime ? 0 : 1
2. Primary and Secondary Trend Stacks
Fast, slow, and signal EMAs are retrieved from two higher timeframes and converted into directional scores.
3. Premium / Discount Map
The two higher-timeframe bases define a premium/discount zone. Price trading above the upper rail is treated as premium. Price trading below the lower rail is treated as discount. Price between them is treated as rebalancing.
4. Fresh Alignment Shifts
When the crossframe score crosses into confirmed bullish or bearish alignment, the script marks this as a fresh state transition and can build an informational TP/SL ladder.
5. Rebalance vs Continuation Logic
The script distinguishes rebalancing entries inside the premium/discount box from continuation conditions outside it.
Features
Non-repainting crossframe logic: Uses safely delayed higher-timeframe requests
Dual cloud system: Primary and secondary timeframe clouds on the chart
Premium / discount rails: Crossframe valuation map between the two HTF bases
Bias box: Forward execution window for the current crossframe state
Fresh alignment detection: Distinguishes a new bull/bear shift from an already active state
Continuation and rebalance readouts: Shows whether price is extending or rebalancing
Optional TP/SL ladder: Informational scaffold for new alignment shifts
Top-right dashboard: Displays state, signal, timeframe bias, location, execution mode, basis, and score
How to Use This Indicator
Step 1: Read whether the state is aligned up, aligned down, or mixed.
Step 2: Check if price is trading in premium, discount, or rebalance territory.
Step 3: Use fresh shifts to identify new state transitions. Use continuation and rebalance readings to differentiate execution style.
Step 4: Keep local entries aligned with the dominant crossframe bias whenever possible.
Indicator Limitations
Higher-timeframe logic is intentionally delayed for safety, so it will not react as quickly as unstable lookahead-based implementations
Premium/discount interpretation depends on the chosen timeframes
Mixed states are intentional and may persist when higher timeframes disagree
The TP/SL ladder is informational and does not place trades
Originality Statement
Crossframe Bias Ledger is original in the way it combines safe higher-timeframe delay logic, dual-basis premium/discount mapping, fresh alignment shifts, and execution-state scaffolding into one open-source overlay. The script is intended to provide a reusable top-down directional framework rather than a generic MTF trend line.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Higher-timeframe alignment may still fail, reverse, or become mixed as new data forms. Always use independent analysis and risk management.
-Made with passion by jackofalltrades
Indicator

Structure Deviation Ledger [JOAT]Structure Deviation Ledger
Introduction
Structure Deviation Ledger is an open-source structure-tracking overlay designed to monitor how price behaves around a stepped volatility corridor and pivot-derived structure rails. It combines pivot rail continuation, a stateful stepped midpoint, inner and outer ATR corridors, frozen breakout rails, right-edge structural labels, and an optional TP/SL scaffold when confirmed structural displacement occurs.
The purpose of the script is to answer a practical question: is price still behaving inside accepted structure, or has it displaced far enough to qualify as a meaningful structural event? By scoring deviation relative to a stepped corridor and confirmed pivot rails, the indicator provides a cleaner framework for continuation and failure analysis than simple moving-average crossovers.
Core Concepts
1. Pivot-Derived Structure Rails
Confirmed pivot highs and lows are connected into forward rails. These rails act as the nearest structural references for continuation or failure.
2. Stepped ATR Corridor
The script maintains a stepped midpoint derived from a smoothed basis and ATR logic. The midpoint only reanchors when price stretches far enough to justify a structural adjustment.
3. Confirmed Structural Breaks
A structural break is only promoted when price closes beyond the relevant active rail and also pushes outside the inner corridor. This confirmation rule is designed to reduce weak intrabar noise.
4. Frozen Break Rails
When a fresh break is confirmed, the script freezes a breakout rail and a related context box so the chart retains forward reference after the initial event.
5. Execution Scaffold
On fresh structural expansion or structural pressure events, the indicator can build an informational TP/SL ladder using ATR-based stop distance and configurable R multiples.
Features
Pivot structure rails: Forward-projected high and low rails derived from confirmed pivots
Stepped structure midpoint: State-aware corridor center that does not update every bar like a normal average
Inner and outer ATR corridors: Layered bands for contained vs displaced price behavior
Fresh break detection: Confirmed-bar breakout logic for upside and downside structural events
Frozen break rails and zones: Persistent post-break context on the chart
Right-edge labels: Live labels for midpoint, inner levels, and active rail reference
Optional TP/SL ladder: Entry, stop, TP1, TP2, TP3 with risk/reward fill
Top-right dashboard: Displays current structural state, deviation, corridor levels, and rail count
How to Use This Indicator
Step 1: Read whether price is inside the corridor or displacing beyond it.
Step 2: Compare price to the active high or low rail. These are the nearest structure references.
Step 3: When a fresh confirmed break appears, use the frozen rail and optional ladder as a planning map, not as a guarantee.
Step 4: If price returns back through the corridor after a break, treat that as a sign of failed displacement.
Indicator Limitations
Pivot rails are naturally delayed because pivots require confirmed bars on both sides
Stepped corridors intentionally lag during transitions in order to avoid unstable shifting
A dense market with many pivots can still generate frequent rail updates
The TP/SL ladder is informational only and does not place orders
Originality Statement
Structure Deviation Ledger is original in the way it merges pivot-derived structural rails, a stepped ATR corridor, frozen breakout context, and execution scaffolding into a single open-source structure overlay. Its goal is to provide a reusable institutional structure map rather than a simplified breakout marker.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Structural breaks and corridor deviations are derived from historical price action and do not guarantee future movement. Always use appropriate risk controls.
-Made with passion by jackofalltrades
Indicator

Volume Ledger [JOAT]JOAT Volume Ledger
Introduction
JOAT Volume Ledger is an open-source participation and volume-zone framework designed to identify where meaningful activity occurred, what type of activity it likely was, and which of those zones still matter now.
It is built around the idea that not all large volume is equal.
Some high-volume behavior represents sponsorship.
Some represents exhaustion.
Some represents churn or absorption.
Some leaves behind a meaningful footprint that the market later reacts to.
The problem the script solves is translation.
Raw volume bars alone do not explain whether heavy activity created useful levels.
They also do not organize those levels for later use.
Volume Ledger attempts to do both.
It begins with relative-volume heat and participation metrics.
It then uses confirmed pivot-based logic to create candidate zones.
Those zones are merged, ranked, extended, and reclassified as support or resistance based on how price returns to them.
Higher-timeframe carry-forward levels can also be displayed.
Core Concepts
1. Relative-Volume Heat
The script normalizes current volume against a baseline and color-grades it.
2. Delta, Churn, and Participation
A delta proxy, churn estimate, and participation line classify the quality of activity.
3. Confirmed Pivot-Zone Creation
When significant participation coincides with confirmed pivots, the script stores those prices as candidate zones.
4. Zone Merging and Ranking
Nearby zones are merged and stronger zones are prioritized.
5. Higher-Timeframe Carry-Forward Levels
Important HTF zones can be projected into the current chart.
6. Retest Logic
The script distinguishes whether an active zone is currently acting as support or resistance.
7. Overlay Box and Line Projection
Zones are projected forward into current chart space using managed boxes, lines, and labels.
8. Participation State Readout
The dashboard summarizes the dominant volume condition, active zones, and current participation quality.
Features
Relative-volume heatmap: current activity is normalized and color-graded
Delta, churn, sigma, and participation analytics: classifies the character of activity
Confirmed volume-origin zones: maps price areas linked to meaningful participation
Zone merging and ranking: reduces clutter and prioritizes stronger regions
Projected overlay boxes and lines: extends active zones into current price
Higher-timeframe ledger context: broader levels can be carried forward
Support / resistance retest logic: distinguishes how price is interacting with the zone
Bar tint and backdrop state: strong participation conditions are easy to spot
Dashboard: summarizes volume state and dominant zone structure
Input Parameters
Ledger Core:
Volume Comparison
Ledger Window
Participation Smoothing
Delta and Churn Settings
Relative Volume Thresholds
Zone Engine / Display:
Zone Extension
Merge Threshold
Zone Ranking Rules
Projected Levels
Higher-Timeframe Carry-Forward
Show Dashboard
Show Average
Show Participation Line
Show Projected Levels
Show Backdrop
Show Bar Tint
How to Use This Indicator
Step 1: Read current participation quality using the relative-volume state and participation line.
Step 2: Identify the dominant projected zones on the chart.
Step 3: Watch retests into those zones and compare them to current participation behavior.
Step 4: Compare active zones with higher-timeframe carry-forward levels.
Step 5: Use the script as confirmation beneath trend, liquidity, or retracement narratives.
Indicator Limitations
Volume proxies do not provide true exchange-level order-flow
High participation does not guarantee reversal or continuation
Very noisy markets can generate many candidate zones before merging and ranking simplify them
The script identifies footprints of activity, not certain turning points
Originality Statement
This script is original in the way it combines relative-volume heat, effort classification, pivot-zone construction, merging, ranking, higher-timeframe carry-forward, and retest-aware styling into a single participation ledger.
The purpose is not merely to show volume.
It is to preserve the most useful consequences of volume.
Disclaimer
This indicator is provided for educational and informational purposes only.
It is not financial advice.
Volume and participation footprints do not guarantee future support or resistance.
Always use independent analysis and risk management.
Best Use Cases
Studying where strong participation likely left a usable footprint
Comparing current price retests to historical participation zones
Separating constructive activity from churn-heavy activity
Adding participation context to trend, liquidity, or retracement narratives
Interpretation Notes
Not every high-volume event deserves the same weight.
The script is most useful when strong participation aligns with structural pivots and later retests.
Higher-timeframe carry-forward levels can be especially helpful when local price is approaching an older but still meaningful participation zone.
The strongest zones are not simply the largest bars.
They are the most meaningful surviving footprints after merging, ranking, and retest context are applied.
Publication Notes
This script is intended to be published with a clean chart where the dominant projected zones and the current participation state are clearly identifiable.
The chart should not be overloaded with extra unrelated studies.
The image should make the volume-to-zone relationship understandable to a first-time viewer.
-Made with passion by jackofalltrades
Indicator

Retracement Lattice [JOAT]JOAT Retracement Lattice
Introduction
JOAT Retracement Lattice is an open-source retracement and extension framework designed to turn a confirmed swing into a live working map.
It does more than place Fibonacci levels on a chart.
The script manages swing anchors, highlights the OTE pocket, overlays confirmed higher-timeframe retracement structure, shades premium and discount halves, and evaluates response quality inside the active pocket.
The problem it solves is inconsistency.
Manual retracement drawing is useful, but it can also become subjective very quickly.
Anchors are often moved emotionally.
Higher-timeframe confluence is ignored.
The midpoint is overlooked.
The response inside the retracement is treated as equivalent even when it is not.
Retracement Lattice standardizes the active swing and continuously updates the derived structure.
That creates a cleaner framework for pullback analysis, continuation planning, and location-based decision making.
Core Concepts
1. Confirmed Swing Anchor Engine
The lattice begins with a confirmed swing.
Pivot logic and anchor-state management determine which high and low form the active range.
pivotHigh = ta.pivothigh(high, pivotLen, pivotLen)
pivotLow = ta.pivotlow(low, pivotLen, pivotLen)
2. Full Retracement Stack
The script calculates a broad set of retracement and extension levels rather than only the most common ones.
fib236 = levelAt(0.236)
fib382 = levelAt(0.382)
fib500 = levelAt(0.500)
fib618 = levelAt(0.618)
fib705 = levelAt(0.705)
fib786 = levelAt(0.786)
3. OTE Pocket Emphasis
The 0.618 to 0.786 region is emphasized as the main response pocket.
4. Higher-Timeframe Confluence
A confirmed higher-timeframe lattice is projected alongside the local one.
5. Premium and Discount Shading
The upper and lower halves of the swing are shaded relative to the midpoint.
6. Extension Objectives
The active swing also provides continuation targets beyond the range.
7. Response Qualification
The script evaluates whether price is reacting constructively inside the active pocket.
8. Chart-Edge Guidance
Labels and projected guide objects keep the live map readable near the right edge of the chart.
Features
Confirmed anchor-state engine: stable swing selection using pivot confirmation
Expanded retracement stack: 0.236, 0.382, 0.500, 0.618, 0.705, and 0.786
OTE pocket emphasis: the main response zone is highlighted
Extension objectives: continuation levels project beyond the swing
Higher-timeframe confluence: confirmed HTF lattice is shown
Premium / discount shading: auction halves are visible at a glance
Response qualification: pocket interaction is graded instead of assumed
Object-managed edge labels: the current range stays readable
Dashboard: anchor direction, confluence, and pocket state are summarized
Input Parameters
Swing Anchor:
Swing Lookback
Pivot Length
Reverse Orientation
Volume-Validated Pivots
Volume Baseline
Volume Threshold
Higher Timeframe / Display:
Show Higher Timeframe Grid
Higher Timeframe
Show Classic Retracements
Show Minor Levels
Show OTE Band
Show Extensions
Show Dashboard
Confluence Tolerance
Shade Auction
How to Use This Indicator
Step 1: Identify the active swing anchor pair.
Step 2: Check whether price is trading in premium or discount relative to the midpoint.
Step 3: Focus on the OTE pocket when the broader structure supports it.
Step 4: Compare the local lattice to the confirmed higher-timeframe lattice.
Step 5: Use the extensions to organize continuation targets after response.
Indicator Limitations
Anchors settle only after pivot confirmation, which is intentional non-repainting behavior
Strong trends can continue without deep retracement into the pocket
Confluence improves context but does not force a reaction
Retracement tools provide structure, not certainty
Originality Statement
This script is original in how it turns a retracement tool into an active framework with anchor-state management, OTE response logic, premium-discount shading, higher-timeframe confluence, and extension objectives.
The components are unified around one job:
to make pullback location more structured and less subjective.
Disclaimer
This indicator is provided for educational and informational purposes only.
It is not financial advice.
Retracement and extension levels are analytical references and do not guarantee support, resistance, or target completion.
Use risk management and independent judgment at all times.
Best Use Cases
Structuring pullback analysis after a confirmed directional swing
Comparing local retracement behavior to confirmed higher-timeframe levels
Locating the OTE pocket inside a stable swing map
Planning continuation targets with extension levels
Interpretation Notes
The midpoint is important because it quickly reveals whether price is trading in the premium or discount half of the current auction.
The OTE pocket is most useful when the broader structural narrative already supports the same directional idea.
Higher-timeframe confluence should be treated as context improvement, not as a guarantee that the level must react.
Publication Notes
This script is intended to be published with a clean chart showing the active anchor, the highlighted OTE pocket, and the higher-timeframe overlap when it exists.
The chart example should make the active swing easy to understand.
Avoid clutter from unrelated studies or excessive drawings.
-Made with passion by jackofalltrades
Indicator

Charter Execution Model [JOAT]Charter Execution Model
Introduction
Charter Execution Model is an open-source Pine Script v6 strategy that integrates the broader JOAT framework into a single non-repainting execution model. It does not rely on one trigger alone. Instead, it uses a hierarchy of filters: regime eligibility first, liquidity bias second, structure confirmation third, and imbalance or displacement triggers fourth. Only when those layers align does the strategy consider taking a trade.
The goal of this strategy is not to present a magical black box. It is to model a disciplined decision stack. Many strategies fail because they treat every trigger the same way regardless of context. Charter Execution Model is built around the idea that context should do most of the work. If the market is not in a mature directional regime, if the liquidity ledger is not skewed appropriately, or if local structure does not agree, then a trigger by itself is not enough.
The script uses realistic execution controls directly in the declaration: fixed initial capital, percent-of-equity sizing, non-zero commission, non-zero slippage, no pyramiding, confirmed-bar evaluation, and orders processed on close. Those defaults are intended to make the backtest more responsible and easier to interpret than an overly aggressive model with idealized execution assumptions.
This strategy is best understood as a research framework. It can help traders study how context filters, imbalance triggers, continuation pressure, and ATR-based exits behave when combined inside one model. It is not a guarantee of future profitability, and it should be evaluated thoughtfully across symbols, regimes, and timeframes.
Core Concepts
1. Regime Eligibility Layer
The first gate determines whether the market is mature enough to even consider longs or shorts. It uses a directional midpoint and structural midpoint built from EMA and HMA references, then normalizes their spread by ATR and combines that with heat positioning inside the recent price range.
bool bullRegime = directionalMid > structuralMid
float regimeStrength = clamp(spreadNorm * 0.60 + math.abs(heatNorm - 50.0) * 0.80, 0, 100)
bool matureBullRegime = bullRegime and regimeStrength >= regimeFloor and regimePersistence >= 12
That means the strategy does not allow triggers to fire in weak or undeveloped directional states. Context comes first.
2. Liquidity Bias Layer
Next, the strategy builds a rolling bin-based liquidity distribution and compares buy-side volume versus sell-side volume. A long context requires positive liquidity bias and price above the reference EMA. A short context requires negative liquidity bias and price below the reference EMA.
This adds an inventory-style filter so the strategy is not trading purely off price shape.
3. Structure Filter
Local structure is confirmed using pivot-derived reference points and a rolling swing lookback. Longs require price to hold above recent swing support and above the slow EMA. Shorts require the inverse.
This helps reduce cases where a regime and liquidity reading are still positive or negative, but local price structure has already started to degrade.
4. Trigger Stack
Once context aligns, the strategy allows three possible triggers: a confirmed imbalance gap, a displacement shift, or an optional continuation retest into the directional midpoint. This means the model can participate through both fresh displacement and controlled continuation.
Importantly, the trigger layer does not override the context layer. It only becomes active when the earlier filters already agree.
5. ATR-Based Exit Framework
Risk management is handled through ATR-sensitive invalidation and two fixed-R profit targets. When the regime is especially strong, an optional trailing rule tightens the stop using recent local price action.
This creates a trade structure with a defined stop, two staged exits, and optional adaptation in stronger conditions without relying on unrealistic all-in-all-out assumptions.
Features
Four-layer decision hierarchy: Regime, liquidity, structure, and trigger conditions must align before entry
Confirmed-bar logic: Entries are evaluated only on confirmed bars to avoid repaint-style execution logic
Non-zero execution costs: Includes realistic commission and slippage in the strategy declaration
No pyramiding: Prevents stacking multiple positions in the same direction
Partial profit framework: Uses two independent `strategy.exit()` orders to scale out at separate R multiples
Optional continuation triggers: Allows pullback-style participation inside already qualified context
Optional strong-regime trailing stop: Tightens exits when regime strength is elevated
Dashboard summary: Displays regime, liquidity bias, pressure, trigger state, position state, stop settings, and current risk fields
Clean visual overlay: Shows directional and structural mids with contextual fill directly on the chart
Open-source research design: Lets users inspect and adapt the full context-to-execution hierarchy
Default Strategy Properties
Initial capital: `100000` is used as the default starting capital in the script declaration
Position sizing: Orders use `strategy.percent_of_equity` with a default quantity of `10`, meaning the strategy allocates 10% of equity per position by default
Commission: Commission is modeled as `0.02%` per trade
Slippage: Slippage is modeled as `2` ticks
Pyramiding: Pyramiding is set to `0`, so the model does not stack entries in the same direction
Order timing: `process_orders_on_close = true` and `calc_on_every_tick = false`, so the model evaluates and processes with confirmed-bar logic
Input Parameters
Regime:
Fast Length: Controls the fast directional reference
Slow Length: Controls the slow structural reference
ATR Length: Sets the ATR normalization length
Heat Window: Defines the range window for heat normalization
Regime Strength Floor: Sets the minimum maturity threshold for context eligibility
Liquidity Filter:
Liquidity Lookback: Sets the rolling history used for the liquidity model
Liquidity Bins: Controls the liquidity distribution granularity
Liquidity Bias Floor: Sets the minimum skew required before liquidity counts as directional
Structure Filter:
Pivot Length: Sets pivot confirmation sensitivity
Swing Lookback: Defines the rolling structural context window
Trigger Stack:
Gap Sigma Filter: Sets the minimum imbalance displacement required for gap-style triggers
Shift Momentum Length: Controls the raw momentum lookback
Shift RSI Length: Controls the pressure RSI smoothing
Displacement Floor: Sets the threshold for shift-style triggers
Allow Continuation Triggers: Enables or disables pullback continuation entries
Continuation Pressure Floor: Sets the minimum pressure level for continuation logic
Risk Management:
Stop ATR Multiplier: Scales the ATR contribution to stop placement
Target 1 R: Sets the first partial profit target
Target 2 R: Sets the second partial profit target
Trail In Strong Regime: Enables optional trailing behavior when regime strength is elevated
How to Use This Strategy
Step 1: Evaluate Context Before Results
Begin by understanding what the strategy is trying to do rather than focusing immediately on performance output. It only wants to trade when a mature regime, directional liquidity bias, and confirming structure are all aligned. If that idea does not match your own process, the results will be hard to interpret.
Step 2: Study Trigger Type Distribution
Not all entries come from the same source. Some come from imbalance gaps, some from displacement shifts, and some from continuation pressure. Understanding which trigger type dominates on a given market can be more useful than simply checking net profit.
Step 3: Understand The Exit Framework
The model uses a staged exit approach. Half the position is managed toward the first target and half toward the second. A stop is always active, and strong-regime trailing can tighten the exit path further. Review this logic carefully before drawing conclusions from the backtest.
Step 4: Keep Expectations Realistic
The strategy includes commission, slippage, confirmed-bar logic, and no pyramiding, but that still does not make the backtest “real.” Results depend on the instrument, the timeframe, the data sample, and how well the context assumptions fit the market studied.
Step 5: Use It As A Research Framework
Charter Execution Model is best used as a framework for studying context-first execution logic. Adapt the filters, test the thresholds, and evaluate how the hierarchy behaves across different environments rather than assuming the defaults are universally optimal.
Strategy Limitations
The strategy relies on historical context filters that may adapt poorly to sudden regime shifts or atypical event-driven conditions
Liquidity bias is based on bar-level directional volume attribution rather than true exchange order-flow data
Processing orders on close simplifies execution and can differ materially from real fills on fast markets
Backtest results are sensitive to parameter choices, timeframe selection, instrument behavior, and dataset length
Originality Statement
Charter Execution Model is original in the way it organizes multiple analytical layers into a disciplined execution hierarchy. It is not published as a simple indicator mashup strategy:
It requires mature regime, directional liquidity bias, and local structure to align before any trigger is allowed to matter
It supports multiple trigger archetypes inside the same context framework rather than treating one trigger as universally sufficient
It combines staged exits, ATR-sensitive invalidation, and optional strong-regime trailing inside a consistent risk model
It exposes its internal context state on-chart so users can study why the strategy is active or inactive at any point
Disclaimer
This strategy is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Backtest results depend on assumptions, data quality, slippage, commission, bar resolution, and market conditions. Past performance does not guarantee future results. Always use independent judgment and proper risk management before using any strategy logic in live markets.
-Made with passion by jackofalltrades
Strategy

3AK On Balance Turnover [OBT]📊 3AK On Balance Turnover (OBT)
3AK OBT (On Balance Turnover) is a price-action + participation indicator designed to help swing traders understand the strength behind a move , not just the move itself.
While traditional indicators like On Balance Volume focus on volume, this indicator goes one step further by tracking turnover (Volume × Price) — giving a clearer picture of money flow into and out of a stock.
🔍 What does this indicator show?
The indicator plots a cumulative turnover line (OBT) that rises or falls based on price movement:
When price moves up → turnover is added
When price moves down → turnover is subtracted
This creates a running total of buying vs selling pressure — helping you see whether real money is supporting the trend .
💡 How to interpret OBT (Key Insights)
1. Strength during pullbacks
One of the most powerful uses of OBT is during pullbacks.
If price pulls back but OBT stays near highs, it suggests:
The selling pressure is weak
The overall trend is still strong
The pullback may be temporary (market-driven, not stock weakness)
👉 This helps traders avoid exiting strong stocks too early due to minor corrections.
2. Breakout readiness using Smoothening Curve
You can optionally enable a smoothening curve (Moving Average of OBT).
When OBT is far above the curve → it may be extended
When OBT and curve are close together → compression phase
👉 Breakouts tend to have a higher probability when OBT and its curve are close, as it indicates buildup before expansion.
3. Early breakout signals (OBT leads Price)
Markers help identify important signals:
🟪 New OBT High before Price High
OBT makes a new high, but price hasn’t yet
Indicates accumulation happening quietly
👉 Often signals that a price breakout may be near
🟨 New OBT High + Price High
Both OBT and price make new highs together
👉 Confirms strong momentum and participation
(Both markers can be turned ON/OFF from settings based on your preference.)
🎯 Why use On Balance Turnover instead of Volume?
Volume alone doesn’t always reflect true participation.
OBT improves this by incorporating price:
High volume at low price ≠ High volume at high price
OBT captures actual traded value, making it more meaningful
⚙️ Customization
Choose different smoothening types: SMA, EMA, WMA, VWMA
Adjust smoothening length
Control visibility of breakout markers
Configure lookback period for “new high” detection (default: 65 bars ~ 3 months)
⚠️ Disclaimer
This indicator is designed for educational and swing trading purposes only.
It does not guarantee profits or successful trades.
Market conditions, news, and broader sentiment can impact price behavior. Always use this indicator alongside your own analysis and risk management. Indicator

Asterion Regime Lattice [JOAT]Asterion Regime Lattice
Introduction
Asterion Regime Lattice is an open-source market regime oscillator designed to classify whether conditions are directional, transitional, or balanced by combining multiple independent measurements into one continuous score. Instead of relying on a single trend indicator, it evaluates trend displacement, momentum, volatility behavior, directional movement, efficiency, choppiness, entropy, and higher-timeframe confirmation.
The problem this script solves is regime ambiguity. Many entries fail because traders apply trend logic in rotational conditions or mean-reversion logic in expanding directional phases. Asterion Regime Lattice provides a higher-level state model first, so any downstream tool can be interpreted in the proper context. The pane output uses layered lattice bands, a smoothed score curve, regime shading, and a compact dashboard to make the current state readable at a glance without covering price.
Core Concepts
1. Composite Regime Scoring
The script builds a regime score from several independent components rather than one oscillator. It measures fast/slow trend displacement, momentum direction, volatility expansion, directional movement, efficiency ratio, choppiness, Shannon entropy, fractal dimension, RSI state, and ADX-derived trend strength. Each component is normalized, weighted, and added into a single signed score where positive values indicate bullish expansion and negative values indicate bearish expansion.
2. Higher-Timeframe Confirmation
Two higher timeframes are requested with `request.security()` using `lookahead = barmerge.lookahead_off`. This keeps the script non-repainting while allowing the current timeframe to compare itself against broader directional conditions. The higher-timeframe pack contributes trend bias, momentum bias, volatility bias, directional movement bias, slope, ROC, and ADX strength.
=
request.security(syminfo.tickerid, htfOne, f_htfPack(), lookahead = barmerge.lookahead_off)
3. Structure Quality and Noise Separation
The script uses efficiency, choppiness, entropy, and fractal-dimension style measurements to separate clean directional movement from noisy rotation. That matters because two markets can have similar momentum but very different trade quality. Asterion does not only ask "is price moving?" It also asks whether the move is organized enough to treat as a real regime.
4. Lattice Bands and Regime Zones
The oscillator uses inner and outer bands around the smoothed score curve to display soft and strong regime zones. When the score pushes beyond soft thresholds the state becomes directional. When it pushes through stronger thresholds with quality and higher-timeframe agreement, the state becomes more decisive. This layered presentation makes the transition from balance to expansion visible before and during the full move.
5. Confirmed State Transitions
Alerts and state changes are only confirmed on closed bars. This keeps the script suitable for live use and avoids intrabar state flips being treated as final.
Features
Composite regime score: Blends trend, momentum, volatility, efficiency, entropy, fractal behavior, RSI, and DMI/ADX context
Dual higher-timeframe confirmation: Uses two configurable timeframes with `lookahead_off`
Trend quality layer: Separates clean directional movement from noisy or choppy conditions
Inner and outer lattice bands: Visualize soft and strong directional zones
Pane regime shading: Background tint shifts with the current market state
Optional bar tinting: Can color price bars by current regime while keeping the oscillator in a separate pane
Dashboard summary: Reports regime, quality, HTF alignment, volatility, momentum, efficiency, entropy, and directional state
Confirmed-bar alerts: Bull, bear, soft bull, soft bear, and transition events trigger only after bar confirmation
Input Parameters
Core:
Fast Length and Slow Length: Trend displacement backbone
Momentum Length and Trend Slope Length: Speed and directional persistence measurements
Structure Length, Volume Length, Volatility Length: Core normalization windows
Efficiency Length, Choppiness Length, Entropy Length, Entropy Bins, Fractal Length: Noise and organization diagnostics
RSI Length and ADX Length: Directional strength and internal pressure inputs
Higher-Timeframe Confirmation:
Primary HTF and Secondary HTF
Strong ADX and Weak ADX thresholds
Visuals:
Pane shading toggle
Lattice band toggle
Score curve toggle
Bar tint toggle
Curve smoothing and band multipliers
How to Use This Indicator
Step 1: Read the Regime Row
Start with the Regime row in the dashboard and the position of the score relative to the soft and hard thresholds. This tells you whether the market is directional, balanced, or in transition.
Step 2: Check Quality Before Acting
A high-magnitude regime score with weak quality is less reliable than a slightly smaller score with strong quality. Use the Quality row to decide whether the move is organized enough to trust.
Step 3: Compare With Higher Timeframes
The HTF row helps determine whether the current timeframe is aligned with the broader backdrop or fighting it. Stronger follow-through usually appears when local and higher-timeframe states agree.
Step 4: Use It as a Context Filter
Asterion is best used as a regime filter. Trend systems generally perform better when the oscillator is directional and quality is strong. Mean-reversion logic is generally more appropriate when the score is near balance and noise metrics dominate.
Indicator Limitations
The script is a classifier, not a predictive model. It describes current conditions; it does not forecast future direction
Higher-timeframe confirmation can lag turning points because those bars must close before their state is final
In low-range grinding markets, the oscillator can remain transitional for extended periods
Any weighted composite reflects design choices; different markets may require threshold adjustments
Originality Statement
Asterion Regime Lattice is original in the way it combines directional scoring, higher-timeframe agreement, and multiple noise-quality measurements into one structured regime model. It is not a simple trend oscillator with a new color scheme. The script is built around the idea that regime is a blend of direction, organization, and alignment across timeframes, and its lattice presentation is designed to make those layers visible rather than hiding them behind a single line.
Disclaimer
This script is provided for educational and informational purposes only. It is not financial advice and does not guarantee any outcome. Regime measurements are based on historical price and volume behavior and can produce false or delayed readings, especially during sudden event-driven changes in market conditions. Always use independent judgment and risk management.
Indicator

Adaptive Wave Pressure Index [JOAT]Adaptive Wave Pressure Index
Introduction
Adaptive Wave Pressure Index is a normalized slope oscillator built to measure directional pressure through the relationship between regression slope and volatility. By scaling a manually calculated OLS slope with ATR, the script produces a dimensionless momentum reading that can be compared across instruments and timeframes much more cleanly than raw slope alone.
This indicator is designed for traders who want wave pressure, not just speed. It tracks directional force, smooths that force into fast and slow lines, colors the histogram using structural swing context, and adds divergence detection for potential exhaustion.
Why This Indicator Exists
Volatility-Normalized Momentum: Regression slope is scaled by ATR to improve comparability
Fast / Slow Pressure Read: Reveals acceleration and deceleration of directional force
Structure Overlay: Swing-sequence counts add context to histogram strength
Zone Framework: Overbought and oversold thresholds define pressure extremes
Divergence Layer: Flags when price reaches new extremes without matching pressure
Core Components Explained
1. Manual OLS Slope
rawSlope = f_olsSlope(regLength)
The script calculates slope directly from the last N closes rather than relying on a built-in regression shortcut. This provides more control over normalization and display logic.
2. ATR Normalization
normSlope = rawSlope / ta.atr(atrNormPeriod)
Dividing slope by ATR transforms it into a volatility-aware measure of pressure. A positive slope on a low-volatility asset and a positive slope on a high-volatility asset become more comparable after normalization.
3. Fast / Slow Pressure System
Two EMAs are applied to the normalized slope:
Fast Line: More responsive pressure state
Slow Line: More stable reference
Histogram: Spread between fast and slow, showing acceleration or fade
4. Structural Sequence Layer
The indicator also counts consecutive higher lows and lower highs in price. When structure strongly supports the current pressure direction, histogram colors intensify. This adds a valuable distinction between pressure that is statistically rising and pressure that is also structurally confirmed.
5. Divergence and Zone Logic
The script highlights:
Fast-line crosses of overbought and oversold thresholds
Fast/slow line crosses
Bullish and bearish divergences
Divergence lines are retained with a fixed cap so the pane stays readable over time.
Visual Elements
Histogram: Pressure spread with structural-intensity color logic
Fast Line: Main directional read
Slow Line: Reference pressure line
Zero Fill: Directional bias area fill
OB/OS Background: Soft zone shading for extreme pressure
Markers: Crosses and divergence markers
Dashboard: Raw slope, normalized slope, trend, structure sequence, divergence, and active zone
Input Parameters
Regression Length: Window for OLS slope calculation
ATR Norm Period: Volatility baseline used for normalization
Fast / Slow EMA: Pressure responsiveness controls
OB / OS Levels: Extreme pressure thresholds
Pivot Left / Right: Sensitivity for structural and divergence logic
How to Use This Indicator
Step 1: Read whether fast is above or below slow.
Step 2: Check the histogram to see whether pressure is expanding or contracting.
Step 3: Use the sequence readout to judge whether price structure agrees with the oscillator.
Step 4: Treat divergences as warnings that pressure may be weakening.
Step 5: Use OB/OS events to identify stretched pressure, especially after large runs.
Best Practices
Use on instruments with clean swings and sufficient range
Respect signals more when sequence direction agrees with fast/slow direction
Use divergence with structure, not by itself
Increase regression length for smoother wave pressure
Lower lengths react faster but create more noise
Indicator Limitations
Normalized slope improves comparison but does not eliminate market differences
Pressure can stay elevated in strong trends
Divergences can persist before price turns
Short settings increase false transitions
Structure counts are descriptive, not predictive
Technical Implementation
Built in Pine Script v6 using:
Manual OLS slope computation
ATR normalization
Dual-EMA pressure smoothing
Pivot-based structure counting
Capped divergence-line management
Confirmed-bar signal generation
Originality Statement
This indicator is original in the way it combines normalized regression slope, structural sequence intensity, and divergence management into a single wave-pressure framework. Its purpose is not just to show direction, but to show how forceful and how structurally supported that direction is.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Momentum and divergence tools can fail, especially during volatile transitions. Always use proper risk management and independent confirmation.
-Made with passion by officialjackofalltrades
Indicator

Impulse Regime Engine [JOAT]Impulse Regime Engine
Introduction
Impulse Regime Engine is a hybrid breakout-and-trend indicator designed to detect when participation expands, when that expansion compresses into a tradeable box, and when price finally resolves that box with directional intent. It combines a volume regime engine with an RSI-projected price trend framework, creating a clean overlay built for timing impulsive releases without sacrificing directional context.
This indicator is especially useful for traders who like breakout structures but do not want to trade every range break blindly. The regime box defines the event. The projected trend framework defines the context.
Why This Indicator Exists
Participation Regime Classification: Distinguishes low-quality price movement from meaningful volume expansion
Lifecycle-Based Box Engine: Separates the setup into building, armed, and resolved states
Projected Trend Overlay: Maps RSI into price space for contextual trend direction
Strength-Based Candle Coloring: Visualizes conviction without overloading the chart
Active Risk Map: Adds optional stop and target staging after valid breaks
Core Components Explained
1. Volume Regime Engine
volRatio = shortVolMA / longVolMA
Volume is classified into Low, Normal, High, and Extreme states by comparing short-term participation to a longer-term baseline. Only elevated regimes are allowed to build a valid impulse box.
2. Regime Box Lifecycle
Building: While elevated volume persists, the box expands to contain the active burst
Armed: Once the burst cools, the box freezes and waits for release
Resolved: A confirmed close beyond the boundary triggers the breakout event and resets the cycle
The script now includes a cooldown between resolved boxes so repeated high-volume churn does not keep repainting fresh structures on every minor burst.
3. RSI Projection Framework
projected = priceLow + smoothedRsi * priceRange / 100.0
avgLine = ta.ema(projected, smoothLen)
Instead of reading RSI only as a sub-pane oscillator, the script converts RSI into projected price space. This produces a trend reference line directly on the chart.
4. Dynamic Tolerance Bands
tolerance = avgBody * toleranceMultiplier
marginUp = avgLine + tolerance
marginDn = avgLine - tolerance
Price above the upper band confirms bullish projected trend. Price below the lower band confirms bearish projected trend. This acts like a directional bias filter around the projection basis.
5. Breakout Risk Framework
When price resolves the armed box, the script can draw one stop and three profit levels using either ATR-derived or percentage-derived distance. The lines auto-expire so old trade maps do not crowd the chart.
Visual Elements
Regime Box: Semi-transparent box during build and armed phases
Projection Basis: Gold-accent projected trend line
Tolerance Bands: Bull and bear projection boundaries
Gradient Candles: Optional candle coloring by directional strength
Breakout Markers: Compact IRE triangles on confirmed release
TP/SL Lines: Optional risk staging while the active breakout remains valid
Dashboard: Volume regime, ratio, bias, box state, signal state, RSI, and strength
Input Parameters
Regime Engine:
Short / Long Volume MA
Low / Normal / High thresholds
Max build bars
Max armed bars
New box cooldown bars
Trend Projection:
RSI length and smoothing
Projection range bars
Projection EMA
Tolerance multiplier
Strength lookback
Risk Framework:
ATR period
ATR stop multiplier
TP1 / TP2 / TP3 risk-reward ratios
TP/SL maximum life
How to Use This Indicator
Step 1: Wait for elevated participation to build the impulse box.
Step 2: Let the box transition into the armed state.
Step 3: Read whether projected trend bias agrees with the likely breakout direction.
Step 4: Use confirmed breaks, not intrabar pokes, as the actual event trigger.
Step 5: Manage the trade against the active risk map or your own execution rules.
Best Practices
Use on instruments with reliable participation data
Prefer breakouts aligned with the projected trend state
Treat extreme volume bursts as high-opportunity but also high-volatility events
Use the cooldown to avoid overreacting in noisy compression cycles
Disable extra visuals if you want a cleaner execution chart
Indicator Limitations
Volume regime logic depends on the quality of the feed
Not every armed box will produce a sustained move
Projected RSI trend is a contextual guide, not a guarantee
Breakouts can fail or reverse quickly in low liquidity
Repeated tests of the same area reduce signal quality
Technical Implementation
Built in Pine Script v6 using:
Short-vs-long volume regime classification
Stateful box lifecycle logic
RSI-to-price projection
Body-based tolerance bands
Strength-gradient candle coloring
Optional ATR or percent risk mapping
Confirmed-bar breakout and trend-shift alerts
Originality Statement
This indicator is original in the way it combines regime participation, lifecycle breakout structure, and projected momentum context into one overlay. Its edge is not just detecting expansion, but framing when expansion is worth respecting.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Breakout trading involves risk, including false breaks and fast reversals. Always manage risk carefully and confirm signals with your own process.
-Made with passion by officialjackofalltrades
Indicator

Big Order Candle DetectorBig Order Candle Detector (BOCD) – Explanation & Usage
The Big Order Candle Detector (BOCD) is an indicator designed to identify potential large institutional order activity in the market. It focuses on detecting strong price displacement, which may signal the early stage of a trend.
This structure allows the indicator to capture moments where price moves aggressively, often without overlap with previous price ranges. Such behavior can indicate the presence of strong buying or selling pressure.
How Big Order is Detected
A Bullish Big Order is identified when the current candle’s low is higher than the high of Candle A. This indicates a clear gap or displacement upward, suggesting strong buying interest.
A Bearish Big Order, on the other hand, occurs when the current candle’s high is lower than the low of Candle A, reflecting strong downward pressure.
To reduce noise, the script only marks the first Big Order signal when multiple signals appear consecutively. This ensures cleaner and more meaningful signals.
Visual Representation on Chart
The indicator provides several visual elements to assist analysis:
Triangle Signals
Green triangle → Bullish Big Order
Red triangle → Bearish Big Order
→ Represents early momentum or possible trend initiation
Highlighted Candle (Orange)
→ Considered the origin of the move or liquidity zone
Support & Resistance Box
Drawn based on the high and low of Candle A
→ Acts as a reaction zone for future price movement
Strategy & How to Use
This indicator is best used as a supporting tool for price action analysis, not as a standalone trading signal.
BUY Scenario (Bullish Setup)
When a bullish Big Order appears, it suggests that strong buying momentum has entered the market. Instead of entering immediately, traders typically wait for price to retrace.
Approach:
Wait for price to pull back into the support box, Look for confirmation signals before entering
Confirmation Examples:
Bullish candlestick pattern (e.g., engulfing, pin bar)
Minor break of structure
Increase in volume
Trade Plan:
Entry: Inside the support box (after confirmation)
Take Profit: Nearest resistance zone or previous high
Stop Loss: Below the support box
SELL Scenario (Bearish Setup)
In a bearish setup, the indicator signals strong selling pressure. Similar to the bullish case, traders wait for a retracement rather than chasing the move.
Approach:
Wait for price to move back into the resistance box, Look for signs of rejection
Confirmation Examples:
Bearish rejection candle
Formation of lower high
Weak bullish momentum
Trade Plan:
Entry: Inside the resistance box (after confirmation)
Take Profit: Nearest support zone
Stop Loss: Above the resistance box
Key Concept Summary
Big Order = Strong displacement (possible institutional activity)
Triangle = Signal of momentum
Orange Candle = Origin zone
Box = Key support/resistance area
Retracement = Entry opportunity
Confirmation = Risk control
Important Considerations
This indicator:
Does not guarantee winning trades
Should not be used alone
Always combine with:
Risk management
Market structure analysis
Additional confirmation tools
In practice, BOCD works best as:
A decision-support tool to identify high-probability zones, rather than a direct buy/sell system. Indicator

Regression Deviation Channel [JOAT]Regression Deviation Channel
Introduction
The Regression Deviation Channel is an institutional-style statistical trend and execution framework built around segmented regression, deviation envelopes, premium/discount zoning, breakout qualification, and risk mapping. Instead of acting like a plain moving-average channel, it models price through a best-fit regression path, measures dispersion with RMSE, then classifies where price is trading inside that structure: discount, equilibrium, or premium.
This version is designed to feel more like a desk-grade directional map than a simple overlay. It combines a frozen regression segment, internal band hierarchy, confidence scoring, Supertrend stack alignment, breakout detection, and ATR-based trade mapping into one visual structure. The goal is not just to show where price is, but whether the current move is balanced, compressed, expanding, or resolving.
Why This Indicator Exists
Most channels are too simple. They show boundaries but do not explain what price is doing inside those boundaries. This indicator was built to solve that by combining:
Segmented Regression: Tracks the current directional price path with a proper best-fit slope
Deviation Architecture: Uses RMSE to define statistically meaningful channel width
Premium / Discount Zoning: Splits the channel into expensive, fair value, and cheap territory
Breakout Qualification: Scores breakout quality using slope, participation, structure, and location
Trend Stack Context: Adds Supertrend alignment to distinguish strong directional pressure from noise
Trade Mapping: Builds clean ATR-based stop and multi-target projections after confirmed breaks
The result is a regression channel that does more than draw lines. It gives context, bias, execution framing, and visual hierarchy.
Core Components Explained
1. Segmented Regression Engine
= f_ols(winLen)
basisVal = intercept + slope * float(barsInSeg - 1)
upperVal = basisVal + rmse * multiplier
lowerVal = basisVal - rmse * multiplier
The core engine uses manual ordinary least squares regression to calculate the channel basis. Once the segment matures, the regression values are frozen and projected forward until price resolves beyond the envelope.
This “freeze and resolve” behavior keeps the channel visually stable instead of constantly shifting every bar.
2. RMSE Deviation Structure
Root mean squared error defines channel width, making the envelope responsive to how tightly price is hugging the trend.
Tight RMSE = cleaner trend structure
Wide RMSE = unstable or volatile structure
Internal bands split the envelope into inner, quarter, and outer zones
These nested bands create a true structure ladder instead of a single upper/lower shell.
3. Premium / Discount Channel Arrays
The channel is separated into three value areas:
Premium: Upper edge territory where price is extended and expensive relative to the current regression path
Equilibrium: The center band around fair value and neutral orderflow balance
Discount: Lower edge territory where price is cheap relative to the active path
This makes the indicator more useful for directional context:
Bull channels pressing premium signal strong continuation pressure
Bear channels pressing discount signal strong downside control
Repeated failure to hold premium/discount can signal exhaustion or rebalancing
4. Breakout Confidence Model
Breakouts are not treated equally. The indicator scores breakout quality using four ingredients:
Participation: Distance from the regression basis normalized by ATR
Slope Force: Strength of the normalized regression slope
Location: Whether price is already pressing the outer structure
Alignment: Whether price direction and Supertrend stack agree with the channel
breakoutConfidence = participation + slopeForce + location + alignment
This helps separate lazy drifts from high-quality channel resolution.
5. Supertrend Ribbon Stack
The Supertrend layer is not there as a generic add-on. It acts as a second-order directional filter.
Bull channel + bull Supertrend = higher-quality directional stack
Bear channel + bear Supertrend = stronger downside stack
When regression and Supertrend disagree, price is more likely in transition
The fill between regression basis and Supertrend visually shows whether pressure is aligned or conflicted.
6. ATR Risk Map
After a confirmed breakout, the indicator projects:
1 ATR-based stop level
3 reward targets using configurable risk-reward multiples
Auto-expiring lines so stale trade maps are removed
This gives the channel direct execution value instead of leaving the user to manually measure every move.
Visual Elements
Metallic Basis Line: Gold-toned centerline for the active regression basis
Outer Deviation Shell: Main channel boundaries with glow
Inner Structure Bands: Internal ladder for pressure staging
Premium / Discount Fills: Separate upper and lower value zones inside the channel
Equilibrium Fill: Neutral fair-value region
Supertrend Ribbon: Context layer showing secondary directional alignment
Iridescent Candles: Candle coloring that intensifies as control and confidence improve
Breakout Markers: Compact signals for confirmed resolves
Readiness Diamonds: Pre-break alignment markers when channel conditions are strong
The visual hierarchy is designed so you can read the channel at a glance without relying on heavy objects or clutter.
Dashboard
The dashboard is intentionally compact and fixed to the right side. It shows only the highest-signal metrics:
Bias
Regime
Flow
Channel Position
Confidence
Compression
Trend Stack
Trade Map
How to Use This Indicator
Step 1: Identify Channel Bias
Check whether the regression slope is bullish or bearish. That defines the primary directional path.
Step 2: Read Value Location
See whether price is trading in premium, equilibrium, or discount. This tells you whether price is extended or balanced inside the channel.
Step 3: Watch Trend Stack Alignment
When Supertrend and regression agree, directional pressure is cleaner. When they disagree, reduce conviction.
Step 4: Monitor Confidence
Use the breakout confidence score to judge whether price is merely drifting or building a meaningful resolution.
Step 5: Trade the Resolve, Not the Noise
Use breakout markers and ATR map levels when price exits the frozen envelope with qualified pressure.
Best Practices
Use higher timeframes for cleaner channel geometry
Treat equilibrium as fair value, not a signal by itself
Bull channels work best when premium holds and pullbacks respect the inner bands
Bear channels work best when discount holds and rallies fail at internal structure
High compression followed by rising confidence often precedes expansion
Use the risk map for framing, not blind automation
Indicator Limitations
Regression is still a model of recent price, not a guarantee of future direction
Sudden event-driven moves can invalidate the frozen segment quickly
Premium and discount are relative to the current channel, not absolute market value
High breakout confidence can still fail in thin or news-driven markets
Short segments increase responsiveness but also increase noise
Technical Implementation
Built in Pine Script v6 using:
Manual OLS regression
RMSE deviation envelopes
Segment freeze-and-resolve logic
Internal quarter and inner bands
Premium/discount channel zoning
Supertrend stack integration
Breakout confidence scoring
ATR-based stop and target map
Compact institutional dashboard
Originality Statement
This indicator is original in how it treats a regression channel as a full market-state framework instead of a static overlay. The value is not just in plotting upper and lower lines, but in combining:
Segment freezing
Internal value zoning
Directional stack confirmation
Breakout qualification
Execution mapping
Each layer contributes different information: regression defines path, RMSE defines structure, premium/discount defines value, Supertrend defines stack, and confidence defines quality.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Regression channels, premium/discount zones, and breakout scores are analytical tools, not guarantees of market outcome. All trading decisions remain the responsibility of the user.
-Made with passion by officialjackofalltrades
Indicator

Segmented Pressure Bands [JOAT]Segmented Pressure Bands
Introduction
Segmented Pressure Bands (SPB) is an open-source, institutional-grade regression channel system that computes a linear best-fit line and deviation bands from scratch using manual Ordinary Least Squares (OLS) mathematics — no built-in regression functions used. The channel operates in distinct segments: it builds over a dynamic lookback window, freezes all parameters at a minimum length threshold, extrapolates forward using the frozen slope and intercept, and resets automatically when price closes beyond the outer deviation band. Gradient linefill layers between the basis and outer bands communicate channel pressure visually. A volume regime tint adjusts visual weight based on relative volume activity, and ATR-based TP/SL visualization is drawn on each breakout reset.
The core problem SPB solves is that standard regression channels repaint continuously as new bars add to the calculation window, making historical channel boundaries unreliable for reference. SPB's freeze-and-extrapolate architecture locks the regression parameters at a fixed point in time, then projects the channel forward. Price that deviates far enough from that projection triggers a segment reset — the channel is redrawn from the breakout point. This creates a clear, non-repainting record of each regression segment and the breakout that ended it.
Core Concepts
1. Manual OLS Linear Regression
The regression is computed using the standard Ordinary Least Squares normal equations applied to the source series over the active lookback window:
float denom = float(length) * sumX2 - sumX * sumX
slope := (float(length) * sumXY - sumX * sumY) / denom
intercept := (sumY - slope * sumX) / float(length)
RMSE (root mean square error) is calculated as the deviation of the source from the fitted line, providing the basis for band width. All accumulator variables (sumX, sumY, sumXY, sumX2) are computed in a per-bar loop, giving full control over the calculation window without relying on built-in functions that may change behavior across versions.
2. Channel Freeze and Extrapolation
When the lookback window reaches the minimum length threshold, the slope, intercept, and RMSE are locked into freeze variables. From that point forward, the x-coordinate passed to the regression formula is the number of bars elapsed since the freeze bar, allowing the channel to project forward without recalculating:
float xCur = -float(bar_index - freezeBar)
basis := frozenIcpt + frozenSlope * xCur
This extrapolation means the bands continue to move with the slope direction, but their relative spacing (the RMSE deviation) remains constant from the freeze point.
3. Segment Reset on Breakout
When a candle closes beyond the outer upper or lower band, the current segment is terminated. The channel redraws from the current bar using the fresh source data from that point forward. Old linefill objects are explicitly deleted before new ones are created to stay within Pine Script's object limits.
4. Gradient Linefills and Volume Regime Tint
N intermediate lines are drawn between the basis and each outer band, filled progressively with increasing transparency from the inner region to the outer edge. This creates a gradient pressure visualization — tighter fills near the basis signal equilibrium, wider fills near the outer band signal stretch. When the volume regime ratio (short-term MA / long-term MA) is elevated above the high threshold, line widths increase and fill opacity deepens to communicate high-activity conditions visually.
Features
Manual OLS Regression: Slope, intercept, and RMSE computed entirely from first principles — no built-in regression functions
Freeze and Extrapolate Architecture: Regression parameters locked at minimum length; channel projected forward along the locked slope
Automatic Segment Reset: Outer band close-beyond triggers segment restart — prior segment preserved as a historical record
RMSE Deviation Bands: Upper and lower bands placed at configurable RMSE multiples from the basis line
Gradient Linefill Layers: N intermediate lines fill the channel space with a visual pressure gradient — configurable step count
Volume Regime Tint: Relative volume ratio (short/long MA) adjusts visual weight — elevated volume deepens channel fills and thickens lines
ATR TP/SL Visualization: On each breakout reset, ATR-based take profit and stop loss boxes drawn from the breakout close
Channel Direction Color: Downward slope (bullish context — price above a declining regression) renders in teal; upward slope (bearish context) renders in rose
Non-Repainting Basis: Freeze architecture ensures historical segment boundaries do not move after they are drawn
Configurable Source: Basis line source is selectable (close, hl2, hlc3, ohlc4, etc.)
Dashboard (Top Right): Current slope, RMSE, volume regime label, band multiplier, and active segment bar count
Near-Band Warning Dots: Subtle circle markers appear on the chart when price is within 12% of either channel edge — early warning that price is approaching a band extreme before a breakout occurs
Distance-to-Nearest-Band in Dashboard: Current distance from price to the nearest band displayed as a percentage of channel width — provides a precise quantitative read of how stretched or compressed the current position is within the segment
Live Regression Slope in Dashboard: Live regression slope value shown in the dashboard — communicates the current directional angle of the frozen channel projection in real time
Breakout Win/Loss Tracking: Outcome of every breakout trade tracked against ATR-based TP/SL levels — total breakout trade count and cumulative win rate displayed in the dashboard
Expanded Dashboard (7 Rows): Dashboard expanded to 7 rows — now includes distance-to-band percentage, live slope, and breakout win rate alongside existing regime and segment data
Input Parameters
Regression Settings:
Source: Price input for regression calculation (default: close)
Lookback Length: Maximum bar window for OLS computation (default: 50)
Min Length to Freeze: Bar count at which slope/intercept are locked (default: 20)
Band Multiplier: RMSE multiple for outer band placement (default: 2.0)
Gradient Settings:
Gradient Steps: Number of intermediate fill lines between basis and outer band (default: 5)
Volume Regime:
Short Vol MA: Short-term volume moving average length (default: 10)
Long Vol MA: Long-term volume moving average length (default: 40)
High Vol Threshold: Vol ratio above which volume tint activates (default: 1.5)
ATR / Risk:
ATR Length: Period for ATR calculation (default: 14)
ATR SL Multiplier: Stop loss distance on breakout (default: 1.5)
Reward:Risk Ratio: Take profit multiple of stop distance (default: 3.0)
How to Use This Indicator
Step 1: Read the Channel Direction
A teal channel indicates a downward-sloping regression — price is above a declining trend line, suggesting bullish pressure within the distribution. A rose channel indicates an upward-sloping regression — price is below a rising channel ceiling, suggesting bearish pressure. The gradient fills communicate how far price has deviated from the basis within that segment.
Step 2: Trade Within the Channel
Price compressing toward the basis from an outer band (thin fill region narrowing) suggests mean reversion is underway. Price expanding toward the outer band (fills widening) suggests momentum continuation. The outer band itself acts as a stretch boundary — closes beyond it trigger a new segment.
Step 3: React to Breakout Resets
When a segment resets, the breakout bar is the reference point for directional bias. The ATR TP/SL boxes visualize the immediate risk/reward from that close. The new channel building from the breakout will establish the next directional context.
Step 4: Monitor Volume Context
Elevated volume regime (shown in dashboard) at a channel boundary gives more conviction to breakout or reversal signals. Low-volume channel touches carry less institutional weight.
Indicator Limitations
The OLS calculation runs a loop over the lookback window on every bar. On very long lookback lengths with high chart data density, this may increase script execution time — keep lookback below 200 for best performance
The freeze architecture means the channel projection can diverge significantly from price if the instrument trends strongly after the freeze point. Segment resets bring the channel back to current price, but wide outer bands may delay that reset on low-volatility instruments
Gradient linefills are subject to Pine Script's 50-linefill object limit. SPB manages this with explicit deletion on each segment reset. If the gradient steps setting is set very high (above 10), this limit may be approached in active markets
ATR TP/SL boxes on breakout are drawn from the breakout close. They do not adjust for gaps, overnight moves, or instrument-specific spread — manual adjustment of the ATR multiplier may be needed for highly volatile instruments
Volume regime calculation uses simple moving averages of volume. On instruments where volume data is synthetic or unavailable, the regime indicator will not reflect true market activity
Originality Statement
SPB implements a regression channel with a freeze-extrapolate-reset lifecycle that produces stable, non-repainting historical segment boundaries. This design is original for the following reasons:
Computing OLS slope, intercept, and RMSE from scratch using raw accumulator mathematics — rather than using ta.linreg() or similar built-ins — gives full control over the calculation window, source, and update behavior, and avoids implicit look-ahead that some built-in functions can introduce
The freeze-and-extrapolate architecture is distinct from standard rolling regression, where every new bar shifts the entire historical channel. Once frozen, SPB's channel parameters are immutable — historical band boundaries drawn in past segments are permanent reference levels
The gradient linefill layer system communicates statistical deviation pressure visually across the full channel width, rather than drawing only a basis and outer band with no information about the space between them
The integration of a volume regime tint directly into the regression channel visualization — adjusting visual weight based on relative volume — provides immediate context for whether current channel position is occurring during active or quiet market conditions
Disclaimer
This 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 substantial risk of loss. Regression channels and statistical deviation bands are mathematical constructs applied to historical data — they do not predict future price behavior. Breakout signals at band extremes do not guarantee continuation in any direction. Always apply proper risk management. The author is not responsible for any trading losses resulting from the use of this indicator.
-Made with passion by jackofalltrades
Indicator
