Covenant Participation Lattice [JOAT]Covenant Participation Lattice
Introduction
Covenant Participation Lattice is an open-source participation-axis engine that builds a rolling price-distribution profile, stabilizes the point of control, and maps value-area structure around that axis. It is designed to show where price is accepted, where it is stretched, and whether current auction conditions are balanced, premium, or discounted.
Core Concepts
1. Rolling profile construction
A distribution of volume by price is rebuilt over a configurable lookback and row count. The profile identifies a raw point of control and the surrounding value area used to classify current price position.
2. Stabilized axis logic
Rather than plotting the raw POC directly, Covenant stabilizes the axis using staged adjustments constrained by ATR. This reduces noisy jumps while preserving meaningful auction shifts.
3. Premium, discount, and acceptance diagnostics
The script calculates how much volume sits above, below, and inside value. This allows the chart to distinguish accepted trade inside value from premium or discount extension away from it.
4. Corridor rendering
Guide lines and corridor fills visually connect the participation axis with the value-area bounds so the trader can see auction balance without reading the dashboard first.
Features
Rolling profile and stabilized participation axis
Value-area high, low, and midpoint structure
Premium/discount share analysis
Balance tilt and tail-skew diagnostics
Ribbon and top-right dashboard
Confirmed alerts for axis reclaim, value-area breaks, and deep extension
Disclaimer
This indicator is educational and informational only. Participation and value-area relationships describe auction context; they do not guarantee reversal or continuation.
- made with passion by officialjackofalltrades Indicator

Tectonic Ribbon Oscillator [JOAT]Tectonic Ribbon Oscillator
Introduction
Tectonic Ribbon Oscillator is an open-source lower-pane momentum field built from twenty lag-reduced strands. The script classifies whether momentum is in bullish expansion, bearish expansion, or twist compression by comparing the ribbon's fast, mid, and slow structure instead of relying on a single oscillator line.
The problem Tectonic solves is momentum depth. A single oscillator can show direction, but it usually hides how broad or fragile the move actually is. Tectonic exposes ribbon breadth, spread, slope, and divergence in one framework so the user can distinguish acceleration from compression.
Core Concepts
1. Multi-Strand Ribbon Construction
Each strand uses a progressively larger lookback and lag-reduced smoothing. This creates a depth field rather than a single-value oscillator.
2. Fast-Mid-Slow Spread Logic
The oscillator compares grouped ribbon averages and uses the spread to determine whether momentum is directional or twisted into compression.
3. Regime Classification
Bull, bear, and twist states are identified from the spread and held as confirmed regime transitions.
4. Divergence Validation
Price pivots and ribbon pivots are compared to identify confirmed bullish and bearish divergence without using future leaks.
5. Momentum Support Layers
Histogram and slope components add a second view of how the ribbon is accelerating or decelerating internally.
Features
Twenty-strand momentum ribbon: Progressive lookbacks create a true depth profile
Lag-reduced smoothing: Ribbon strands are stabilized without reverting to a slow classic oscillator
Twist regime detection: Compression is explicitly separated from directional impulse
Confirmed divergence logic: Bullish and bearish divergence are tracked from confirmed pivot relationships
Histogram and slope overlays: Secondary layers help gauge acceleration quality
Top-right dashboard: State, spread, slope, histogram, depth, divergence, last shift, confirmation, and breadth are reported continuously
How to Use This Indicator
Step 1: Read the regime
Bull and bear states indicate directional momentum dominance. Twist indicates compression or unstable breadth.
Step 2: Compare spread and slope
A large spread with weakening slope often indicates mature momentum. A fresh spread expansion with improving slope usually indicates earlier-cycle momentum.
Step 3: Respect divergence in context
Confirmed divergence is most useful when it appears against an already stretched ribbon state.
Indicator Limitations
Divergence is not a reversal guarantee
Twist states can persist for long periods in balanced markets
Shorter settings will react faster but can become noisy
The oscillator is a momentum context tool and should be combined with market structure or regime logic
Originality Statement
Tectonic Ribbon Oscillator is original in the way it assembles a twenty-strand lag-reduced ribbon, grouped spread classification, divergence validation, and dashboard reporting into one momentum framework rather than publishing a lightly modified RSI derivative.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Momentum and divergence signals can fail, especially during high-volatility structural breaks. Use independent analysis and risk management.
Indicator

Helix Trend Ensemble [JOAT]Helix Trend Ensemble
Introduction
Helix Trend Ensemble is an open-source trend overlay built around a three-member weighted ensemble. Instead of relying on one moving average or one crossover, Helix evaluates multiple configurable members, normalizes slope behavior, and produces a consensus trend state only when enough internal agreement is present.
The problem Helix solves is false certainty. Single-line trend tools are easy to read but easy to break. Multi-line tools often create clutter without resolving disagreement. Helix is designed to preserve a clean chart while still exposing the quality of alignment between fast, intermediate, and structural trend engines.
Core Concepts
1. Multi-Member Trend Architecture
Three independent members can each use different MA types, smoothing methods, lengths, and weights. This allows the ensemble to mix responsiveness with structural stability.
2. Weighted Consensus
The final state is not a simple majority vote. Each member contributes according to its configured weight, and the ensemble requires sufficient agreement before it promotes a directional state.
3. Slope Normalization
Raw slope values are normalized so the dashboard can express trend energy in a stable way across different length combinations.
4. Filter Layer
ATR and ADX filters help suppress weak trend states and reduce low-quality directional transitions.
5. Confirmed Regime Transitions
Directional state changes are only recognized on confirmed bars, which keeps the ensemble consistent with real-time use.
Features
Three fully configurable members: Each member supports multiple MA and smoothing combinations
Weighted consensus engine: Final state depends on internal agreement quality, not one crossover
Normalized slope score: Slope behavior is translated into a stable strength readout
Ribbon and cloud system: Trend geometry is expressed through layered fills instead of cluttered markers
Optional candle coloring: Price bars can reflect the ensemble state without altering logic
Top-right dashboard: Regime, consensus, strength, slope, agreement, filters, and last flip are summarized continuously
How to Use This Indicator
Step 1: Read regime and consensus together
A bullish or bearish state is more meaningful when consensus is high and filters are passing.
Step 2: Watch slope and strength
An aligned ensemble with weakening slope often signals late-trend conditions rather than fresh expansion.
Step 3: Use Helix as a bias filter
Helix works well as a directional framework for execution models that need a clean trend gate.
Indicator Limitations
Longer member lengths will intentionally delay reversals
High responsiveness settings can increase whipsaws
Consensus does not eliminate all false trends; it only improves structural filtering
The script is a trend-classification tool, not a full strategy
Originality Statement
Helix Trend Ensemble is original in the way it combines configurable member diversity, weighted consensus, slope normalization, and clean institutional visualization into one open-source trend framework.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Trend-state tools can fail during rapid reversals, compressed markets, or structurally irregular conditions. Use proper risk control at all times.
Indicator

Volatility Hull Ribbon [BackQuant]Volatility Hull Ribbon
Overview
Volatility Hull Ribbon is a trend-following overlay built from a Hull-style moving average that replaces traditional volume weighting with volatility weighting . Instead of weighting price by traded volume, this indicator weights price by the absolute True Range of each bar, meaning bars with larger range expansion have more influence on the final trend estimate.
The goal is to create a smoother but responsive trend line that pays more attention to bars where the market actually moved with force. It then plots this volatility-weighted Hull structure as either a clean line or a ribbon-style band, with gradient fill, candle coloring, and long/short flip markers.
At a high level, the indicator does three things:
Builds a volatility-weighted moving average using True Range as the weighting source.
Applies Hull-style lag reduction to produce a faster trend-following curve.
Visualizes trend direction using slope, ribbon fill, candles, and flip signals.
Core idea
Most moving averages treat each bar equally or weight only by time. That means a quiet candle and a high-range expansion candle can have similar influence depending on the MA type.
Volatility Hull Ribbon takes a different approach:
Bars with larger True Range are treated as more important.
Bars with smaller True Range have less influence.
Recent bars are also weighted more heavily than older bars.
This creates a trend estimate that responds more strongly when the market expands, while remaining smoother during lower-energy movement.
What “volatility-weighted” means here
The custom weighting function uses:
Price source
Absolute True Range
A decreasing time weight
For each bar inside the lookback:
Weighted price contribution = source * abs(True Range ) * recency weight
Weight contribution = abs(True Range ) * recency weight
Then:
Volatility-weighted average = weighted price sum / weighted True Range sum
So price movement on wide-range bars matters more than price movement on quiet bars.
Why True Range is used
True Range captures more than just high-low movement. It accounts for gaps and previous close displacement. This makes it a broader volatility proxy than simple candle range.
Using True Range as the weight means the filter gives more importance to bars where:
Range expanded,
Price displaced aggressively,
Volatility increased,
Market participation likely intensified.
This is useful because strong trend moves often occur during volatility expansion, not during quiet drift.
Hull-style construction
The indicator then applies a Hull-style transformation to the volatility-weighted average.
The structure is:
VWHMA = VWMA_TR( 2 * VWMA_TR(src, len / 2) - VWMA_TR(src, len), sqrt(len) )
Where VWMA_TR means the custom True-Range-weighted moving average.
This follows the same logic as the classic Hull Moving Average:
Use a faster half-length average.
Use a slower full-length average.
Subtract the lagging component.
Smooth the result with sqrt(length).
The difference is that every smoothing step is volatility-weighted instead of standard weighted-average based.
Why this matters
A classic Hull Moving Average is already designed to reduce lag. This version modifies the internal weighting so the curve becomes more sensitive to volatility-backed price movement .
That means:
Large expansion bars can pull the filter faster.
Weak low-range chop has less effect.
Trend changes during strong movement can be reflected more clearly.
Trend detection
Trend direction is based on the slope of the VWHMA:
Bullish when VWHMA > VWHMA
Bearish when VWHMA < VWHMA
This is a simple but effective regime definition:
Rising volatility-weighted Hull = bullish trend pressure.
Falling volatility-weighted Hull = bearish trend pressure.
The script uses this slope state to color:
The main line,
The ribbon fill,
Optional candles,
Signal markers.
Ribbon mode
When “Plot as Band?” is enabled, the script creates a second line:
onebar_off = WMA(VWHMA , 10)
This is a delayed and smoothed version of the VWHMA. The area between the current VWHMA and this offset line becomes the ribbon.
Interpretation:
Ribbon expansion shows separation between current trend structure and its delayed reference.
Ribbon compression shows trend slowing or flattening.
A clean flip in the ribbon often coincides with trend transition.
The ribbon is not a volatility band. It is a trend displacement ribbon built from the difference between the current VWHMA and its delayed smoothed version.
Gradient fill logic
The fill is directional:
If VWHMA is above the offset line, fill intensity is stronger near the VWHMA and fades toward the offset.
If VWHMA is below the offset line, the gradient reverses.
This creates a cleaner visual than a flat fill because it emphasizes the active side of the ribbon.
In practice:
Strong bright ribbon = trend line leading the delayed reference.
Faded/narrow ribbon = weaker separation.
Ribbon reversal = trend pressure has shifted.
Signal logic
Signals are generated when the VWHMA slope changes direction:
Long signal: crossover(VWHMA, VWHMA )
Short signal: crossunder(VWHMA, VWHMA )
This means:
A long signal prints when the current VWHMA turns upward relative to the previous value.
A short signal prints when the current VWHMA turns downward.
These are slope-flip signals, not price crossover signals.
Important interpretation
A signal does not mean “buy blindly” or “sell blindly.” It means the volatility-weighted trend estimate has changed direction. The quality of the signal depends on:
Market structure,
Higher timeframe trend,
Volatility conditions,
Whether the ribbon is expanding or compressing.
Candle coloring
When enabled, candles are painted according to the VWHMA slope:
Bullish slope = long color.
Bearish slope = short color.
This makes the indicator easier to read as a regime overlay. You can quickly see when the market is consistently aligned with the volatility-weighted trend.
How to use it
1) Trend filter
Use the VWHMA color as a bias filter:
Only favor longs when the VWHMA is rising.
Only favor shorts when the VWHMA is falling.
2) Trend transition tool
Slope flips can identify early trend shifts:
Long marker = VWHMA has turned upward.
Short marker = VWHMA has turned downward.
Because the filter is Hull-style and volatility-weighted, it can react faster than slower trend filters while still suppressing some low-range noise.
3) Ribbon strength reading
The ribbon gives additional context:
Expanding ribbon = stronger separation and cleaner trend pressure.
Contracting ribbon = momentum weakening.
Ribbon flattening = chop or transition risk.
4) Pullback structure
In strong trends, price often respects the VWHMA or ribbon area:
Bull regime: pullbacks into the ribbon can act as support.
Bear regime: rallies into the ribbon can act as resistance.
5) Volatility-backed trend confirmation
Because large True Range bars influence the calculation more, this tool is useful for identifying whether trend changes are being supported by actual range expansion.
If price moves but the VWHMA does not respond strongly, the move may lack volatility-backed confirmation.
Input guide
Price Source
Defines the input series used for the calculation. Close is standard, but hl2, hlc3, or ohlc4 can be used for smoother structural behavior.
Lookback Period
Controls the smoothing length:
Lower values = faster response, more signals, more noise.
Higher values = smoother trend, fewer flips, more lag.
Plot as Band
Enables the ribbon view using the delayed smoothed VWHMA reference.
Line Width
Controls the main line thickness when not relying heavily on band mode.
Show Trend Candles
Paints candles by current trend state.
Show Signals
Toggles the long/short slope-flip markers.
Strengths
Uses volatility-weighted smoothing instead of equal weighting.
Combines volatility sensitivity with Hull-style lag reduction.
Clean ribbon visualization for trend displacement.
Simple slope-based regime interpretation.
Works well as a trend overlay or bias filter.
Limitations
Slope flips can still whipsaw in sideways markets.
Large wick bars can influence the filter strongly because True Range is used as weight.
It does not measure volume, despite using a VWMA-style internal function.
It is a trend tool, not a complete trading system.
Best use case
Volatility Hull Ribbon works best when used as a visual trend structure layer:
Use color for bias.
Use ribbon expansion/compression for strength.
Use slope flips for regime transitions.
Use price interaction with the ribbon for pullback context.
Summary
Volatility Hull Ribbon is a Hull-style trend overlay that replaces traditional weighting with True Range weighting, making the moving average more responsive to volatility-backed price movement. It builds a low-lag volatility-weighted Hull curve, compares it to a delayed smoothed reference to form a ribbon, and uses slope changes to define trend direction and signals. The result is a clean, responsive trend ribbon that highlights when volatility-backed trend pressure is rising, fading, or reversing. Indicator

Heikin Ashi Trend Zones [AGPro Series]Heikin Ashi Trend Zones
Heikin Ashi Trend Zones is a clean overlay built for traders who like the smoothing behavior of Heikin Ashi but still want to keep the original market candles visible. Instead of repainting the chart with synthetic candles, the script reads the internal Heikin Ashi state in the background and converts it into a focused trend-state layer.
The engine follows four core ideas:
1. Internal HA Side
The script calculates the active Heikin Ashi side from synthetic HA open and close values, then filters weak neutral bodies so the state does not flip on every small candle.
2. HA Streak Quality
The panel tracks how long the current HA side has been active. This helps separate early state changes from mature continuation phases.
3. Optional Transition Zones
When the HA side changes with enough body strength, wick cleanliness, close location, ATR pressure, and prior-state maturity, the script can project a compact rectangular transition zone. This layer is disabled by default so the public chart view stays clean, but it remains available for traders who want to inspect HA changeover corridors.
4. Continuation Quality
Once a HA streak matures, the script scores continuation quality using body strength, wick cleanliness, close location, smoothed HA slope, streak depth, and ATR context. Labels appear only when the continuation score is strong enough and the cooldown rules allow a clean chart presentation.
What makes this script different
- It does not replace real candles with Heikin Ashi candles.
- It does not behave like a generic trend-following dashboard.
- It focuses on HA state transitions, HA streak maturity, and continuation quality.
- Optional transition boxes are concept-native HA corridors, not broad horizontal support/resistance zones.
- Label density is capped with cooldown and maximum visible label controls.
- The panel exposes HA side, streak, transition quality, continuation quality, and ATR context in a compact AGPro layout.
Visual design
The overlay stays restrained:
- A slim trend-state ribbon follows the smoothed HA path.
- Optional transition zones can extend forward as compact rectangles when enabled.
- Continuation labels are offset from candles with ATR spacing.
- Panel location, panel theme, panel font size, and label font size are adjustable.
Suggested usage
Use the script to study whether Heikin Ashi structure is shifting, stabilizing, or continuing while the original candles remain visible. The strongest reads usually come from alignment between a clean HA side, a growing streak, strong continuation quality, and an ATR context that supports the current state.
Default settings are tuned for a balanced public chart view with a clean ribbon and selective continuation labels. Faster traders can reduce smoothing and cooldown values. Swing traders can enable transition zones, increase transition projection, and require higher continuation quality for fewer labels. Indicator

Artemis Volatility Bands PRO🟦 Artemis Volatility Bands PRO is a price-overlay volatility indicator built on the KernelLens Nadaraya–Watson regression library (a_jabbaroff/KernelLens/1). A single kernel estimate — selectable from eight classical kernel families — anchors the Basis line. Around it, two outer bands fan outward by a fixed multiple of the residual standard deviation, creating an envelope whose width is model-consistent with the kernel. The interior is washed with a 6-layer neon halo that mirrors the statistical density of price residuals under normality. A signal engine detects basis-breaks with confirming slope direction, guarded by Confirmed (zero-repaint) or Realtime mode. Twelve cohesive color themes, a theme-aware Dark / Light dashboard, and four opt-in alert conditions complete the indicator.
🟦 HOW IT WORKS
Artemis Volatility Bands PRO fuses two mathematical operations on every bar — a single kernel regression pass and a residual standard deviation calculation:
basis = kl.estimate(type, src, ℓ, α, period, phase, filter)
sigma = kl.confidenceBand(src, basis, window)
upper = basis + k · σ
lower = basis − k · σ
where ℓ is the Primary Bandwidth, k is the Band Multiplier, and window is the Residual σ Window. The kernel regression produces the Basis line, and the residual standard deviation (σ of price − basis) produces the per-σ band half-width.
This architecture collapses classical Bollinger band duality: in Bollinger bands, the moving average and volatility estimate live in different statistical universes. In Artemis, both emerge from a single kernel pass, so the envelope is internally consistent by construction. The Basis is always non-parametric, and the band width always measures deviation relative to the Basis, never to a disconnected moving average.
The library handles all weighted-sum computation, kernel weight evaluation, NA-safe iteration, division-by-zero guards, and input validation internally. Artemis Volatility Bands PRO does not reimplement any kernel math — every bug fix or optimization in the library automatically propagates to this indicator.
🟦 KERNEL LIBRARY INTEGRATION
Artemis Volatility Bands PRO imports the published KernelLens library and uses the following exports:
| Library Export | Used For |
|---|---|
| `kl.estimate()` | Unified dispatcher — routes to the correct kernel based on the user's Kernel Type dropdown. Called once per bar to produce the Basis line. |
| `kl.confidenceBand()` | Rolling residual standard deviation — computes σ of (source − basis) over the specified window. |
| `kl.trendState()` | Ternary trend detector — returns +1 (rising), 0 (flat), or −1 (falling) based on a 1-bar finite difference of the Basis. |
Every regression computation — kernel weight evaluation, NA-safe summation, bandwidth-aware loop termination — is delegated to the library. The indicator itself contains zero kernel math; it only orchestrates three library calls and aggregates their outputs into the band envelope and signal logic.
🟦 KERNEL REGRESSION & RESIDUAL VOLATILITY
**The Basis line** — A non-parametric kernel regression anchored to the user's choice of price source (default: close; also supports hl2, ohlc4, custom). Eight kernel families available:
| Kernel | Behavior | Best For |
|---|---|---|
| Rational Quadratic | Multi-scale mixer; α controls stretch | Default, balanced responsiveness |
| Gaussian / RBF | Canonical smoother, infinitely differentiable | Smooth trend, minimize noise |
| Periodic | Resonates with a known repetition distance p | Cyclic markets, seasonal patterns |
| Locally Periodic | Periodic × gaussian blend | Seasonal + trend drift |
| Epanechnikov | MSE-optimal, compact support | Minimal tail contamination |
| Tricube | LOWESS standard, near-Gaussian profile | Fast computation, robust |
| Triangular | Simplest compact kernel | Lightweight, real-time responsiveness |
| Cosine | Raised-cosine, smooth boundary transition | Smooth rolloff, professional appearance |
Three filter modes applied on top of the raw kernel estimate:
| Filter | Description | Use Case |
|---|---|---|
| No Filter | Single-pass Nadaraya–Watson | Rawest output, maximum responsiveness |
| Smooth | Double-pass: kernel applied to its own output | Cleaner, slightly more lag |
| Zero Lag | Ehlers de-lagging: 2·raw − smooth | Sharpens edges without increasing lag |
**Residual volatility** — Once the Basis is computed, the per-bar residual is (source − basis). The residual standard deviation is the rolling σ of this residual over a configurable window (default: 14 bars). This is the model-consistent volatility estimate — price deviations are measured relative to the kernel Basis, guaranteeing alignment between trend and volatility.
**Band levels** — upper = basis + k · σ and lower = basis − k · σ, where k is the Band Multiplier (default: 2.0, Bollinger-style). The multiplier is user-adjustable from 0.5 (tight) to 5.0 (wide).
🟦 SIGNAL ENGINE
Artemis fires Long / Short signals when price breaks the Basis with a confirming slope direction:
Long → close > basis AND basis rising
Short → close < basis AND basis falling
The signal state is persistent — once a direction flips, it remains latched until the opposite condition fires. This state machine (vii ∈ {−1, 0, +1}) ensures the Basis hue stays coherent across bars even when the raw trigger is a single-bar event.
Signal markers fire ONLY on the bar the state flips, not on every bar that satisfies the raw condition. This keeps the chart uncluttered and mirrors how discretionary traders consume trend-flip information.
**Signal Mode** — Two gating options:
| Mode | Behavior | Repaint |
|---|---|---|
| Confirmed | Signals fire ONLY after the bar closes via `barstate.isconfirmed` | Zero repaint, fully reliable for live trading |
| Realtime | Signals fire on the current (open) bar as soon as the condition is met | Fastest reaction; signal may vanish if price reverses before bar closes |
Historical repainting never occurs at any Signal Mode value. The library's `_phase` parameter shifts every kernel center into the past by that many bars, so historical bars' plotted values are final once confirmed.
🟦 6-LAYER NEON HALO VISUALIZATION
The interior between the Basis and each outer band is filled with a 6-layer gradient: 5 interior step plots plus the outer band, creating a stepped transparency schedule that mirrors the statistical density of price residuals under normality.
**Transparency schedule:**
| Layer | Transparency | Meaning |
|---|---|---|
| Outer band ↔ 1st interior | 70 % | Densest layer |
| 1st ↔ 2nd | 78 % | |
| 2nd ↔ 3rd | 85 % | |
| 3rd ↔ 4th | 90 % | |
| 4th ↔ 5th | 95 % | |
| 5th ↔ Basis | 98 % | Nearly invisible fade to centerline |
Every transparency value is scaled by the Gradient Intensity input (0–100 %), so the user can dial the visual density from invisible (0) to heavy fills (100).
**Color assignment:**
- Upper band + gradient: Bearish theme hue (short signal color)
- Lower band + gradient: Bullish theme hue (long signal color)
- Basis line: Slope-adaptive color (thBull when rising, thBear when falling, previous color on flat bars)
**Signal markers** — Two-layer neon glow plotshapes:
- Halo: size.small, 40 % opaque theme hue (glow layer)
- Core: size.tiny, 100 % opaque theme hue (bright center)
🟦 THEME SYSTEM
Twelve cohesive color palettes tuned to every trading aesthetic. One selection drives every visual component — Basis line, outer bands, gradient halos, long / short signal markers, dashboard accents — all sharing the same bull / bear / neutral color axes:
| Theme | Bull | Bear | Usage |
|---|---|---|---|
| Tropic | Cyan steel | Deep orange | Default, electric contrast |
| Amber | Warm amber | Indigo blue | Fire tones |
| Pastel | Sky blue | Soft lavender | Cool arctic glow |
| Cyber | Neon lime | Hot crimson | Cyber terminal aesthetic |
| Helios | Bright gold | Scarlet | Solar warmth |
| Electric | Electric aqua | Magenta | High-voltage neon |
| Candy | Neon green | Hot pink | Dark energy pop |
| Bloomberg | Terminal orange | Cyan | Wall Street finance heritage (PRO) |
| Solar | Solarized olive | Crimson | Developer palette, easy on eyes (PRO) |
| Royal | Imperial gold | Deep purple | Luxury signature (PRO) |
| Midnight | Deep navy | Dark crimson | Dark depth |
| Graphite | Near-black | Silver grey | Monochrome minimal |
**Dashboard display modes** — Dark (black background, bright accents) or Light (white background, darker accents), auto-adapting visual contrast regardless of chart background.
🟦 DASHBOARD
A 2-column, 9-row theme-aware status panel that updates only on the last bar (zero historical overhead). Supports Dark and Light display modes, six docking positions, and four text sizes. Renders via `force_overlay = true` on the main price chart.
| Row | Label | Content |
|---|---|---|
| Header | ARTEMIS PRO | DARK / LIGHT |
| Theme | Theme | Active palette name |
| Divider | KERNEL | — |
| Type | Type | Selected kernel type |
| Bandwidth ℓ | Bandwidth ℓ | Primary bandwidth + Phase φ |
| Basis | Basis | Current Basis value in chart mintick format |
| Divider | VOLATILITY | — |
| Residual σ | Residual σ | Current residual standard deviation |
| Signal | Signal | ▲ LONG / ▼ SHORT / ━ FLAT (direction-colored) |
🟦 ALERT CONDITIONS
Four opt-in alert conditions, each gated by its own toggle:
| Alert | Fires When |
|---|---|
| Long Signal | Price breaks above the Basis with a rising slope (confirmed state flip) |
| Short Signal | Price breaks below the Basis with a falling slope (confirmed state flip) |
| Upper Band Touch | Price touches or exceeds the upper outer band (raw crossover) |
| Lower Band Touch | Price touches or falls below the lower outer band (raw crossunder) |
Band touch alerts are useful as pre-signal early warnings in trending markets. Signal alerts are gated by the Signal Mode setting, so Confirmed mode ensures zero-repaint alerts suitable for live trading.
All alerts use `alertcondition()` for maximum compatibility with PulseWire's alert system including webhooks. Messages are structured as `"Artemis Volatility Bands: "` for easy parsing in downstream automation.
🟦 RECOMMENDED PRESETS
| Trading Style | Bandwidth ℓ | Filter | Residual σ Window | Phase |
|---|---|---|---|---|
| Scalper | 10–20 | No Filter | 8–10 | 1 |
| Day Trader | 20–40 | Smooth | 14 | 2 |
| Swing | 30–60 | Smooth | 20–40 | 2 |
| Position | 60–120 | Smooth | 40–60 | 3 |
**Bandwidth tuning** — Smaller ℓ produces a tighter fit to price and faster reaction; larger ℓ produces smoother curves and more stability. Experiment with ℓ in your preferred style's range, then adjust the Residual σ Window and Filter mode for visual smoothness.
**Phase tuning** — Phase = 0 is live (flickers on the current bar); Phase = 2 is the recommended balance; Phase = 3+ adds margin against noise at the cost of lag. Historical charts are immutable at any phase value.
🟦 KERNEL-ONLY DESIGN PHILOSOPHY
Artemis Volatility Bands PRO contains zero classical technical analysis bolt-ons. No Bollinger Bands, no Keltner Channels, no linear regression, no ATR, no moving averages — only kernel regression and residual volatility. This kernel-only architecture guarantees that:
1. **Internal consistency** — The Basis and band width emerge from a single statistical model, not from mixing independent techniques.
2. **Unified parameterization** — All visual outputs (Basis, bands, gradient) are controlled by a single set of kernel-theoretic parameters.
3. **No analytical compromise** — Every choice in the indicator is mathematically motivated; no ad-hoc decorations.
The philosophy is defensive: traders who layer Artemis on top of their own edge strategies get a pure kernel-regression envelope that will not conflict with classical-TA signals already in use. Traders seeking a standalone kernel-based indicator get a complete, coherent system.
🟦 COMPATIBILITY
- Pine Script v6
- All exchanges, all asset classes (crypto, forex, equities, commodities, indices)
- All timeframes (1 minute through Monthly)
- Both Dark and Light chart themes — visual elements auto-adapt to chart background
- No exchange-specific logic — fully deterministic
Indicator renders on the main overlay chart with `force_overlay = true`. No secondary panes, no subplot logic.
🟦 TECHNICAL NOTES
- **Library dependency** — `import a_jabbaroff/KernelLens/1` — all kernel regression math is delegated to the published library
- **Plot budget** — 2 outer bands + 10 gradient interior plots + 1 Basis + 1 transparent anchor + 4 signal shapes + 12 fills + 4 alertconditions = 34 outputs, well under Pine's 64-output hard limit (50 % margin)
- **Table** — Single `var table` created once on `barstate.islast` with `force_overlay = true`; dashboard renders on the main chart pane, zero historical overhead
- **No persistent drawing objects** — no `box.new`, `line.new`, no `array.new`; all visuals are plots and fills
- **Opacity convention** — every user-facing opacity / transparency input follows `0 = invisible, 100 = fully opaque`; conversion to Pine's native transparency is centralized in a single helper function (`f_opac`)
- **Non-repainting** — inherits from the library's `_phase` parameter; no `request.security`, no lookahead, no future-bar leakage at any phase value
- **Residual consistency** — The residual σ is computed as `ta.stdev(source − basis, window)`, ensuring the band width always measures deviation relative to the kernel Basis
🟦 DISCLAIMER
Artemis Volatility Bands PRO is a technical analysis indicator built on the KernelLens Nadaraya–Watson regression library. It is provided solely for educational and research purposes and does not constitute financial, investment, or trading advice.
Kernel regression is a local smoothing technique. It estimates the mean of a source series in the neighborhood of the current bar based on historical data, but it does not predict future prices, does not generate trading signals on its own, and does not guarantee the profitability of any strategy built on top of its output. The signal engine is a mechanical detector of basis breaks and slope direction — not a forecast — and should always be combined with broader context: higher-timeframe structure, volatility regime, liquidity, news, and risk management.
Past performance of any model does not guarantee future results. Markets contain systemic risks that cannot be eliminated by any amount of mathematical rigor. Responsibility for any trading decisions rests entirely with the user. Always apply sound capital management, conduct your own independent analysis, and never risk capital you are not prepared to lose.
The author assumes no liability for direct or indirect losses incurred through the use of Artemis Volatility Bands PRO or the underlying KernelLens library. Indicator

Volatility Regime Cycle [AGPro Series]Volatility Regime Cycle
🌀 Overview
Volatility Regime Cycle classifies every bar on your chart into one of four distinct volatility phases: Contraction, Expansion, Climax, and Reset. Unlike traditional trend or regime indicators that focus on price direction, this tool maps the cyclical behavior of volatility itself — helping traders recognize whether the market is coiling, releasing, climaxing, or resetting. Each phase is detected through a multi-factor confluence engine and displayed with gradient background shading, transition markers, and S/R-style climax reaction zones. The framework is asset- and timeframe-agnostic: it adapts to crypto, forex, indices, stocks, and commodities on any timeframe.
💎 Unique Edge
Most volatility tools present a single metric (ATR, Bollinger Width, VIX proxy). Volatility Regime Cycle differs in structure and intent:
🔸 Phase-based classification, not just a reading — every bar is assigned to a named regime with a trader-actionable bias.
🔸 Multi-factor confluence scoring — five independent volatility inputs (ATR level, BB Width level, BB/KC squeeze, volume z-score, ATR rate-of-change) vote on the active phase. No single factor can dominate.
🔸 Winsorized normalization — outlier events (single extreme bars) do not compress the scale and hide current readings, a common flaw in simple percentile-based tools.
🔸 Climax Reaction Zones — each Climax event is preserved as an S/R-style rectangle with mid-pivot line, creating a memory of past volatility exhaustion levels that often act as future reaction areas.
🔸 Cycle-aware analytics — tracks historical phase durations and estimates current cycle progress based on rolling averages of past phases of the same type.
🔸 Phase-specific Trader Bias — panel translates the current regime into a plain-language bias (Breakout-watch, Momentum-favor, Reversal-risk, Cooldown).
This is not a Wyckoff phase tool, an Elliott counter, or a Dow-theory classifier. It is a pure volatility-cycle mapper, engineered from the ground up to stand apart from both classical cycle indicators and single-metric volatility meters.
🧠 Methodology
The engine runs three layers:
🔹 Factor Layer
• ATR Level — 14-period ATR, winsorized min-max normalized (5%-95% range) over a configurable lookback window.
• BB Width Level — Bollinger Band width as percent of basis, normalized identically.
• Squeeze State — true when Bollinger Bands are contained inside Keltner Channels (classic volatility compression).
• Volume Z-Score — standardized volume relative to its rolling mean and standard deviation.
• ATR Rate-of-Change — momentum of volatility itself.
🔹 Scoring Layer
Each of the four phases has its own scoring formula that weights the five factors differently. For each bar, all four phase scores are calculated in parallel, and the phase with the highest score is the candidate regime for that bar.
🔹 Confirmation Layer
To suppress whipsaw, the candidate phase must persist for a configurable number of bars (default 3) before replacing the active phase. A minimum phase duration lock additionally prevents rapid flips. Climax events include a de-duplication cooldown so that clustered climax bars produce a single marker rather than a cluster of overlapping labels.
Phase transitions are classified as major (Contraction→Expansion breakouts and Climax entries) or minor (all other routine changes). Only major transitions receive labels; minor changes are shown as subtle dotted lines to keep the chart clean.
🔔 Signals & Alerts
The script exposes alerts for every phase transition as well as two high-value composite events:
🔸 Any Phase Transition — fires whenever the active phase changes.
🔸 Entered Contraction / Expansion / Climax / Reset — fires for specific phase entries.
🔸 Contraction → Expansion (Breakout) — coil release event; of interest to breakout traders.
🔸 Climax Entry (Exhaustion Warning) — volatility peak event; of interest to mean-reversion and risk-management traders.
All alerts fire only on confirmed bar close to prevent intra-bar flip-flop.
⚙️ Key Inputs
🔹 Engine Settings — normalization lookback, ATR length, Bollinger/Keltner length and multipliers, volume z-score length, ATR rate-of-change length, confirmation bars, minimum phase duration.
🔹 Phase Thresholds — low volatility level, high volatility level, climax volatility gate, climax volume z-score threshold, climax de-dup cooldown.
🔹 Visuals — toggles for background shading, major transition labels, minor transition lines, volatility ribbon, current phase label.
🔹 S/R Zones — climax zones toggle, breakout zones toggle, maximum active zones, zone initial length, zone range lookback.
🔹 Panel — show/hide, location, Dark/Light theme, font size.
🔹 Label Sizing — font size for on-chart labels.
🔹 Alerts — per-event toggles.
📘 How to Use
🔸 Breakout traders: watch for Contraction phase on the panel with Trader Bias showing Breakout-watch. When the phase transitions to Expansion, a coil release is underway and a Breakout label is printed. Optional Breakout Zones can be enabled to preserve the breakout level as a retest reference.
🔸 Momentum / trend traders: ride the Expansion phase while Trader Bias reads Momentum-favor. Phase Duration and Cycle Progress on the panel give a sense of where the current momentum leg sits relative to historical averages.
🔸 Mean-reversion / exhaustion traders: a Climax label with Trader Bias Reversal-risk highlights volatility exhaustion. The Climax Reaction Zone drawn at each climax often behaves as a future reaction level and can be used as confluence with other reversal tools.
🔸 Risk managers: the Reset phase with Trader Bias Cooldown typically signals reduced market conviction and can be used to scale down position size until a new Contraction builds up.
🔸 Multi-timeframe reading: run the script on the higher timeframe for regime context and on the lower timeframe for entry timing.
Hover the panel header to see a statistics tooltip with average durations of each phase over the last completed cycles.
⚠️ Limitations & Transparency
🔹 The script does not predict future prices or issue buy/sell recommendations. It is a classification and context tool.
🔹 Phase detection is inherently lagging because it requires the confirmation window and minimum duration lock. This is a deliberate design choice to suppress whipsaw at the cost of some responsiveness.
🔹 Normalization uses a rolling lookback window; the first lookback bars after loading the script may show compressed or unstable readings while the window fills.
🔹 Cycle Progress is an estimate based on historical phase averages and may exceed 100% when the current phase runs longer than past cycles.
🔹 Climax and Reset scores rely partly on volume; on instruments with unreliable or missing volume feeds, volume-dependent factors will contribute less.
🔹 All visual elements are cosmetic and toggleable; they do not alter the underlying phase logic.
🛡️ Risk Disclosure
This indicator is a technical analysis tool. It is not a trading system, not a signal service, not financial advice, and not a guarantee of future results. Trading involves substantial risk of loss. Past market behavior does not predict future market behavior. Users are solely responsible for their own trading decisions, risk management, and position sizing. Always test any tool on your preferred instruments and timeframes with appropriate historical review before using it as part of a live decision-making process. Indicator

Trend Stability Ribbon [AGPro Series]Trend Stability Ribbon
🔹 OVERVIEW
Most trend tools tell you WHICH WAY price is going. Trend Stability Ribbon tells you HOW WELL it is getting there. By pairing an ATR-normalized slope engine with a Kaufman path-efficiency score, it projects every bar into one of four rules-based states — Stable Up, Noisy Up, Stable Down, Noisy Down — and paints them onto a clean, adaptive ribbon that stays out of the candles' way. The result is a context layer that separates decisive trending from directional-but-choppy travel, without adding a second indicator pane.
🧭 UNIQUE EDGE — WHY THIS IS NOT "JUST ANOTHER TREND INDICATOR"
Direction alone is cheap. Every moving-average cross, every supertrend, every slope color tells you "up" or "down" — and then leaves you holding the bag when the trend is technically up but structurally a mess.
Trend Stability Ribbon adds the missing second dimension: path quality. The same 34-bar window that defines direction also feeds a Kaufman efficiency calculation (net travel divided by total path travel). An ER near 1.00 means price walked a near-straight line; an ER near 0.00 means it zig-zagged its way to the same point. Mapping that score against a calibrated threshold band produces the four composite states — and a visual language that finally distinguishes "trend worth trusting" from "trend worth fading".
Additional design choices that set it apart:
• Dual-layer event engine — direction flips, stability upgrades, and stability downgrades are tracked as independent transitions, each with its own alert.
• Badge/alert separation — on-chart badges are throttled by a cooldown for visual hygiene, but alerts are always raw so automation pipelines never miss an event.
• Reset state — when the slope-confirmation filter rejects a direction, the ribbon goes neutral instead of flipping false. Chop gets ignored, not misreported.
🧪 METHODOLOGY
1. TREND DIRECTION ENGINE
• A slow EMA (default length 34) anchors the trend path and serves as the ribbon centerline.
• Slope is measured over a 3-bar lookback and normalized by a 14-period ATR, making it instrument-agnostic across crypto, FX, equities, and futures.
• With Slope Confirmation enabled (default), direction is only accepted when price position AND slope agree. Disagreement returns a Reset state.
2. PATH EFFICIENCY (STABILITY) ENGINE
• ER = |close − close | ÷ Σ|close − close | over the same trend window.
• Three classes: Stable (ER ≥ 0.45), Noisy (ER ≤ 0.25), Mixed (between). Thresholds scale with the Stability Sensitivity input.
• The Mixed zone is a deliberate dead-band — during uncertain phases the previous state persists rather than flickering.
3. COMPOSITE STATE MACHINE
• Direction × Stability yields five possible states: Stable Up, Noisy Up, Stable Down, Noisy Down, Reset.
• Bars-in-state is tracked live, giving a simple persistence read on each state.
4. RIBBON RENDERING
• Ribbon is anchored to the EMA centerline with height driven by ATR × a user-selected multiplier (Thin / ATR-Adaptive / Thick).
• Fill opacity and border weight shift by state — Stable states are saturated, Noisy states are faded, Reset is a soft amber.
🔔 SIGNALS & ALERTS
Three transition events are detected and exposed as separate, user-toggled alerts:
• Trend State Flipped — direction changed (Up ↔ Down). Raw, never throttled.
• Stability Improved — path upgraded from Noisy to Stable while direction held. Raw — delivered regardless of badge cooldown.
• Stability Degraded — path downgraded from Stable to Noisy while direction held. Raw — delivered regardless of badge cooldown.
Matching on-chart badges appear at the same moments, subject to the Stability Badge Cooldown for visual cleanliness. Direction-flip badges are never throttled.
⚙️ KEY INPUTS
Engine
• Trend Length (default 34) — lookback for both direction and path-efficiency windows.
• Stability Sensitivity (default 1.0) — scales the Stable / Noisy thresholds.
• Require Slope Confirmation (default on) — enforces price-and-slope agreement; rejects chop.
Ribbon & Badge
• Ribbon Height — Thin / ATR-Adaptive / Thick.
• Show State Badge — toggle on-chart transition labels.
• Label Font Size — tiny / small / normal / large (default normal).
• Minimal Mode — hides panel and badges for pairing with other overlays.
• Stability Badge Cooldown (default 5 bars) — visual throttle for stability transitions.
Info Panel
• Panel Position, Panel Font Size, Efficiency Ratio display, Active Thresholds display.
Alerts
• Independent toggles for each of the three transition events.
🧠 HOW TO USE
• CONTEXT FILTER — use Stable states as a "green light" for continuation setups on your primary system; treat Noisy states as a headwind.
• REGIME BREAKS — a Stability Degraded event mid-trend is often an early warning that the move is maturing, even before price has flipped.
• CLEAN ENTRIES — pair a direction flip (Trend Up / Trend Down) with an immediate Stable classification to filter out whipsaw-prone breakouts.
• CHOP AVOIDANCE — when the ribbon sits in a Reset or Mixed state, the script is telling you the underlying path is not tradeable as a trend. Stand aside or switch to range tactics.
• PAIRING — with Minimal Mode on, the ribbon layers cleanly under structure tools, VWAPs, or S/R zones without visual conflict.
⚠️ LIMITATIONS & TRANSPARENCY
• This is an indicator, NOT a strategy. It does not generate buy or sell orders, has no backtest, and makes no claim of performance.
• Efficiency Ratio is a lagging measure — it describes the path already travelled. The ribbon should be read as context, not as a leading signal.
• The Mixed zone is intentional persistence; expect the composite state to hold through brief chop rather than flipping on every bar.
• Lower timeframes (<5m on thin-liquidity markets) can push ER values into erratic ranges. Start with the defaults on 15m–4h and tune from there.
• All calculations are closed-bar. Intra-bar values may shift until the bar confirms.
🛡️ RISK DISCLOSURE
This script is published for educational and analytical purposes only. It is not financial advice, not a signal service, and not a solicitation to buy or sell any instrument. Past behavior of markets does not predict future results. Always do your own research, apply proper risk management, and consult a licensed professional before making trading decisions. The author assumes no responsibility for losses incurred through use of this indicator. Indicator

Velox Structure Ribbon [JOAT]Velox Structure Ribbon
Introduction
Velox Structure Ribbon (VSR) is an open-source multi-band trend structure ribbon that uses a volatility-normalized, dynamically-spaced band system to visualize how far price has extended from its trend baseline and in which direction. The ribbon is anchored by a dual SMEMA core — a fast and slow double-smoothed moving average — and radiates six equidistant bands above and below the baseline, with spacing determined by the smoothed average candle range. Each band that price has penetrated adds one point to a 0-3 bull or bear structure score. A 0-100 composite trend strength score combines band penetration with RSI momentum. Volume confirmation and RSI filters are available to sharpen signal quality.
The problem VSR solves is that standard envelopes and Bollinger Bands use fixed or volatility-scaled offsets that can cluster bands too tightly in low-volatility environments and spread them too far in high-volatility ones. VSR normalizes band spacing using the market's own smoothed candle range, meaning band width automatically contracts in quiet markets and expands in active ones. This keeps the structure score meaningful across all conditions: three bands penetrated in a quiet market represents the same degree of extension relative to current volatility as three bands penetrated in a volatile market.
Core Concepts
1. SMEMA Ribbon Core
The ribbon center uses two SMEMA lines — slow (full period, default 20) and fast (half period). The slow SMEMA defines trend direction: sloping upward means the trend is bullish, downward means bearish. The fill between fast and slow creates a visual ribbon that contracts during consolidation and expands during trends:
float smemaSlow = smema(close, smemaLen)
float smemaFast = smema(close, math.max(int(smemaLen / 2), 3))
bool trendUp = smemaSlow > smemaSlow
bool trendDn = smemaSlow < smemaSlow
2. Volatility-Normalized Band Spacing
The step unit for band placement is SMEMA applied to the high-low range over a long smoothing period (default 100 bars). This produces an adaptive measure of the average candle body size. Each of the six bands is placed at integer multiples of this step above and below the slow SMEMA:
float step = smema(high - low, stepSmooth)
float up1 = smemaSlow + step * 1
float up2 = smemaSlow + step * 2
float up3 = smemaSlow + step * 3
Because the step automatically adjusts to market volatility, the bands always represent meaningful structural extensions rather than arbitrary percentage offsets.
3. Bull and Bear Structure Scoring
Each bar, the indicator counts how many upper bands price has broken through (bullish penetration) and how many lower bands (bearish penetration). Each penetrated band adds one point to the respective score:
int bullStr = (above1 ? 1 : 0) + (above2 ? 1 : 0) + (above3 ? 1 : 0)
int bearStr = (below1 ? 1 : 0) + (below2 ? 1 : 0) + (below3 ? 1 : 0)
A score of 0 means price is between the baseline and first band — neutral zone. Score of 1 means first structural extension. Score of 3 means full breakout beyond all three bands in that direction.
4. Composite Trend Strength Score (0-100)
The strength score combines two inputs: the band penetration score converted to a 0-50 scale (each band = 16.7 points) and the RSI deviation from 50 on a 0-50 scale. The combination rewards moves that have both structural extension (price has pushed through multiple bands) and momentum confirmation (RSI is moving away from neutral):
float bandScore = math.min(float(math.max(bullStr, bearStr)) * 16.7, 50.0)
float rsiScore = math.min(math.abs(rsiVal - 50.0), 50.0)
int strScore = int(math.min(bandScore + rsiScore, 100.0))
5. Distance-Based Band Coloring
Each band receives a gradient color whose intensity scales with how far price is from that band relative to its historical range. Bands that price has recently broken through or is pressing against are rendered more vividly. Bands far from price are nearly transparent. This creates a visual heat-map effect showing where structural tension exists:
bandColor(float src, color col) =>
float dist = math.abs(close - src)
float pctNorm = ta.percentile_linear_interpolation(dist, 400, 100)
float colSize = pctNorm > 0 ? dist / pctNorm : 0.0
showBands ? color.from_gradient(colSize, 0, 0.5, color(na), col) : color(na)
Features
Six-Band Structure Grid: Three bands above and three below the slow SMEMA baseline, dynamically spaced by the smoothed candle range
Dual SMEMA Core Ribbon: Fast and slow baseline with gradient fill, colored by trend direction
Trend Direction Diamond: A small diamond marker on the baseline at every trend flip (when the slow SMEMA changes slope direction)
Bull / Bear Structure Score (0-3): Real-time count of penetrated upper or lower bands displayed in signal labels and the dashboard
Composite Strength Score (0-100): Combined band penetration and RSI momentum score with Strong/Moderate/Weak label
RSI Momentum Filter: Optional filter requiring RSI alignment before a signal is confirmed (configurable threshold, default 52)
Volume Filter: Optional filter requiring above-average volume (configurable multiplier, default 1.1x the 20-bar SMA). Auto-disables on volume-free instruments
Signal Labels: Small numeric labels at bull and bear signal bars showing the structure score (1, 2, or 3)
Strength Bar (Bottom Right): A visual bar table showing filled cells proportional to the current bull or bear structure score
Candle Coloring: Bar colors reflect trend direction at reduced opacity
9-Row Dashboard (Top Right): Trend direction, last signal and bars-since count, strength score with label, bull and bear band counts, RSI value, timeframe, and version
Watermark: JackOfAllTrades signature at chart center-bottom
Alerts: Bull signal, bear signal, and trend-flip alertconditions with optional JSON webhook format
Input Parameters
Ribbon Engine:
SMEMA Length: Core period for the slow baseline (default: 20). Fast = L/2
Step Smoothing: SMA period for the candle-range volatility step (default: 100)
Filters:
RSI Length: Momentum confirmation period (default: 14)
RSI Threshold: Minimum RSI for bull signal confirmation (default: 52). Bear mirror = 100 - threshold
Volume Filter: Enable/disable volume confirmation (default: off)
Volume Multiplier: Required volume multiple of the 20-bar SMA (default: 1.1)
Visuals / Dashboard:
Theme: Auto, Dark, or Light
Show Distance Bands: Toggle the six structural bands
Show Core Ribbon: Toggle the fast/slow SMEMA ribbon and fill
Show Signals: Toggle the numeric signal labels
Show Strength Bar: Toggle the bottom-right score visualization
Show Dashboard: Toggle the 9-row information panel
Color Palette: Bull, Bear, and Neutral colors are individually customizable
How to Use This Indicator
Step 1: Read Trend Direction from the Ribbon
When the ribbon is green and sloping upward, the baseline trend is bullish. When red and sloping downward, bearish. A flat ribbon in neutral color indicates a non-trending market.
Step 2: Use Structure Score for Entry Timing
A bull signal fires when price is above the first upper band (score 1+) and the trend slope is upward with RSI and volume confirmation. A score of 2 or 3 indicates deeper structural extension — potentially overextended for entry, better for trailing a position.
Step 3: Watch for Pullbacks to the Ribbon
After a bull signal, price often pulls back toward the ribbon (slow SMEMA) before continuing. Entries from the ribbon during an active bull structure are higher-probability than chasing at the outer bands.
Step 4: Scale Position with Strength Score
A strength score above 70 (labeled Strong) indicates both structural extension and momentum alignment — use for higher conviction. Below 40 (Weak) may indicate a fading move or early-stage structure not worth full position sizing.
Indicator Limitations
The warmup period (SMEMA length x3 or step smoothing + 50, whichever is larger) means the indicator is inactive for the first several dozen bars on any chart
The band spacing adapts to the smoothed candle range with a 100-bar lookback. On instruments with sharp volatility regime changes, the bands may lag behind the new volatility environment for many bars
The volume filter is automatically disabled when volume data is unavailable (e.g., indices, some forex pairs). In those cases, volume confirmation is effectively always true regardless of the toggle setting
Signal labels fire on every bull or bear structure bar — this can be frequent in strongly trending markets. The labels are informational, not entry triggers, and users should apply their own discretion for entry timing
Originality Statement
VSR is original in its use of the SMEMA-smoothed candle range as the band spacing unit. This indicator is published because:
The volatility-normalized step unit (SMEMA of high-low range) is a unique approach to band spacing that differs from standard ATR envelopes, Bollinger Bands (which use standard deviation), and Keltner Channels (which use raw ATR). The SMEMA smoothing produces a more stable, noise-resistant step unit than raw ATR
The 0-3 integer band-penetration scoring is a discrete structural measure that complements continuous oscillators. It quantifies how far price has extended structurally rather than how fast it has moved
The distance-based gradient coloring using percentile normalization creates an adaptive visual heat-map — the same visual logic is computationally novel within the band-coloring approach
The composite strength score combining band penetration with RSI deviation creates a measure that rewards both structural extension and momentum alignment simultaneously
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. Band structure scores are based on historical price position relative to smoothed averages and do not predict future price movement. A score of 3 (maximum bullish extension) can increase further or reverse immediately. Always use 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

JOAT Institutional Convergence [JOAT]JOAT Institutional Convergence
Introduction
The JOAT Institutional Convergence strategy is a systematic, rules-based trading framework that unifies the logic from all five JOAT indicators into a single coherent entry and exit engine. Each indicator contributes a specific filter layer: the Volumetric Structure Engine provides directional market structure bias, the Adaptive Spectral Bands Hann ribbon provides the primary entry trigger, the Institutional Session Profiler contributes optional session timing, the Imbalance Zone Classifier contributes optional FVG proximity filtering, and the Fractal Liquidity Map contributes fractal-anchored stop placement. No layer is redundant — each addresses a different dimension of trade selection.
The core problem this solves: most PulseWire strategies use a single indicator as both entry and exit signal, producing over-fitting to one methodology. This strategy uses five independent measurement systems simultaneously. An entry only fires when multiple independent conditions converge — structure, momentum, regime, and optionally session and imbalance context. The result is a strategy that takes trades for quantifiable, multi-factor reasons, not because a single line crossed.
Core Concepts
1. Entry Logic — Hann Ribbon Crossover Primary
The primary entry trigger is the Hann FIR ribbon crossover — when the fastest layer (h0) crosses above the second layer (h1), a potential long entry is flagged. This is the earliest mathematically-grounded signal that momentum is shifting:
bool cross_bull = ta.crossover(h0, h1)
bool cross_bear = ta.crossunder(h0, h1)
bool long_sig = (cross_bull or (bos_bull_sig and h0 > h2)) and
struct_trend >= 0 and
adx >= i_adx_min and adx <= i_adx_max and
sess_ok and fvg_ok
The crossover fires on the bar where momentum begins to shift — not after full ribbon alignment is confirmed. This is intentional: waiting for full alignment reduces trade count significantly and enters late. The structural trend filter (struct_trend >= 0) ensures the crossover is not taken against a confirmed downtrend.
2. Structure Filter — VSE Swing Classification
Market structure is classified using the same non-repainting swing detection as the Volumetric Structure Engine. Higher highs and higher lows (struct_trend = 1) are bullish; lower highs and lower lows (struct_trend = -1) are bearish; a mixed state (struct_trend = 0) is neutral. The strategy allows longs in bullish or neutral structure (>= 0) and shorts in bearish or neutral structure (<= 0):
bool new_sh = high == ta.highest(high, i_sw_len) and high < ta.highest(high, i_sw_len)
bool new_sl = low == ta.lowest (low, i_sw_len) and low > ta.lowest (low, i_sw_len)
This prevents the ribbon crossover from triggering entries during confirmed counter-trend structure without requiring perfect alignment.
3. Regime Filter — ADX Gating
ADX gates entries in both directions. Below the minimum ADX, the market has no directional momentum — ribbon crossovers in flat, dead markets produce noise. Above the maximum ADX, the market is over-extended and new entries chase moves that are already mature:
float adx_val = ta.rma(math.abs(dmi_p - dmi_m) / (dmi_p + dmi_m + 0.001) * 100, i_adx_len)
bool adx_ok = adx_val >= i_adx_min and adx_val <= i_adx_max
Default range: 8–60. This wide range accommodates crypto and forex markets that trend aggressively for extended periods (ADX 40–60) as well as early-stage trends (ADX 8–15).
4. Position Sizing — Percentage Risk per Trade
Position sizing is calculated dynamically based on the user's equity risk percentage and the distance to the stop-loss level:
float sl_dist = math.abs(close - sl_price)
float qty = sl_dist > 0 ? (strategy.equity * i_risk_pct / 100.0) / sl_dist : 1.0
strategy.entry("Long", strategy.long, qty = qty)
This ensures every trade risks the same percentage of equity regardless of market volatility — a wider stop reduces size, a tighter stop increases size. The default is 1% risk per trade.
5. Stop-Loss Placement — Fractal Extreme + ATR Buffer
The stop-loss is placed beyond the most recent 20-bar fractal extreme in the direction of the trade, plus one ATR buffer. This anchors the stop to genuine structural pivots rather than arbitrary fixed-pip distances:
float sl_long = ta.lowest(low, 20) - atr_14 * i_sl_atr_buf
float sl_short = ta.highest(high, 20) + atr_14 * i_sl_atr_buf
Features
Five-Layer Entry Filter: Structure + Ribbon + Regime + Session (optional) + FVG proximity (optional)
Hann FIR Ribbon Crossover: Primary entry trigger — earliest mathematically-valid momentum signal
BOS-Armed Entries: Break of Structure signals additionally arm entries for up to 30 bars
Percentage Risk Sizing: Dynamic position size calculated from equity risk % and SL distance
Fractal-Anchored Stop Loss: Stop at 20-bar fractal extreme + ATR buffer
Fixed R:R Take Profit: Configurable reward-to-risk ratio for TP placement
Trailing Stop: Built-in trail_offset activates immediately from entry, protecting profits
Session Filter (optional): Trade only during Asia, London, and/or New York sessions. Off by default for 24h markets.
FVG Proximity Filter (optional): Require entry to be near an active imbalance zone. Off by default for maximum trade count.
Performance Dashboard: Displays trade count, win rate, average R, last trade result, and active filter states
Realistic Simulation: 2-tick slippage + 0.05% commission built into all backtests
Input Parameters
Structure (VSE):
Swing Length: Lookback for swing high/low detection (default: 20)
Ribbon Filter (ASB):
Hann Base Length: Core FIR filter period (default: 20)
Ribbon Spacing: Gap between ribbon layers (default: 3)
Regime Filter:
ADX Length: Period for ADX calculation (default: 14)
Min ADX for Entry: Minimum ADX to allow entries (default: 8). Lower = more trades. Raise to filter ranging markets.
Max ADX for Entry: Maximum ADX to allow entries (default: 60). Lower = skip over-extended moves.
Session Filter (ISP):
Enable Session Filter: Gate entries by session time (default: off — recommended for crypto and indices)
Trade Asia / London / NY: Toggle per-session entry permission
Imbalance Filter (IZC):
Require Near FVG Zone: Entry must be within ATR proximity of an active imbalance (default: off)
FVG Proximity (x ATR): Distance threshold for FVG proximity check (default: 1.5)
Risk Management:
Risk Per Trade (%): Equity percentage risked per trade (default: 1.0)
Reward:Risk Ratio: Take profit as a multiple of the SL distance (default: 2.0)
SL ATR Buffer: ATR multiple added beyond fractal extreme for stop (default: 0.5)
Trail Offset (ATR): Trail stop distance from price (default: 1.5)
BOS Armed Bars: How many bars a BOS signal remains active for entry (default: 30)
How to Use This Strategy
Step 1: Select Your Market and Timeframe
Start on the 1-hour chart. The strategy is calibrated for 1H on crypto, forex majors, and equity indices with default settings. Shorter timeframes (15m) can increase trade count further but require tighter ADX filtering to avoid noise.
Step 2: Run the Backtest with Defaults
With all optional filters off (session and FVG disabled), the strategy trades every valid ribbon crossover that passes structure and regime. This produces the highest trade count. Review the equity curve for smoothness — you want consistent growth, not reliance on a few large winners.
Step 3: Add Filters Progressively
Enable the session filter to restrict to London and NY on forex pairs. Enable the FVG proximity filter to require imbalance context on entries. Each filter reduces trade count but should improve win rate if the underlying edge is present on your instrument.
Step 4: Interpret the Dashboard
The dashboard shows the current state of every filter layer — which ones are active and whether each condition is currently met. This is the diagnostic view: if no trades are firing, the dashboard tells you exactly which filter is blocking entries.
Originality Statement
This strategy is original as a unified multi-indicator convergence framework where each component is an independently published, standalone indicator. Its publication is justified because:
The five-layer filter architecture uses genuinely independent measurement dimensions — market structure (price action), momentum (FIR frequency domain), trend strength (ADX), session timing, and price inefficiency (FVG) — reducing the risk of correlated signals that appear to confirm each other but measure the same thing
Hann FIR crossover as the primary trigger provides a mathematically grounded entry timing signal with lower lag than EMA crossovers of equivalent period — a meaningful improvement to the timing of systematic entries
Dynamic position sizing calculated from SL distance anchored to fractal extremes creates risk-normalized sizing that adapts to each trade's structural context rather than using fixed lot sizes
The modular filter design allows each filter to be toggled independently, making the strategy adaptable to different asset classes (crypto, forex, equities) without code changes — session filter off for 24h markets, FVG filter off for maximum trade generation
Limitations
Backtesting results depend critically on the instrument, timeframe, and parameter settings. Past performance in strategy tester does not guarantee future live trading results.
The 2-tick slippage and 0.05% commission defaults are approximations. Actual execution costs vary by broker, instrument, and session liquidity. High-slippage instruments (illiquid crypto, micro-cap) will perform worse than the backtest indicates.
The FVG proximity filter references FVG logic computed internally. It does not import live data from the separately published Imbalance Zone Classifier indicator — it recomputes the same logic in isolation.
The strategy does not incorporate news filters or earnings event exclusions. Entering positions around major economic releases (FOMC, NFP) during high-volatility events will produce results inconsistent with normal market behavior.
Trailing stop and take profit interact. If price reaches the TP level before the trail stop triggers, the TP closes the trade. Users should verify via strategy properties which exit is dominant in their use case.
Disclaimer
This strategy is provided for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any instrument. All trading involves risk of loss. Backtested strategy results are hypothetical and do not account for the psychological challenges of live trading. Past results do not guarantee future performance. Always use proper risk management and never risk more than you can afford to lose.
-Made with passion by jackofalltrades
Strategy

Artemis Regression Bands🟦 Artemis Regression Bands is a kernel-driven volatility envelope indicator built on the KernelLens Nadaraya–Watson regression library (a_jabbaroff/KernelLens/1). A single kernel estimate — selectable from eight classical kernel families — anchors the Fair Value line. Around it, three residual-standard-deviation bands (±1σ, ±2σ, ±3σ) fan outward with either Linear or Exponential spacing, producing a statistically grounded envelope far cleaner than the classical close-stdev approach used by legacy Bollinger-style indicators. A four-gate Romb signal engine overlays buy / sell diamond markers when price pokes through the outermost enabled σ boundary and reverses back inside.
🟦 HOW IT WORKS
Artemis calls the KernelLens library's unified dispatcher once per bar to build the Fair Value line, then queries three additional library exports to derive the band widths, slope direction, and residual σ:
```
fair = kl.estimate (type, src, ℓ, α, period, phase, filter)
sigma = kl.confidenceBand(src, fair, window)
slopeVal = kl.slope (fair, 1)
trendSt = kl.trendState (fair, 1)
dev = baseMult · sigma
upper1 = fair + 1·dev lower1 = fair − 1·dev
upper2 = fair + 2·dev lower2 = fair − 2·dev
upper3 = fair + k3·dev lower3 = fair − k3·dev (k3 = 3 Linear | 4 Exp)
```
The library handles all weighted-sum computation, loop-depth selection, NA-safe iteration, division-by-zero guards, and input validation internally. Artemis contains zero kernel math — every bug fix or optimization in the library automatically propagates to this indicator.
🟦 KERNEL LIBRARY INTEGRATION
Artemis imports the published KernelLens library and uses the following exports:
| Library Export | Used For |
|---|---|
| `kl.estimate()` | Unified dispatcher — routes to the correct kernel based on the user's Kernel Type dropdown. Called once per bar to produce the Fair Value line. |
| `kl.confidenceBand()` | Rolling standard deviation of the (source − Fair Value) residual. Drives the band half-widths on every bar. |
| `kl.slope()` | Discrete first derivative of the Fair Value line. Feeds trend flip alerts. |
| `kl.trendState()` | Ternary classifier (+1 rising / −1 falling / 0 flat) of the Fair Value line. Drives the slope-adaptive color, the kernel trend confluence filter, and the dashboard Trend row. |
Every regression computation — kernel weight evaluation, NA-safe summation, bandwidth-aware loop termination, residual stdev, finite-difference slope — is delegated to the library. The indicator itself only orchestrates the four library calls and layers the visual pipeline on top.
🟦 EIGHT KERNEL FAMILIES
A single Kernel Type dropdown selects any of the eight kernels shipped with the KernelLens library. Each is a different mathematical smoother with its own statistical character:
| Kernel | Formula | Best For |
|---|---|---|
| Rational Quadratic | (1 + d² / (2·α·ℓ²))^(−α) | Multi-scale mixer; α controls stretch. Recommended default. |
| Gaussian / RBF | exp(−d² / (2·ℓ²)) | Canonical smoother; infinitely differentiable. |
| Periodic | exp(−2·sin²(π·d/p) / ℓ²) | Resonates with a known repetition distance p. |
| Locally Periodic | Periodic × Gaussian | Seasonal patterns with slow trend drift. |
| Epanechnikov | (3/4)·(1 − u²), \|u\| ≤ 1 | MSE-optimal; compact support, no tail contamination. |
| Tricube | (70/81)·(1 − \|u\|³)³, \|u\| ≤ 1 | LOWESS standard; near-Gaussian compact profile. |
| Triangular | (1 − \|u\|), \|u\| ≤ 1 | Simplest compact kernel; cheapest to compute. |
| Cosine | (π/4)·cos(π·u/2), \|u\| ≤ 1 | Raised-cosine; smooth boundary transition. |
Because the dropdown feeds the library's `kl.estimate()` dispatcher directly, every kernel inherits the same three-mode filter layer (No Filter / Smooth / Zero Lag) and the same non-repainting guarantees — there is no special case per kernel in Artemis.
🟦 FILTER LAYER
A second dropdown applies an optional post-processing layer on top of the raw Nadaraya–Watson estimate:
| Filter | Formula | Trade-off |
|---|---|---|
| No Filter | ŷ = ŷ_raw | Single-pass kernel. Rawest output, most reactive. |
| Smooth | ŷ = K(ŷ_raw) | Double-pass — kernel applied to its own output. Cleaner line, slightly more lag. |
| Zero Lag | ŷ = 2·ŷ_raw − K(ŷ_raw) | Ehlers de-lagging identity — sharpens edges without adding lag. |
The filter is resolved entirely inside `kl.estimate()`, so switching modes incurs no runtime cost beyond the extra kernel pass.
🟦 RESIDUAL-σ BAND ENGINE
Artemis bands are statistically grounded on the residual standard deviation — not on raw close stdev as in classical Bollinger indicators. The residual is computed as:
```
residual = src − fair
sigma = ta.stdev(residual, window) // via kl.confidenceBand()
```
Because Fair Value is already an unbiased local estimate of the source, the residual is a zero-mean noise series and its stdev captures **only the portion of price variance that the kernel could not explain**. This produces three benefits over the classical approach:
1. **Tighter bands in trending regimes** — close-stdev widens during strong trends because the trend itself inflates the variance; residual-σ does not, because the kernel absorbs the trend.
2. **Faster reaction to volatility regime changes** — residual-σ tightens as soon as the kernel fits well, and widens the instant the market breaks out of the kernel's neighborhood.
3. **True statistical interpretation** — under the assumption of locally Gaussian residuals, ±1σ / ±2σ / ±3σ enclose approximately 68 % / 95 % / 99.7 % of near-term price variation. The traditional close-stdev envelope carries no such interpretation.
A dedicated Residual σ Window input controls the lookback; typical values range from 50 (reactive, scalping) to 300 (stable, position trading).
🟦 BAND SPACING MODES
Two spacing presets shape the outward fan of the three σ bands:
| Mode | Multipliers | Character |
|---|---|---|
| Linear | 1·, 2·, 3· | Classical Bollinger-style uniform steps. Predictable, symmetric. |
| Exponential | 1·, 2·, 4· | Fibonacci-flavored — outer band (4σ) is reserved for genuine blow-off excursions. |
Base Multiplier scales all three bands uniformly (default 1.0). The formula is:
```
band_level = fair ± (baseMult · k · sigma) k ∈ {1, 2, k3}
```
where k3 resolves to 3 in Linear mode and 4 in Exponential mode. Every band has an independent visibility toggle, so minimalist users can run ±1σ only, swing traders ±3σ only, or any combination.
🟦 FOUR-GATE ROMB SIGNAL ENGINE
The Romb engine prints buy / sell diamond markers when price pokes through the outermost enabled σ band and reverses back inside. Four sequential gates protect against false entries:
| Gate | Logic | Purpose |
|---|---|---|
| 1 — Crossover | `ta.crossunder(high, triggerUp)` / `ta.crossover(low, triggerDn)` | Detects the reversal back through the outer band. |
| 2 — Warm-up | Residual σ computable for N consecutive bars | Blocks signals during the early kernel-settlement window. |
| 3 — Confluence | Fair Value slope aligns with the reversal direction | Optional PRO filter — Sell Romb requires falling kernel, Buy Romb requires rising kernel. |
| 4 — Cooldown | Minimum bar gap since the last same-side Romb | Prevents signal clustering on a single extended poke-and-reverse sequence. |
A Signal Mode toggle layers on top:
- **Confirmed** — signals fire only on `barstate.isconfirmed`; zero repaint on closed bars.
- **Realtime** — signals fire live on the current open bar; faster reaction, may vanish if price reverses before close.
Each confirmed signal is rendered as a two-layer neon diamond:
- **Halo** — `size.small`, 40 % transparent theme hue (glow layer).
- **Core** — `size.tiny`, fully opaque theme hue (bright center).
The halo renders first so the core sits cleanly on top, producing a sharp luminous marker that reads instantly even on dense price charts.
🟦 ADAPTIVE OUTER-BAND TRIGGER
The Romb engine does not hard-code the ±3σ band as the signal trigger. Instead, it resolves the outermost currently-enabled band on every bar:
```
triggerUp = show3 ? upper3 : show2 ? upper2 : show1 ? upper1 : na
triggerDn = show3 ? lower3 : show2 ? lower2 : show1 ? lower1 : na
```
The result is an envelope that respects the user's visibility choices:
| Visible Bands | Romb Fires At |
|---|---|
| ±1σ + ±2σ + ±3σ | ±3σ (default) |
| ±1σ + ±2σ | ±2σ |
| ±1σ only | ±1σ |
| All off | no signals |
Diamond positioning follows the same trigger, so the glyph always floats ~0.3σ outside whatever envelope is actually drawn on the chart. The behavior matches user intent: the band I can see is the band that fires signals.
🟦 NON-REPAINTING BEHAVIOR
Artemis inherits non-repainting behavior directly from the KernelLens library's `_phase` parameter. A single Phase input (default 2) shifts the kernel center into the past by that many bars:
- **Phase = 0** — live estimate, flickers on the current bar (real-time only; history is immutable).
- **Phase = 1** — 1-bar lag, non-repainting once the bar is confirmed.
- **Phase = 2** — recommended balance between freshness and stability (default).
- **Phase = 3+** — extra margin against erratic ticks, higher lag.
Historical repainting never occurs at any phase value. The library contains no `request.security` calls, no lookahead, and no array rotation that could leak future data. Every historical bar's plotted Fair Value, band, and Romb signal is final once confirmed.
🟦 VISUAL PIPELINE
**σ Band Outlines** — Three upper bands (±1σ / ±2σ / ±3σ) in progressively lighter `thBear` hues, three lower bands in progressively lighter `thBull` hues. Hidden bands collapse to na via their individual visibility toggles; the outline widths share a single Band Line Width input.
**Tapered Gradient Fills** — Six fills drawn between the Fair Value line and each σ band. Opacity scales progressively from ±1σ (densest, most opaque) to ±3σ (lightest, most transparent), creating a halo that mirrors the statistical density of price residuals under normality. Master Fill Opacity input (0 = invisible, 100 = fully opaque) scales all three fills uniformly.
**Fair Value Line** — Slope-adaptive color resolver swaps between `thBull` (rising kernel) and `thBear` (falling kernel). Flat bars retain the previous color so the line never flashes neutral on a perfectly horizontal tick. Width is user-controlled (1–5 px).
**Romb Diamonds** — Two-layer neon glow at the adaptive trigger band; halo + core rendering described above.
**Bar Coloring** — Optional theme-aware candle coloring driven by the Fair Value slope. Off by default; when enabled it paints every bar with the active theme's bull / bear hue based on the current trend state.
🟦 THEME SYSTEM
Twelve cohesive color palettes drive every visual component — Fair Value line, σ band outlines, gradient fills, Romb diamonds, bar coloring, and dashboard accents — all sharing the same four color axes (`thBull`, `thBear`, `thNeutral`, `thSignal`):
| Theme | Bull | Bear |
|---|---|---|
| Tropic | Cyan steel | Deep orange |
| Amber | Warm amber | Indigo blue |
| Pastel | Sky blue | Soft lavender |
| Cyber | Neon lime | Hot crimson |
| Helios | Bright gold | Scarlet |
| Electric | Electric aqua | Magenta |
| Candy | Neon green | Hot pink |
| Bloomberg | Terminal orange | Cyan |
| Solar | Solarized olive | Crimson |
| Royal | Imperial gold | Deep purple |
| Midnight | Deep navy | Dark crimson |
| Graphite | Near-black | Silver grey |
A separate Display Mode toggle (Dark / Light) controls the dashboard palette independently of the chart theme — so a Bloomberg chart theme with a Light dashboard is a valid configuration, as is Midnight chart + Dark dashboard.
🟦 DASHBOARD
A 2-column, 12-row theme-aware status panel that updates only on the last bar (zero historical overhead). Supports Dark and Light display modes, six docking positions, and four text sizes. Renders via `force_overlay = true` on the main price chart.
| Row | Label | Content |
|---|---|---|
| Header | ARTEMIS | DARK / LIGHT |
| Theme | Theme | Active palette name |
| Kernel | Kernel | Selected kernel type |
| Divider | REGRESSION | — |
| Bandwidth | Bandwidth ℓ | Bandwidth value / Phase offset φ |
| Filter | Filter | No Filter / Smooth / Zero Lag |
| Fair Value | Fair Value | Current Fair Value in chart mintick format |
| Divider | BANDS | — |
| Spacing | Spacing | Linear 1·/2·/3· or Exp 1·/2·/4· |
| Residual σ | Band σ | Rolling residual standard deviation |
| Trend | Trend | ▲ BULL / ▼ BEAR / ━ FLAT (bull/bear colored) |
| Last Romb | Last Romb | ▲ BUY (N ago) / ▼ SELL (N ago) — bull/bear colored |
**Zebra-stripe layout** — alternating `dashBg` / `dashBgAlt` row backgrounds improve scan-ability on narrow cells. Section dividers (REGRESSION, BANDS) use a third background tone (`dashSection`) with the theme's bull accent as the header color — preserving brand identity across both Display Modes.
🟦 ALERT CONDITIONS
Six opt-in alert conditions, each gated by its own toggle:
| Alert | Fires When |
|---|---|
| Bullish Trend Flip | Fair Value slope crosses from ≤ 0 into positive territory |
| Bearish Trend Flip | Fair Value slope crosses from ≥ 0 into negative territory |
| Buy Romb | Confirmed Buy Romb fires — all four signal gates passing |
| Sell Romb | Confirmed Sell Romb fires — all four signal gates passing |
| Upper Band Touch | Price touches or exceeds the outermost enabled upper band |
| Lower Band Touch | Price touches or falls below the outermost enabled lower band |
All alerts use `alertcondition()` for maximum compatibility with PulseWire's alert system including webhooks. Messages are structured as `"Artemis Regression Bands: "` for easy parsing in downstream automation. Touch alerts are off by default (can be noisy in trending markets); the four core alerts are on by default.
🟦 RECOMMENDED PRESETS
| Style | Bandwidth ℓ | Filter | Phase | Spacing | σ Window | Chart |
|---|---|---|---|---|---|---|
| Scalper | 10–20 | No Filter | 1 | Linear | 50–80 | 1m–5m |
| Day Trader | 20–40 | Smooth | 2 | Linear | 80–120 | 15m–1h |
| Swing | 30–60 | Smooth | 2 | Linear or Exp | 100–200 | 4h–1D |
| Position | 60–120 | Smooth or Zero Lag | 3 | Exp | 200–300 | 1D–1W |
**Kernel type tuning**
- **Trending instruments** — Rational Quadratic (α = 1–3) or Gaussian. Smooth multi-scale response.
- **Mean-reverting instruments** — Epanechnikov or Tricube. Compact support keeps the band envelope tight.
- **Session-cyclic patterns** — Periodic (with p = session length in bars) or Locally Periodic. Resonates with known cycles.
**Romb filter tuning** — Keep Kernel Trend Confluence ON for high-conviction setups only. Switch OFF on range-bound instruments to capture both sides of the oscillation.
🟦 COMPATIBILITY
- Pine Script v6
- All exchanges, all asset classes (crypto, forex, equities, commodities, indices)
- All timeframes (1 minute through Monthly)
- Both Dark and Light chart themes — the Display Mode toggle controls dashboard palette independently
- No exchange-specific logic — fully deterministic
🟦 TECHNICAL NOTES
- **Library dependency** — `import a_jabbaroff/KernelLens/1` — all kernel regression, residual σ, slope, and trend-state math is delegated to the published library.
- **Plot budget** — 6 band plots + 1 Fair Value anchor + 1 Fair Value visible + 6 gradient fills + 4 Romb plotshapes + 1 barcolor = well under Pine's plot limits.
- **Table** — Single `var table` rebuilt on `barstate.islast` with `force_overlay = true`; zero historical overhead.
- **Signal state** — Two `var int` cooldown anchors (`lastSellBar`, `lastBuyBar`) seeded at −10000 so the very first bar always passes the gap test. A `var int stabCount` warm-up counter blocks signals during early kernel settlement.
- **No persistent drawing objects** — no `box.new`, `line.new`, no array rotations; every visual is either a plot or a single-bar plotshape.
- **Adaptive trigger resolver** — Romb crossover detection, touch alerts, and diamond positioning all read from the same `triggerUp` / `triggerDn` resolver, so band visibility toggles stay semantically coherent across every layer of the indicator.
- **Non-repainting** — inherits from the library's `_phase` parameter; no `request.security`, no lookahead, no future-bar leakage at any phase value.
🟦 DISCLAIMER
Artemis Regression Bands is a technical analysis indicator built on the KernelLens Nadaraya–Watson regression library. It is provided solely for educational and research purposes and does not constitute financial, investment, or trading advice.
Kernel regression is a local smoothing technique. It estimates the mean of a source series in the neighborhood of the current bar based on historical data, but it does not predict future prices, does not generate trading signals on its own, and does not guarantee the profitability of any strategy built on top of its output. The residual-σ envelope describes past dispersion around the kernel estimate — not a forecast of future range — and should always be combined with broader context: higher-timeframe structure, volatility regime, liquidity, news, and risk management.
Past performance of any model does not guarantee future results. Markets contain systemic risks that cannot be eliminated by any amount of mathematical rigor. Responsibility for any trading decisions rests entirely with the user. Always apply sound capital management, conduct your own independent analysis, and never risk capital you are not prepared to lose.
The author assumes no liability for direct or indirect losses incurred through the use of Artemis Regression Bands or the underlying KernelLens library. Indicator

Quant Edge Ribbon PRO🟦 Quant Edge Ribbon PRO is a multi-kernel divergence ribbon indicator built on the KernelLens Nadaraya–Watson regression library (a_jabbaroff/KernelLens/1). A primary kernel and eleven longer-bandwidth kernels form a dual-ribbon visualization driven by kernel regression mathematics, an integer trend score in , a theme-aware rendering pipeline, four user-configurable reference levels, and a PRO dashboard. All twelve kernels route through the unified library dispatcher, so the user may select any of the eight kernel families and any of the three filter modes from a single configuration panel.
🟦 HOW IT WORKS
Quant Edge Ribbon PRO calls the KernelLens library's unified dispatcher (`kl.estimate`) twelve times per bar — once for the primary kernel and once for each of the eleven outer kernels:
```
primary = kl.estimate(type, src, ℓ, α, period, phase, filter)
long00 = kl.estimate(type, src, ℓ + 1·s, α, period, phase, filter)
long01 = kl.estimate(type, src, ℓ + 2·s, α, period, phase, filter)
...
long10 = kl.estimate(type, src, ℓ + 11·s, α, period, phase, filter)
```
where ℓ is the Primary Bandwidth and s is the Bandwidth Step. All twelve kernels share the same kernel type, filter, shape α, period, and phase — only the bandwidth differs. This guarantees the ribbon behaves as a coherent spectrum of kernel scales rather than a mixture of unrelated signals.
The library handles all weighted-sum computation, loop-depth selection, NA-safe iteration, division-by-zero guards, and input validation internally. Quant Edge Ribbon PRO does not reimplement any kernel math — every bug fix or optimization in the library automatically propagates to this indicator.
🟦 KERNEL LIBRARY INTEGRATION
Quant Edge Ribbon PRO imports the published KernelLens library and uses the following export:
| Library Export | Used For |
|---|---|
| `kl.estimate()` | Unified dispatcher — routes to the correct kernel based on the user's Kernel Type dropdown. Called twelve times per bar, once for the primary kernel and once for each of the eleven outer kernels. |
Every regression computation — kernel weight evaluation, NA-safe summation, bandwidth-aware loop termination — is delegated to the library. The indicator itself contains zero kernel math; it only orchestrates twelve library calls and aggregates their outputs into the trend score.
🟦 THE TWELVE-KERNEL RIBBON ARCHITECTURE
**Primary kernel (the shortest, the anchor)** — A single kernel at bandwidth ℓ that serves two roles: (1) it is the reference baseline for the trend score calculation, and (2) it is plotted as a dedicated highlighted anchor line when the "Highlight Primary Kernel" toggle is ON.
**Eleven outer kernels (progressively wider)** — Kernels at bandwidths ℓ+1·s, ℓ+2·s, …, ℓ+11·s, where s is the Bandwidth Step (default: 1). Each outer kernel is plotted as a line on the main chart, all eleven sharing a single score-driven gradient color — so the entire outer ribbon shifts between the theme's bull and bear hues as the trend score moves between −11 and +11.
**Eleven inner ribbon plots (lagged primary snapshots)** — The primary kernel plotted at eleven time-lag offsets (0, 1, 2, …, 10 bars). The resulting visual is a gently flowing shadow that makes expansion and contraction of the outer ribbon easier to perceive. Opacity is user-controlled (default: 40 %).
🟦 INTEGER TREND SCORE
The trend score is a signed integer in , computed on every bar by eleven pairwise comparisons between the primary kernel (at progressive lag offsets) and the eleven outer kernels:
```
score = 0
for i in 0..10:
if primary < long_i:
score += 1
else:
score -= 1
```
**Semantic interpretation** — Each comparison pairs an older snapshot of the shortest kernel against a current snapshot of a progressively wider kernel. In an uptrend, past primary values are lower while current wider-kernel values have caught up above them — the inequality resolves positive on most pairs and the score climbs toward +11. The symmetric argument drives the score toward −11 in a downtrend.
**Score parity** — Because the score is a sum of eleven ±1 terms (score = 2k − 11, k ∈ ), it is always odd. Reachable values: { −11, −9, −7, −5, −3, −1, 1, 3, 5, 7, 9, 11 }. The score is never exactly zero.
🟦 STRENGTH CATEGORIZATION
The absolute score is bucketed into four bands, each with a matched label glyph used throughout the dashboard and the last-bar signal label:
| Score Range | Strength | Label |
|---|---|---|
| \|score\| = 1 | NEUTRAL | ▰▱▱▱ NEUTRAL |
| \|score\| ∈ {3, 5} | WEAK | ▰▰▱▱ WEAK BULL / WEAK BEAR |
| \|score\| = 7 | STRONG | ▰▰▰▱ STRONG BULL / STRONG BEAR |
| \|score\| ∈ {9, 11} | TRIPLE | ▰▰▰▰ TRIPLE BULL / TRIPLE BEAR |
The bull / bear suffix is driven by the sign of the score. The progress-bar glyphs (▰▱) give an instant at-a-glance read of confluence intensity without needing to parse the numeric value.
🟦 NON-REPAINTING BEHAVIOR
Quant Edge Ribbon PRO inherits non-repainting behavior directly from the KernelLens library's `_phase` parameter. A single Phase input (default: 2) shifts every one of the twelve kernel centers into the past by that many bars.
- Phase = 0 — live estimate, flickers on the current bar (real-time only; history is immutable)
- Phase = 1 — 1-bar lag, non-repainting once the bar is confirmed
- Phase = 2 — recommended balance between freshness and stability (default)
- Phase = 3+ — extra margin against erratic ticks, higher lag
Historical repainting never occurs at any phase value. The library contains no `request.security` calls, no lookahead, and no array rotation that could leak future data. Every historical bar's plotted value is final once confirmed.
🟦 VISUAL PIPELINE
**Outer Ribbon Gradient** — All eleven outer kernels are plotted with a single shared color driven by the trend score via `color.from_gradient(score, -11, 11, thBear, thBull)`. As the score walks across its range, the entire ribbon shifts continuously between the active theme's bearish and bullish hues — producing a smooth visual feedback loop between the math and the palette.
**Inner Ribbon Shadow Trail** — Eleven lag-shifted primary snapshots (primary through primary ) drawn in the theme's accent hue with user-controlled opacity. On a trending chart the trail visually expands; on a reversing chart it contracts. Adjust opacity from 0 (invisible) to 100 (fully opaque) — default 40 balances presence and subtlety.
**Primary Kernel Anchor Line** — The primary kernel plotted as a dedicated bold line in the theme's accent color at 80 % opacity, distinct from the shadow trail. Provides a clear centerline amid the ribbon flow. Toggleable.
**Oscillator Subplot** — The smoothed trend score plotted in a dedicated subplot with a score-gradient vertical fill between the score line and the zero line. Opacity is user-controlled. An optional bold score line (up to 4 px wide) overlays the fill for sharp numeric reading.
**Last-Bar Trend Label** — A right-anchored label at the current bar in the oscillator pane. Format: `▲ TRIPLE BULL 11 / 11` (bull) or `▼ WEAK BEAR −3 / 11` (bear). The label is deleted and redrawn on every bar, so only one instance is ever present on the chart.
🟦 OSCILLATOR STYLES
The oscillator subplot ships with two visual presets, selectable from the Oscillator Style dropdown:
| Style | Plot Style | Fill | Best For |
|---|---|---|---|
| Classic Gradient | `plot.style_line` (smooth curve) | Continuous vertical gradient from score to zero | Trend flow, slope momentum |
| Stepline | `plot.style_stepline` (staircase) | Stepped gradient mirroring the discrete score plateaus | Signal / threshold trading, discrete level crossings |
**Classic Gradient** produces a smooth curve traced through the smoothed score values, with the gradient fill flowing continuously between the score line and the zero line. This is the default and suits traders who read trend direction through slope and curvature.
**Stepline** renders each bar as a horizontal plateau joined to the next bar by a vertical edge. Because the raw score is always an odd integer in { −11, −9, …, 9, 11 }, the staircase visualization honors the score's true discrete nature — making it easier to identify exact threshold crossings (e.g. the moment the score enters the ±9 extreme zone). The fill inherits the same stepline style, so the entire oscillator pane stays geometrically consistent.
Both styles share the same opacity controls, score line toggle, and line width setting — only the geometry of the score line and its fill changes between them.
🟦 THEME SYSTEM
Ten cohesive color palettes tuned to the Quant Edge Ribbon PRO optical brand. One selection drives every visual component — outer ribbon gradient, inner ribbon accent, oscillator fill, reference lines, signal label, dashboard accents — all sharing the same bull / bear / accent color axes:
| Theme | Bull | Bear |
|---|---|---|
| Prism | Forest green | Crimson red |
| Focus | Cyan steel | Deep orange |
| Solar | Warm amber | Indigo red |
| Frost | Sky blue | Soft lavender |
| Laser | Neon lime | Hot crimson |
| Aurora | Bright gold | Scarlet |
| Plasma | Electric aqua | Magenta |
| Bloom | Mint green | Hot pink |
| Eclipse | Deep navy | Dark crimson |
| Carbon | Near-black | Silver grey |
The oscillator's zero line uses Pine's `chart.fg_color` so it auto-adapts to the actual chart background (white on dark charts, black on light charts) — independent of the Dashboard's Display Mode setting.
🟦 REFERENCE LEVELS
Four user-configurable horizontal reference lines mark the score's structural thresholds inside the oscillator subplot:
| Level | Style | Meaning |
|---|---|---|
| +11 / −11 | Dotted | Ceiling / floor — the mathematical maximum (every comparison aligned) |
| +9 / −9 | Dashed | Extreme zone — nine or more of the eleven comparisons agree on direction |
Each pair (±11 and ±9) has an independent opacity input (0–100 %). A master toggle (Show Reference Levels) collapses all four lines to fully transparent in a single branch — useful for minimalist layouts. An additional `showOsc` gate hides them automatically when the oscillator itself is disabled.
🟦 PRO DASHBOARD
A 2-column, 12-row theme-aware status panel that updates only on the last bar (zero historical overhead). Supports Dark and Light display modes, six docking positions, and four text sizes. Renders via `force_overlay = true` on the main price chart.
| Row | Label | Content |
|---|---|---|
| Header | Q-EDGE PRO | DARK / LIGHT |
| Theme | Theme | Active palette name |
| Kernel | Kernel | Selected kernel type |
| Divider | RIBBON | — |
| Primary ℓ | Primary ℓ | Primary bandwidth value |
| Span | Span | ℓ → ℓ + 11·s |
| Filter | Filter | No Filter / Smooth / Zero Lag |
| Divider | SCORE | — |
| Score | Score | ▲/▼ + integer score + " / 11" (bull/bear colored) |
| Bull / Bear | Bull / Bear | Bull comparison count / bear comparison count |
| Strength | Strength | ▰-bar + NEUTRAL / WEAK / STRONG / TRIPLE label |
| Primary | Primary | Primary kernel value in chart mintick format |
**Bull / Bear breakdown** — The eleven pairwise comparisons split into bulls (resolved +1) and bears (resolved −1). Always sums to 11, so this row gives a direct visual of how many kernel scales agree with the net direction.
🟦 ALERT CONDITIONS
Six opt-in alert conditions, each gated by its own toggle:
| Alert | Fires When |
|---|---|
| Bullish Flip | Score crosses from ≤ 0 into positive territory |
| Bearish Flip | Score crosses from ≥ 0 into negative territory |
| Extreme Bullish | Score reaches +9 or higher (first entry into the zone) |
| Extreme Bearish | Score reaches −9 or lower (first entry into the zone) |
| Full Confluence Up | Score hits +11 — every outer kernel aligned bullishly |
| Full Confluence Down | Score hits −11 — every outer kernel aligned bearishly |
All alerts use `alertcondition()` for maximum compatibility with PulseWire's alert system including webhooks. Messages are structured as `"Quant Edge Ribbon PRO: "` for easy parsing in downstream automation.
🟦 RECOMMENDED PRESETS
| Style | Primary ℓ | Bandwidth Step s | Phase | Filter | Chart |
|---|---|---|---|---|---|
| Scalper | 8–16 | 1 | 1 | No Filter | 1m–5m |
| Day Trader | 16–32 | 1–2 | 2 | Smooth | 15m–1h |
| Swing | 25–50 | 1–2 | 2 | Smooth | 4h–1D |
| Position | 50–120 | 2–3 | 3 | Smooth | 1D–1W |
**Bandwidth Step tuning** — Step = 1 produces a tight ribbon where adjacent outer kernels sit visually close together. Steps of 2–4 spread the eleven outer kernels across a broader spectrum of scales, making expansion / contraction easier to read at a glance. Step 5–6 is reserved for very wide ribbons where each line represents a distinctly different time scale.
🟦 COMPATIBILITY
- Pine Script v6
- All exchanges, all asset classes (crypto, forex, equities, commodities, indices)
- All timeframes (1 minute through Monthly)
- Both Dark and Light chart themes — visual elements auto-adapt via `chart.fg_color`
- No exchange-specific logic — fully deterministic
🟦 TECHNICAL NOTES
- **Library dependency** — `import a_jabbaroff/KernelLens/1` — all kernel regression math is delegated to the published library
- **Plot budget** — 11 outer + 11 inner + 1 primary + 2 oscillator plots + 1 fill + 4 hlines = well under Pine's 64-plot limit
- **Table** — Single `var table` created once on `barstate.islast` with `force_overlay = true`; dashboard renders on the main chart pane, zero historical overhead
- **No persistent drawing objects** — no `box.new`, `line.new`, no `array.new`; the single trend label is deleted and recreated every bar so only one instance is ever present
- **Opacity convention** — every user-facing opacity input follows `0 = invisible, 100 = fully opaque`; conversion to Pine's native transparency is centralized in a single helper function (`f_opac`)
- **Non-repainting** — inherits from the library's `_phase` parameter; no `request.security`, no lookahead, no future-bar leakage at any phase value
- **Chart background adaptive** — the oscillator's zero line uses `chart.fg_color`, so it always renders with high contrast regardless of the user's chart color scheme
🟦 DISCLAIMER
Quant Edge Ribbon PRO is a technical analysis indicator built on the KernelLens Nadaraya–Watson regression library. It is provided solely for educational and research purposes and does not constitute financial, investment, or trading advice.
Kernel regression is a local smoothing technique. It estimates the mean of a source series in the neighborhood of the current bar based on historical data, but it does not predict future prices, does not generate trading signals on its own, and does not guarantee the profitability of any strategy built on top of its output. The integer trend score is a geometric summary of kernel alignments — not a forecast — and should always be combined with broader context: higher-timeframe structure, volatility regime, liquidity, news, and risk management.
Past performance of any model does not guarantee future results. Markets contain systemic risks that cannot be eliminated by any amount of mathematical rigor. Responsibility for any trading decisions rests entirely with the user. Always apply sound capital management, conduct your own independent analysis, and never risk capital you are not prepared to lose.
The author assumes no liability for direct or indirect losses incurred through the use of Quant Edge Ribbon PRO or the underlying KernelLens library. Indicator

Meridian Lens PRO🟦 Meridian Lens PRO is a multi-kernel trend indicator built on the KernelLens Nadaraya–Watson regression library (a_jabbaroff/KernelLens/1). Three independently configurable kernel lines — Fast, Medium, and Slow — cover the full reactivity spectrum from scalping to position trading, each accepting any of the eight kernel families and three filter modes exposed by the library. The visual layer applies volume-intensity-adaptive coloring, gradient-filled trailing bands, 3-layer neon glow signal arrows, and a theme-aware dashboard — all driven by a single theme selection from ten optical-brand palettes.
🟦 HOW IT WORKS
Meridian Lens PRO calls the KernelLens library's unified dispatcher (`kl.estimate`) three times per bar — once for each kernel line:
```
Fast = kl.estimate(type, src, bw=8, α, period, phase, filter)
Medium = kl.estimate(type, src, bw=16, α, period, phase, filter)
Slow = kl.estimate(type, src, bw=32, α, period, phase, filter)
```
Each line independently selects its kernel family (Rational Quadratic, Gaussian, Periodic, Locally Periodic, Epanechnikov, Tricube, Triangular, Cosine), its filter mode (No Filter / Smooth / Zero Lag), its bandwidth, shape α, period, phase, and line width. The library handles all weighted-sum computation, loop-depth selection, NA-safe iteration, and input validation internally.
The Medium line is the primary trend reference — it drives the trailing bands, the main signal arrows, the dashboard trend cell, and the direction variable that colors every visual component. The Fast line provides early-warning reactivity for short-term entry timing. The Slow line anchors the macro trend for crossover logic and confluence scoring.
🟦 KERNEL LIBRARY INTEGRATION
Meridian Lens imports the published KernelLens library and uses the following exports:
| Library Export | Used For |
|---|---|
| `kl.estimate()` | Unified dispatcher — routes to the correct kernel based on user's dropdown selection |
| `kl.trendState()` | Returns +1 / −1 / 0 for each kernel's slope — drives dashboard arrows and signal triggers |
| `kl.crossSignal()` | Detects Fast × Slow crossovers — drives the Cross row in the dashboard and crossover alerts |
The indicator does not reimplement any kernel math — all regression computation is delegated to the library, ensuring that every bug fix or optimization in the library automatically propagates to this indicator.
🟦 THREE KERNEL LINES
**Fast Kernel** — The most reactive line. Default bandwidth 8, No Filter. Designed for scalping and short-term entry timing. Flips direction frequently on noisy charts — its signal markers are OFF by default to avoid visual clutter.
**Medium Kernel** — The primary trend reference. Default bandwidth 16, Smooth filter. Drives the trailing bands, the main 3-layer glow signal arrows, the dashboard Trend cell, and the direction variable that colors every visual component. This is the indicator's core signal.
**Slow Kernel** — The macro trend anchor. Default bandwidth 32, Smooth filter. Provides structural support for crossover logic (Fast × Slow) and triple-line confluence scoring. Its signal markers are ON by default because Slow flips are rare and meaningful.
Each kernel group exposes: Show toggle, Kernel Type dropdown (8 families), Bandwidth, Shape α (RQ only), Period (Periodic / Locally Periodic only), Phase (non-repainting offset), Filter (None / Smooth / Zero Lag), and Line Width.
🟦 NON-REPAINTING BEHAVIOR
Meridian Lens inherits non-repainting behavior directly from the KernelLens library's `_phase` parameter. Each kernel line has its own Phase input (default: 2), which shifts the kernel center into the past by that many bars.
- Phase = 0 — live estimate, flickers on the current bar (real-time only; history is immutable)
- Phase = 1 — 1-bar lag, non-repainting once the bar is confirmed
- Phase = 2 — recommended balance between freshness and stability (default)
- Phase = 3+ — extra stability for swing and position trading
Historical repainting never occurs at any phase value. The library contains no `request.security` calls, no lookahead, and no array rotation that could leak future data. Every historical bar's plotted value is final once confirmed.
🟦 SIGNAL SYSTEM
The indicator produces three tiers of trend-flip signals, each visually distinct:
**Medium Signals (Primary)** — 3-layer neon glow arrows rendered when the Medium kernel's direction flips. The outer halo is large and 80% transparent, the middle layer is normal-sized and 50% transparent, and the core arrow is small and fully opaque — creating a luminous halo effect on dark charts. Controlled by the "Glow Effect" toggle.
**Slow Signals** — Minimal tiny arrows (40% transparent) that fire when the Slow kernel flips direction. ON by default — these mark rare, meaningful macro trend changes.
**Fast Signals** — Minimal tiny arrows (40% transparent) that fire when the Fast kernel flips direction. OFF by default — enable for early-warning entry timing on lower timeframes.
🟦 VISUAL PIPELINE
**Volume-Intensity Adaptive Color** — The Medium line's transparency responds to the current volume reading. High volume = bright line (volume-confirmed trend), low volume = dim line (low-conviction drift). Uses a 33-bar HMA-smoothed normalized volume metric. Disable for a fixed 50% transparency.
**Trailing Bands** — Gradient-filled bands on the bullish/bearish side of the Medium line. Band width is driven by the rolling 100-bar average candle body size multiplied by a configurable distance factor (default: 2.0×). Bull bands fill below the Medium line during uptrends, bear bands fill above during downtrends.
**Theme System** — Ten cohesive palettes drive every visual component:
| Theme | Bull | Bear |
|---|---|---|
| Prism | Forest green | Crimson red |
| Focus | Cyan steel | Deep orange |
| Solar | Warm amber | Indigo red |
| Frost | Sky blue | Soft lavender |
| Laser | Neon lime | Hot crimson |
| Aurora | Bright gold | Scarlet |
| Plasma | Electric aqua | Magenta |
| Bloom | Mint green | Hot pink |
| Eclipse | Deep navy | Dark crimson |
| Carbon | Near-black | Silver grey |
🟦 PRO DASHBOARD
A 2-column, 11-row theme-aware status panel that updates only on the last bar (zero historical overhead). Supports Dark and Light display modes with configurable position and text size.
| Row | Label | Content |
|---|---|---|
| Header | MERIDIAN LENS | DARK / LIGHT |
| Theme | Theme | Active palette name |
| Kernel | Kernel | Medium kernel type |
| Divider | KERNELS | — |
| Fast | Fast | ▲/▼ + price value (bull/bear colored) |
| Medium | Medium | ▲/▼ + price value (bull/bear colored) |
| Slow | Slow | ▲/▼ + price value (bull/bear colored) |
| Divider | SIGNALS | — |
| Trend | Trend | ▲ BULL / ▼ BEAR |
| Cross | Cross | ↑ UP / ↓ DOWN / — |
| Strength | Strength | ▰▰▰ TRIPLE / ▰▰▱ STRONG / ▰▱▱ WEAK / ▱▱▱ NEUTRAL |
**Confluence Strength** — Counts how many of the three kernels (Fast, Medium, Slow) have their trend aligned with the Medium's direction. Score 3 = TRIPLE BULL/BEAR, 2 = STRONG, 1 = WEAK, 0 = NEUTRAL.
🟦 ALERT CONDITIONS
Six opt-in alert conditions, each gated by its own toggle:
| Alert | Fires When |
|---|---|
| Bull Crossover | Fast line crosses above Slow line |
| Bear Crossover | Fast line crosses below Slow line |
| Trend Up | Medium kernel trend flips to rising |
| Trend Down | Medium kernel trend flips to falling |
| Triple Bullish | Fast > Medium > Slow AND Medium rising |
| Triple Bearish | Fast < Medium < Slow AND Medium falling |
All alerts use `alertcondition()` for maximum compatibility with PulseWire's alert system including webhooks.
🟦 RECOMMENDED PRESETS
| Style | Fast bw | Med bw | Slow bw | Phase | Med Filter | Chart |
|---|---|---|---|---|---|---|
| Scalper | 4–8 | 8–16 | 16–32 | 1 | No Filter | 1m–5m |
| Day Trader | 8–12 | 14–24 | 24–48 | 2 | Smooth | 15m–1h |
| Swing | 16–24 | 24–40 | 48–80 | 2 | Smooth | 4h–1D |
| Position | 24–48 | 40–80 | 80–200 | 3 | Smooth | 1D–1W |
🟦 COMPATIBILITY
- Pine Script v6
- All exchanges, all asset classes (crypto, forex, equities, commodities)
- All timeframes (1 minute through Monthly)
- No exchange-specific logic — fully deterministic
🟦 TECHNICAL NOTES
- **Library dependency** — `import a_jabbaroff/KernelLens/1` — all kernel regression math is delegated to the library
- **Plot budget** — 5 plots + 2 fills + 10 plotshapes = well under Pine's 64-plot limit
- **Table** — Single `var table` created once on `barstate.islast`, zero historical overhead
- **No persistent drawing objects** — no `box.new`, `label.new`, `line.new` — no garbage collection needed
- **Non-repainting** — inherits from the library's `_phase` parameter; no `request.security`, no lookahead
- **Volume-intensity** — uses HMA-smoothed normalized volume (33-bar window) for adaptive transparency
🟦 DISCLAIMER
Meridian Lens PRO is a technical analysis overlay indicator built on the KernelLens Nadaraya–Watson regression library. It is provided solely for educational and research purposes and does not constitute financial, investment, or trading advice.
Kernel regression is a local smoothing technique. It estimates the mean of a source series in the neighborhood of the current bar based on historical data, but it does not predict future prices, does not generate trading signals on its own, and does not guarantee the profitability of any strategy built on top of its output.
Past performance of any model does not guarantee future results. Markets contain systemic risks that cannot be eliminated by any amount of mathematical rigor. Responsibility for any trading decisions rests entirely with the user. Always apply sound capital management, conduct your own independent analysis, and never risk capital you are not prepared to lose.
The author assumes no liability for direct or indirect losses incurred through the use of Meridian Lens or the underlying KernelLens library.
Indicator

AG Pro Moving Average Ribbon Stress Meter [AGPro Series]AG Pro Moving Average Ribbon Stress Meter
Overview / What It Does
This indicator is designed to read the internal condition of a moving-average ribbon rather than treating the ribbon as a simple trend overlay. Instead of asking only whether the ribbon is bullish or bearish, it asks a different question: is the ribbon structurally calm, starting to load, becoming strained, or losing internal order.
The script builds a six-line moving-average ribbon, measures how those averages interact with each other, and converts that interaction into a stress framework. The result is a visual map that helps show whether the ribbon is organized, stretched, unstable, or resetting after stress.
In practical terms, the script is built to help users evaluate ribbon quality, internal synchronization, and the degree of structural pressure inside the moving-average stack. It is not intended to forecast future prices, call tops or bottoms, or replace broader market analysis. Its purpose is to organize what the ribbon is doing now and how stable or unstable that structure appears to be.
The chart output combines multiple layers: the ribbon itself, a central stress spine, edge bands, optional stress aura, event labels, and a compact status panel. Together, these elements aim to make the ribbon easier to interpret without requiring the user to manually inspect every moving average line on every bar.
Unique Edge
Many ribbon-style tools focus on directional bias, crossovers, or broad expansion and contraction. This script focuses on internal ribbon stress.
Its main distinction is that it does not treat all ribbon trends as equal. A ribbon can be rising while still carrying internal disagreement. A ribbon can also look compressed or visually clean while underlying alignment, slope behavior, width dynamics, or price stretch are beginning to deteriorate. This script is built to surface those conditions.
The goal is not to reduce the market to a single signal. The goal is to provide a structured visual read on whether the moving-average stack is operating in a calm state, a loaded state, a strained state, or a more unstable condition. That makes it more useful as a workflow tool than as a simple trend-colour overlay.
Another point of differentiation is presentation. The script uses a ribbon-focused visual design so that the user can read internal condition directly from the chart. Focus modes, theme presets, stress spine layering, and a compact panel are included to keep the display informative without turning the chart into a dense dashboard.
Methodology
The script evaluates ribbon condition through five stress components.
1) Order Stress
This measures whether the moving averages are stacked cleanly or whether their order is becoming mixed. Lower stress suggests cleaner structural order. Higher stress suggests more internal disorder.
2) Slope Dispersion Stress
This evaluates how consistently the moving averages are sloping together. When the ribbon lines are moving with similar directional agreement, synchronization is stronger. When their slopes diverge, internal stress rises.
3) Width Instability Stress
This tracks whether the ribbon width is behaving in a stable or unstable way. A ribbon can widen in an orderly way or in a more erratic way. This component attempts to distinguish between those conditions.
4) Curvature Stress
This evaluates bending in the ribbon core. Strong changes in ribbon curvature may indicate increasing internal pressure or transition.
5) Price Stretch Stress
This measures how far price is moving from the ribbon core relative to ribbon width and ATR-based normalization. This is not a directional claim. It is a structure-based distance measure.
These components are weighted and blended into a smoothed Stress Score. That score then feeds the state engine.
Primary states include Calm, Loaded, Strained, Critical, Fractured, and Recovery. The panel and visual styling use those states to summarize the ribbon condition at the current bar.
Signals & Alerts
This script is built around state transitions and structural events rather than buy/sell promises.
Depending on settings, users may see event labels and alerts such as:
Stress Build
Shows that stress has crossed into an early loading phase.
Strained
Shows that the ribbon has moved into a more stressed internal state.
Critical Load
Highlights a higher-pressure condition where instability has become more meaningful.
Ribbon Fracture
Marks a stronger structural failure condition when stress and ribbon order deterioration align.
Stress Reset
Shows that a previously elevated stress condition has cooled enough to register recovery.
Order Restored
Highlights improvement in ribbon order after disorder had been present.
These events are not trade instructions. They are context markers intended to help users track shifts in ribbon condition. Alerts should be interpreted together with market structure, timeframe context, volatility, and personal risk management.
Key Inputs
Source and MA Type
The ribbon can be built from different moving-average types and data sources.
Ribbon Lengths
Users can define the six ribbon lengths to fit their preferred structure and timeframe.
Stress Engine Inputs
ATR length, slope lookback, width lookback, curvature lookback, smoothing, and component references allow users to calibrate how sensitive the stress model should be.
Weights
The script includes separate weights for order stress, slope dispersion, width instability, curvature stress, and price stretch stress.
Thresholds
Loaded, Strained, Critical, and Fracture thresholds can be adjusted for tighter or looser state transitions.
Theme Presets and Focus Mode
Theme presets and focus modes allow the ribbon to be displayed in different visual styles while preserving the same logic.
Events and Panel
Users can control label density, label spacing, marker visibility, and panel position.
Limitations & Transparency
This script is an interpretation framework built around moving-average relationships. It does not know future price movement, and it does not claim certainty. Like any model built on smoothed market data, it will react more slowly in some environments and may produce fewer useful transitions in others.
Different assets and timeframes can produce different ribbon personalities. A threshold or weight set that feels balanced on one market may feel too sensitive or too quiet on another. Users should expect to adapt settings if they move between instruments with very different volatility or trend behavior.
The stress model is also deliberately selective. It does not try to label every fluctuation or classify every candle. Its purpose is to organize ribbon condition, not to describe every possible market state.
This indicator should also not be confused with a complete trading plan. It does not define entries, exits, position sizing, or account risk. It is best used as a structural context tool inside a broader workflow.
Risk Disclosure
This script is for chart analysis and educational use. It is not financial advice, investment advice, or a promise of outcome.
No indicator can guarantee performance, remove risk, or eliminate false readings. Market conditions change, correlations shift, and trend behavior can weaken or reverse without warning. Any decision taken from this script should be made within a broader framework that includes price structure, liquidity, volatility, timeframe alignment, and risk control.
Users are responsible for testing settings, understanding the limitations of moving-average tools, and deciding whether the information produced by the script fits their own process.
Indicator

Helion Trend Weave [JOAT]Helion Trend Weave
Introduction
The Helion Trend Weave is an open-source volatility-adaptive multi-MA ribbon overlay that self-adjusts its period lengths based on real-time ATR regime. In high-volatility environments, periods shorten for faster response; in calm markets, they lengthen for noise reduction. The ribbon consists of up to 12 moving average filaments with four-state color logic that provides instant trend phase recognition: dominant rise, fading rise, dominant fall, and fading fall. Beyond simple trend direction, HTW measures ribbon spread as a trend strength gauge, detects compression squeezes, identifies ribbon inversions (twists), and generates six distinct signal types — all with cooldown-based anti-overlap to keep the chart clean.
This indicator addresses a fundamental limitation of static moving average systems: fixed periods that work well in one volatility environment fail in another. A 20-period EMA that provides clean signals in a trending market produces whipsaws in a choppy one. HTW solves this by dynamically morphing all ribbon periods through a volatility ratio, while providing a comprehensive suite of trend diagnostics through its dashboard and signal architecture.
Core Engine: Volatility Morphing
The adaptive period system works by computing a volatility ratio between a fast ATR and a slow ATR:
float volReg = atrL != 0 ? atrS / atrL : 1.0
float adaptMult = adaptive ? math.max(adaptMin, math.min(adaptMax, 1.5 / volReg)) : 1.0
When short-term volatility exceeds long-term volatility (ratio > 1), the multiplier decreases below 1.0, shortening all periods for faster reaction. When volatility contracts (ratio < 1), the multiplier increases above 1.0, lengthening periods for noise filtering. The morph floor and ceiling are configurable to prevent extreme period distortion. Every filament in the ribbon is calculated as:
Period = max(2, round((basePeriod + index * spacing) * adaptMult))
This means the entire ribbon breathes with the market — expanding its lookback during calm periods and contracting it during volatile ones.
Multi-MA Ribbon Architecture
The ribbon supports up to 12 filaments using EMA, SMA, or SMMA calculation types. Each filament is computed with inline EMA/RMA logic at global scope to handle the series-int periods that result from adaptive morphing. The filaments are plotted with progressive transparency — the lead filament is vivid and thick, while trailing filaments fade gradually, creating a visual depth effect.
Four-State Color Logic
Rather than simple bullish/bearish coloring, HTW uses four states based on two conditions — trend direction (lead above/below anchor) and momentum (lead rising/falling):
Dominant Rise: Lead filament above anchor AND rising — strong bullish momentum
Fading Rise: Lead filament above anchor but NOT rising — bullish trend losing steam
Dominant Fall: Lead filament below anchor AND falling — strong bearish momentum
Fading Fall: Lead filament below anchor but NOT falling — bearish trend losing steam
The "fading" states are early warnings that a trend may be approaching exhaustion before an actual crossover occurs.
Trend Diagnostics
Ribbon Spread: The absolute distance between the fastest and slowest filaments, normalized by ATR. This serves as a volatility-adjusted trend strength gauge. The spread is percentile-ranked against its own history and classified as DOMINANT (>70th), DEVELOPING (30-70th), or DORMANT (<30th).
Alignment Score: Measures what percentage of filament segments are in correct sequential order (ascending for bull, descending for bear). LOCKED = 100% alignment, PARTIAL = 50%+, SCATTERED = below 50%. Full alignment is a powerful trend confirmation.
Spread Momentum: Rate of change of the normalized spread — EXPANDING, CONTRACTING, or FLAT. Expanding spread after compression often signals the beginning of a significant move.
Compression Chamber (Squeeze Detection)
The indicator percentile-ranks the raw ribbon spread against a configurable lookback. When the spread falls below the compression percentile threshold (default: 10th percentile), the ribbon is considered "squeezed" — a state that often precedes explosive directional moves. A subtle background aura highlights compression periods.
Signal Architecture
HTW generates six signal types, each with independent cooldown timers and a global anti-overlap system that ensures only one label appears per bar (priority: Cross > Surge > Twist > Fan > Snap > Drift):
IGNITE / QUENCH (Weave Cross): Lead filament crosses above or below the anchor filament — the core directional signal.
SURGE (Momentum Surge): Compression releases into rapid expansion — the ribbon was squeezed and is now expanding with directional conviction. This is a structural breakout signal.
TWIST LOCK: Ribbon inversion confirmed after a configurable number of bars of sustained new alignment. More conservative than a simple crossover.
FAN (Filament Fan): All filaments achieve perfect sequential order — a powerful trend confirmation that indicates full ribbon alignment.
SNAP (Snap Recoil): Price crosses the ribbon midpoint against the current trend direction while the ribbon has meaningful width. This is a mean-reversion signal.
DRIFT (Drift Fade): Trend force decays to dormant level — an exhaustion warning when the spread percentile drops below 15%.
// Global anti-overlap: only one label per bar (priority order)
bool doCross = (bullCross or bearCross) and not barUsed
bool doSurge = (surgeUp or surgeDn) and not barUsed and not doCross
bool doTwist = (twistBullEdge or twistBearEdge) and not barUsed and not doCross and not doSurge
Command Panel (Dashboard)
A 12-row monospace dashboard displays real-time trend intelligence:
PHASE: Current four-state classification (Dominant Rise, Fading Rise, Dominant Fall, Fading Fall)
FORCE: Trend strength classification with percentile (DOMINANT / DEVELOPING / DORMANT)
APERTURE: Normalized ribbon spread with expansion/contraction direction
ALIGNMENT: Filament sequential order score (LOCKED / PARTIAL / SCATTERED)
MORPH: Current adaptive period multiplier (e.g., 0.75x in high vol, 1.8x in low vol)
COMPRESS: Whether the ribbon is currently in a squeeze state
WEAVE: Current MA type and filament count configuration
VOL REG: Raw volatility ratio (fast ATR / slow ATR)
MIDPOINT: Whether price is above or below the ribbon midpoint, with the midpoint price
LEAD PER / ANCHOR PER: Current effective periods after morphing
Input Parameters
Helix Parameters:
Filament Type: EMA, SMA, or SMMA (default EMA)
Origin Period: Fastest MA period (default 5)
Weave Depth: Number of filaments, 3-12 (default 8)
Filament Spacing: Period increment between filaments (default 5)
Volatility Morphing: Enable/disable adaptive periods (default on)
Morphic Tuning:
Impulse ATR / Anchor ATR: Fast and slow ATR periods for volatility ratio
Morph Floor / Ceiling: Minimum and maximum period multiplier bounds
Compression Chamber:
Compression Aura: Toggle squeeze background highlight
Chamber Lookback / Compression Percentile: Squeeze detection parameters
Signal Architecture:
Individual toggles for all six signal types
Twist Confirmation: Bars of sustained inversion required (default 2)
How to Use This Indicator
Watch for SURGE signals after compression periods — these often mark the beginning of significant directional moves.
Use the four-state color system to identify trend exhaustion early. "Fading" states warn that momentum is weakening before a crossover occurs.
FAN signals (full filament alignment) are powerful trend confirmations — they indicate that all timeframe layers of the ribbon agree on direction.
SNAP signals provide counter-trend opportunities when price crosses the ribbon midpoint against a wide ribbon — but use them with caution and additional confirmation.
Monitor the MORPH multiplier in the dashboard — extreme values (very low or very high) indicate unusual volatility conditions.
The ALIGNMENT metric helps distinguish between clean trends (LOCKED) and choppy conditions (SCATTERED).
Limitations
Moving average ribbons are inherently lagging — the adaptive morphing reduces but does not eliminate this lag.
Compression detection identifies potential breakout setups but does not predict breakout direction.
The adaptive period system can produce rapid period changes during volatile transitions, which may cause visual noise in the ribbon.
SNAP (mean reversion) signals are counter-trend and carry higher risk than trend-following signals.
The indicator works best on liquid instruments with consistent price action. Thin markets may produce unreliable morphing behavior.
Signal cooldowns prevent spam but may also suppress valid signals that occur in rapid succession.
Originality Statement
This indicator is original in its integration of volatility-adaptive period morphing with comprehensive ribbon diagnostics. While moving average ribbons are a known concept, HTW is justified because:
The ATR-ratio-based period morphing dynamically adjusts all filament periods simultaneously, creating a ribbon that breathes with market volatility — unlike static ribbon indicators.
Four-state color logic (rising/falling crossed with above/below) provides phase recognition beyond simple bullish/bearish classification.
The alignment scoring system quantifies ribbon sequential order as a percentage, providing a measurable trend quality metric.
Six distinct signal types with priority-based anti-overlap and independent cooldowns create a clean, non-cluttered signal architecture.
Compression detection integrated directly into the ribbon spread provides squeeze identification without requiring a separate indicator.
The comprehensive 12-row dashboard presents trend diagnostics including effective morphed periods, spread momentum, and alignment state.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Moving average systems identify trends after they begin and cannot predict future price direction. Past trend patterns do not guarantee future behavior. Always use proper risk management and conduct your own analysis before making trading decisions. The author is not responsible for any losses incurred from using this tool.
-Made with passion by officialjackofalltrades
Indicator

Vortex Nexus Alpha [JOAT]Vortex Nexus Alpha Strategy
Introduction
The Vortex Nexus Alpha Strategy is an advanced open-source algorithmic trading system that combines multi-dimensional signal generation, adaptive regime detection, and institutional-grade risk management into a unified execution framework. This strategy represents a complete trading system built from the ground up using proprietary mathematical models, fractal analysis, momentum tracking, and market microstructure intelligence.
Unlike simple crossover strategies or single-indicator systems, Vortex Nexus Alpha synthesizes intelligence from five independent signal layers, each containing five distinct detection mechanisms, creating a 25-factor confluence scoring system that validates every trade entry. The strategy is designed for traders who understand that consistent profitability requires multi-dimensional analysis, adaptive positioning, and systematic risk management rather than relying on any single indicator or pattern.
Why This Strategy Exists
This strategy addresses the fundamental challenge of algorithmic trading: most systems over-optimize to historical data or rely on simplistic logic that fails in real market conditions. Vortex Nexus Alpha solves this through a knowledge-based architecture that doesn't depend on indicator mashups but instead builds intelligence from first principles:
Volatility Expansion Engine: Measures market volatility through ATR percentile ranking and adapts position sizing and stop distances dynamically
Price Efficiency Calculator: Quantifies how efficiently price moves using path length analysis, filtering choppy conditions
Chaos Measurement System: Identifies market regime (directional, equilibrium, chaotic) using logarithmic range analysis
Directional Conviction Tracker: Measures trend strength through ADX and directional movement indicators
Adaptive Ribbon System: Multi-layer EMA ribbon that expands/contracts based on volatility and provides dynamic support/resistance
Volume Pressure Analysis: Estimates buying/selling pressure through candle structure and wick analysis
Gauss Smoothing Engine: 4th-order Gaussian filter that eliminates noise while preserving genuine price movements
Fractal Efficiency Measurement: Logarithmic efficiency calculation that adapts Laguerre filtering for optimal lag reduction
Laguerre Momentum Transform: Adaptive momentum oscillator that responds faster during efficient moves
Temporal Flow Dynamics: Analyzes price flow direction, magnitude, and acceleration across multiple dimensions
Pivot Structure Analysis: Detects market structure breaks and shifts using swing high/low analysis
Order Block Detection: Identifies institutional positioning zones through volume-confirmed reversal patterns
Imbalance Zone Mapping: Marks price gaps and inefficiencies that often get filled
Each component contributes unique intelligence that validates or invalidates potential trade setups. The strategy requires minimum confluence scores before entering positions, ensuring that multiple independent systems agree on directional bias.
Core Strategy Architecture
1. Volatility Expansion Engine
The strategy begins with comprehensive volatility analysis:
volatility = ta.atr(volatilityPeriod)
volatilityPercent = (volatility / close) * 100
volatilityRank = ta.percentrank(volatilityPercent, 100)
Volatility percentile ranking provides context for current volatility relative to recent history. This measurement drives multiple strategy decisions:
- Position sizing: Higher volatility = smaller positions
- Stop distance: Higher volatility = wider stops
- Signal filtering: Extreme volatility (>80 percentile) triggers defensive mode
The strategy adapts to volatility rather than using fixed parameters, ensuring it remains relevant across different market regimes.
2. Price Efficiency and Chaos Measurement
The strategy calculates price efficiency to distinguish trending from ranging markets:
priceMovement = math.abs(close - close )
pathLength = math.sum(math.abs(close - close ), efficiencyPeriod)
efficiency = pathLength > 0 ? priceMovement / pathLength : 0
High efficiency (>0.6) indicates clean, directional movement suitable for trend-following. Low efficiency (<0.4) suggests choppy conditions where the strategy reduces activity or switches to mean-reversion logic.
Chaos level is measured using logarithmic range analysis:
rangeHigh = ta.highest(high, volatilityPeriod)
rangeLow = ta.lowest(low, volatilityPeriod)
atrSum = math.sum(ta.atr(1), volatilityPeriod)
chaosLevel = 100 * math.log10(atrSum / (rangeHigh - rangeLow)) / math.log10(volatilityPeriod)
High chaos (>60) triggers defensive positioning. Low chaos (<40) enables aggressive trend-following.
3. Directional Conviction System
The strategy implements complete ADX analysis with directional indicators:
= adx(14, 14)
ADX above 25 indicates emerging directional conviction. Above 40 indicates dominant conviction. The strategy uses conviction strength to:
- Filter entries: Minimum conviction threshold prevents trading in directionless markets
- Size positions: Higher conviction = larger positions (within risk limits)
- Set targets: Strong conviction enables wider profit targets
The difference between bullForce and bearForce determines directional bias and validates signal direction.
4. Adaptive Ribbon System
The strategy calculates 8 EMA layers with adaptive spacing:
stepSize = (slowPeriod - fastPeriod) / (ribbonLayers - 1)
ribbonLevel0 = ta.ema(close, fastPeriod)
ribbonLevel7 = ta.ema(close, slowPeriod)
Ribbon analysis provides:
- Trend direction: Fast > slow = bullish, fast < slow = bearish
- Trend strength: Wider ribbon = stronger trend
- Dynamic support/resistance: Ribbon layers act as price magnets
- Compression detection: Tight ribbon = energy buildup before breakout
The strategy only takes long trades when price is above the ribbon and short trades when below, ensuring alignment with trend structure.
5. Volume Pressure Analysis
The strategy estimates buying and selling pressure using candle structure:
buyPressure = close > open ? volume * ((close - open + upperWick * 0.5) / barSpan) :
close < open ? volume * ((upperWick + bodyMass * 0.3) / barSpan) : volume * 0.5
sellPressure = volume - buyPressure
pressureDelta = buyPressure - sellPressure
Pressure analysis validates signal direction:
- Long signals require positive pressure delta
- Short signals require negative pressure delta
- Extreme pressure (>70% of volume) suggests potential exhaustion
The strategy tracks cumulative pressure to identify accumulation and distribution phases.
6. Gauss Smoothing and Fractal Efficiency
The strategy applies 4th-order Gaussian filtering to eliminate noise:
gaussClose := math.pow(alpha, 4) * close +
4 * (1.0 - alpha) * nz(gaussClose ) -
6 * math.pow(1 - alpha, 2) * nz(gaussClose ) +
4 * math.pow(1 - alpha, 3) * nz(gaussClose ) -
math.pow(1 - alpha, 4) * nz(gaussClose )
Fractal efficiency is calculated using logarithmic path measurement:
fractalRatio = totalSpan > 0 ? math.log(rangeSum / totalSpan) / math.log(fractalSpan) : 0.0
fractalEfficiency = math.max(0, math.min(1, (fractalRatio + 1) / 2))
High fractal efficiency (>0.7) validates that momentum signals are backed by clean price action.
7. Laguerre Momentum Transform
The strategy uses adaptive Laguerre filtering for momentum measurement:
gamma = 0.7 * (1 - fractalEfficiency) + 0.1 * fractalEfficiency
L0 := (1 - gamma) * gaussClose + gamma * nz(L0 )
L1 := -gamma * L0 + nz(L0 ) + gamma * nz(L1 )
L2 := -gamma * L1 + nz(L1 ) + gamma * nz(L2 )
L3 := -gamma * L2 + nz(L2 ) + gamma * nz(L3 )
cu = (L0 > L1 ? L0 - L1 : 0) + (L1 > L2 ? L1 - L2 : 0) + (L2 > L3 ? L2 - L3 : 0)
cd = (L0 < L1 ? L1 - L0 : 0) + (L1 < L2 ? L2 - L1 : 0) + (L2 < L3 ? L3 - L2 : 0)
laguerreValue = cu + cd != 0 ? 100 * (cu / (cu + cd)) : 50
fractalMomentum = (laguerreValue - 50) * (1 + fractalEfficiency)
The adaptive gamma adjustment reduces lag during efficient moves and adds smoothing during choppy conditions. Fractal momentum above 20 validates bullish signals, below -20 validates bearish signals.
8. Temporal Flow Dynamics
The strategy analyzes price flow across multiple dimensions:
priceFlow = ta.ema(close, flowPeriod) - ta.ema(close, flowPeriod * 2)
flowDir = priceFlow > 0 ? 1 : -1
flowMagnitude = math.abs(priceFlow) / volatility
flowAccel = ta.change(priceFlow, 3)
Flow analysis provides:
- Flow direction: Confirms trend direction
- Flow magnitude: Measures flow strength relative to volatility
- Flow acceleration: Identifies momentum shifts
The strategy requires flow alignment with signal direction for entry validation.
9. Market Structure Analysis
The strategy tracks pivot highs and lows to identify structure breaks:
pivotTop = ta.pivothigh(high, pivotSpan, pivotSpan)
pivotBottom = ta.pivotlow(low, pivotSpan, pivotSpan)
Structure breaks occur when:
- Bullish: Price breaks above previous pivot high
- Bearish: Price breaks below previous pivot low
Structure shifts (change of character) occur when:
- Bullish: Downtrend breaks above previous pivot high
- Bearish: Uptrend breaks below previous pivot low
The strategy gives bonus confluence points to signals that align with structure breaks or shifts.
10. Order Block and Imbalance Detection
The strategy identifies institutional positioning zones:
orderBlockBull = close < open and close > open and volume > avgVol * 1.2
orderBlockBear = close > open and close < open and volume > avgVol * 1.2
gapUp = low > high and (low - high ) > volatility * 0.3
gapDown = high < low and (low - high) > volatility * 0.3
Order blocks mark zones where institutions placed large orders. The strategy uses these as:
- Entry zones: Look for entries near order blocks in trend direction
- Stop placement: Place stops beyond order blocks for protection
- Target zones: Opposite-direction order blocks become profit targets
Imbalance zones (gaps) often get filled, providing mean-reversion opportunities.
Multi-Dimensional Signal Generation
The strategy generates signals through five independent layers, each containing five detection mechanisms:
Layer 1: Rapid Scalp Signals (5 mechanisms)
- Laguerre oversold + flow bullish + price above fast ribbon
- Pressure index positive + flow reversal bullish
- Momentum bullish + volume surge + price above mid ribbon
- Strong bullish candle + ribbon bullish + pressure positive
- Fractal momentum positive + flow acceleration positive + ribbon aligned
Layer 2: Swing Position Signals (5 mechanisms)
- Ribbon bullish + price above slow ribbon + bullish regime
- Structure break bullish + momentum bullish
- Order block bullish + flow bullish + conviction strong
- Gap up + pressure extreme + ribbon aligned
- Range breakout up + cumulative pressure positive + flow strong
Layer 3: Momentum Continuation (5 mechanisms)
- Fractal momentum extreme + ribbon bullish + conviction strong
- Laguerre oversold + flow bullish + volume surge
- Momentum extreme + fractal momentum positive + ribbon expanding
- Extreme buy pressure + flow acceleration positive + bullish regime
- Bull force > bear force + conviction strong + ribbon aligned
Layer 4: Structure Confirmation (5 mechanisms)
- Structure shift bullish + volume surge
- Order block bullish + price above last pivot low + momentum bullish
- Gap up + flow bullish + ribbon bullish
- Structure break bullish + pressure extreme positive
- Volume absorption + pressure positive + price above mid ribbon
Layer 5: Confluence Boosters (5 mechanisms)
- Ribbon tight + ribbon expanding + ribbon bullish + volume surge
- Net flow positive + temporal force positive + bullish regime
- Fractal efficiency high + Laguerre oversold + flow magnitude strong
- Strong bullish candle + price above previous high + volume extreme
- Velocity positive + flow bullish + ribbon power strong
Each layer contributes 0 or 1 to the bull strength score. The strategy requires minimum confluence (default 2) before entering long positions. This multi-layer approach ensures that signals are validated across multiple independent dimensions.
Risk Management System
The strategy implements institutional-grade risk management:
Position Sizing:
- Risk percentage per trade (default 1% of equity)
- Dynamic adjustment based on volatility percentile
- Reduced sizing during high chaos or low efficiency
Stop Loss Placement:
stopLoss = close - (volatility * slMultiplier)
- ATR-based stops that adapt to current volatility
- Multiplier (default 1.5) provides breathing room
- Stops placed beyond order blocks when possible
Take Profit Targets:
takeProfit = close + (volatility * slMultiplier * tpMultiplier)
- Risk-reward ratio (default 2.5:1)
- Adjusted based on conviction strength
- Wider targets during strong conviction, tighter during weak
Trailing Stop System:
trailStop = close - (volatility * trailOffset)
- Optional trailing stop (default enabled)
- Offset (default 1.2x ATR) balances protection and breathing room
- Activates after position moves into profit
Visual Elements
Adaptive Ribbon: Multi-layer EMA ribbon with gradient coloring showing trend direction and strength
Entry Signals: Triangle shapes sized by signal strength (large for 5+ confluence, small for 2-3 confluence)
Structure Markers: Lines and labels marking structure breaks, shifts, and order blocks
Imbalance Boxes: Boxes marking price gaps and inefficiency zones
Regime Background: Subtle background coloring showing current market regime
Flow Background: Additional background layer showing flow direction
Comprehensive Dashboard: 18-row intelligence panel showing position status, signal strength, regime, ribbon state, pressure, momentum, structure, flow, conviction, Laguerre, volume, volatility, trade statistics, and win rate
The dashboard provides complete strategy intelligence with real-time metrics and performance tracking.
Strategy Parameters
Core Settings:
Ultra-Aggressive Mode: Maximum trade frequency (default enabled)
Min Signal Strength: Minimum confluence required (1-6, default 2)
Risk %: Risk per trade as percentage of equity (0.5-5.0%, default 1.0%)
TP Multiplier: Take profit as multiple of stop distance (1.0-10.0, default 2.5)
SL Multiplier: Stop loss as multiple of ATR (0.5-5.0, default 1.5)
Trailing Stop: Enable/disable trailing stop (default enabled)
Trail Offset: Trailing stop distance as multiple of ATR (0.5-3.0, default 1.2)
Advanced Parameters:
Volatility Period: ATR calculation length (5-50, default 14)
Efficiency Period: Price efficiency calculation period (5-100, default 20)
Flow Period: Temporal flow analysis period (10-50, default 20)
Ribbon Layers: Number of EMA layers (3-15, default 8)
Fast Period: Fastest EMA period (2-20, default 5)
Slow Period: Slowest EMA period (10-100, default 34)
Visualization:
Dashboard: Toggle metrics panel (default enabled)
Entry Signals: Toggle signal shapes (default enabled)
Regime Zones: Toggle background coloring (default enabled)
Adaptive Ribbon: Toggle ribbon display (default enabled)
How to Use This Strategy
Step 1: Configure Risk Parameters
Set risk percentage appropriate for your account size. 1% is conservative, 2% is moderate, 3%+ is aggressive. Never risk more than you can afford to lose on any single trade.
Step 2: Select Minimum Signal Strength
Default 2 provides balanced trade frequency and quality. Increase to 3-4 for higher quality but fewer trades. Decrease to 1 only in ultra-aggressive mode on highly liquid instruments.
Step 3: Adjust Risk-Reward Ratio
Default 2.5:1 provides good balance. Increase to 3-5:1 for swing trading. Decrease to 1.5-2:1 for scalping. Higher ratios require higher win rates to be profitable.
Step 4: Enable/Disable Trailing Stops
Trailing stops protect profits but can exit prematurely. Enable for trend-following, disable for mean-reversion. Adjust trail offset based on instrument volatility.
Step 5: Monitor Dashboard Metrics
Watch "POSITION" status, "BULL STR" and "BEAR STR" scores, "REGIME" classification, and "WIN RATE" percentage. These provide real-time strategy health assessment.
Step 6: Backtest Thoroughly
Test on at least 100 trades across different market conditions. Verify that win rate, profit factor, and drawdown meet your requirements. Adjust parameters if needed.
Step 7: Forward Test on Demo
Run strategy on demo account for at least 1 month before live trading. Verify that live performance matches backtest expectations. Monitor slippage and execution quality.
Step 8: Start Small on Live
Begin with minimum position sizes on live account. Gradually increase as confidence builds. Never risk more than 1-2% of account on any single trade initially.
Best Practices
Use on liquid instruments with tight spreads and reliable execution
Backtest with realistic commission (0.1%) and slippage (2 ticks minimum)
Test across multiple market conditions (trending, ranging, volatile, calm)
Verify minimum 100 trades in backtest for statistical significance
Monitor win rate - should be 45-60% for 2.5:1 risk-reward ratio
Check profit factor - should be >1.5 for robust strategy
Analyze maximum drawdown - should be <20% of account
Review trade distribution - avoid over-concentration in specific periods
Monitor signal strength distribution - most trades should be 3+ confluence
Check regime alignment - strategy should perform in directional regimes
Verify that losses are controlled - no single loss should exceed 2% of account
Ensure adequate trade frequency - at least 2-3 trades per week on daily timeframe
Combine with manual oversight - review signals before execution in early stages
Use appropriate timeframe - 15m-1H for day trading, 4H-1D for swing trading
Avoid trading during major news events unless specifically tested for that
Keep detailed trade journal to identify patterns in wins and losses
Strategy Limitations
Algorithmic strategies cannot predict black swan events or unprecedented market conditions
Backtested performance does not guarantee future results
Slippage and commission in live trading may differ from backtest assumptions
The strategy requires sufficient volatility - may underperform in extremely low volatility
Signal generation depends on multiple calculations - computational lag possible on slow systems
The strategy works best on trending instruments - may struggle in perpetual ranges
Confluence scoring requires all components to be relevant - some may be less meaningful on certain instruments
The strategy cannot account for fundamental catalysts or news events
Trailing stops can exit prematurely during volatile but ultimately profitable moves
The strategy requires adequate liquidity for execution at desired prices
Parameter optimization can lead to overfitting - use walk-forward analysis
The strategy shows what signals exist, not why - market context still matters
Technical Implementation
Built with Pine Script v6 using:
Complete volatility expansion engine with ATR percentile ranking
Price efficiency calculator using path length analysis
Chaos measurement using logarithmic range calculations
Full ADX implementation with directional indicators
8-layer adaptive EMA ribbon with volatility-based spacing
Volume pressure estimation using candle structure analysis
4th-order Gaussian filter for noise elimination
Fractal efficiency measurement using logarithmic path complexity
Adaptive Laguerre transform with 4 cascading filter levels
Temporal flow analysis with direction, magnitude, and acceleration
Pivot-based market structure tracking
Order block and imbalance zone detection
25-factor confluence scoring system across 5 signal layers
Dynamic position sizing based on volatility and regime
ATR-based stop loss and take profit calculations
Optional trailing stop system with volatility adjustment
Comprehensive dashboard with 18 metrics and performance tracking
Alert system for all entry and exit signals
The code is fully open-source with extensive comments explaining each component and signal generation logic.
Originality Statement
This strategy is original and represents a complete trading system built from proprietary knowledge rather than indicator mashups. The strategy is justified because:
It synthesizes 13 independent analytical systems into a unified execution framework
The 25-factor confluence scoring across 5 signal layers provides multi-dimensional validation
Each component is built from first principles using mathematical models and market microstructure concepts
The adaptive nature of the system (volatility, efficiency, regime) ensures relevance across market conditions
Risk management is integrated at the core rather than added as an afterthought
The strategy doesn't rely on any single indicator or pattern - it builds intelligence from multiple independent sources
Fractal efficiency and Laguerre adaptation provide unique momentum measurement not found in standard systems
Temporal flow analysis adds a dimension of price dynamics beyond simple trend following
Market structure tracking provides context that pure indicator-based systems lack
The comprehensive dashboard provides complete strategy intelligence and performance tracking
The system is designed for real trading with realistic risk management, not just backtest optimization
Each component contributes unique intelligence: volatility drives adaptation, efficiency filters conditions, chaos identifies regimes, conviction measures strength, ribbon provides structure, pressure shows order flow, Gauss filtering eliminates noise, fractal efficiency validates momentum, Laguerre provides adaptive momentum, flow tracks dynamics, structure provides context, order blocks mark zones, and confluence validates signals. The strategy's value lies in combining these complementary perspectives into a cohesive, adaptive trading system with institutional-grade risk management.
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. Trading involves substantial risk of loss and is not suitable for all investors.
Algorithmic trading strategies are tools for systematic execution, not guarantees of profit. Backtested performance does not guarantee future results. Past strategy performance does not predict future performance. Market conditions change, and strategies that worked historically may not work in the future.
The signals generated are mathematical calculations based on current market data, not predictions of future price movement. High confluence scores, regime alignment, and structure breaks do not guarantee profitable trades. Users must conduct their own analysis and risk assessment before making trading decisions.
Always use proper risk management, including stop losses and position sizing appropriate for your account size and risk tolerance. Never risk more than you can afford to lose. Consider consulting with a qualified financial advisor before making investment decisions.
The author is not responsible for any losses incurred from using this strategy. Users assume full responsibility for all trading decisions made using this tool. Thoroughly backtest and forward test any strategy before live trading.
-Made with passion by officialjackofalltrades Strategy

AG Pro EMA Ribbon Compression Map [AGPro Series]AG Pro EMA Ribbon Compression Map
Overview / What it does
AG Pro EMA Ribbon Compression Map is a ribbon-structure indicator built to read the internal condition of a multi-EMA cluster rather than the behavior of price around a single moving average. Instead of asking whether price reclaimed one reference EMA, this script evaluates how tightly the ribbon is compressed, how cleanly the EMAs are aligned, whether width is beginning to expand, and whether a developing move still looks organized or is starting to cool.
The default ribbon uses six EMAs and transforms their relative spacing into a visual structure that can be monitored directly on the chart. When the ribbon contracts, the script highlights coil conditions. When alignment and width expansion start to work together, it can mark bullish or bearish release conditions. When the ribbon is already wide and the expansion begins to lose energy, the script can flag fan-stretch / exhaustion behavior.
This makes the tool suitable for traders who want to study transition phases between compression, release, expansion, and late-stage cooling without reducing the chart to a single crossover event. It is designed as a structural read of ribbon behavior.
Unique Edge
The main objective of this script is not to provide another generic EMA ribbon display. Its edge comes from turning ribbon behavior into a state map.
First, it measures compression through normalized ribbon width rather than relying only on visual judgment. This helps distinguish between a ribbon that merely looks narrow and a ribbon that is statistically tight relative to its own recent behavior.
Second, it combines two layers of organization into one alignment read:
1) order agreement between the EMAs
2) slope agreement across the ribbon
This is important because a ribbon can appear stacked correctly while already losing directional integrity. By combining order and slope, the script attempts to separate cleaner directional structure from weaker, mixed, or transitional structure.
Third, the script focuses on release quality as a context event. A release is not treated as a simple EMA cross. It requires compression context, directional alignment, price location relative to the ribbon, and width expansion behavior. In practice, this helps frame release events as structural transitions rather than isolated triggers.
This also differentiates the script from single-EMA reclaim tools. AG Pro EMA Ribbon Compression Map is not built to analyze reactions around one anchor average. Its purpose is to interpret the internal geometry of the ribbon itself.
Methodology
The default ribbon is built from six EMAs:
8, 13, 21, 34, 55, and 89.
The script calculates the highest and lowest EMA in the group, derives ribbon width, and normalizes that width using ATR. It then compares the normalized width to its own historical range over the selected compression lookback. From this process, a Compression Score and an Expansion Score are derived.
Alignment is built from two components:
- EMA order agreement
- EMA slope agreement
If the ribbon is fully stacked in one direction and most slopes support that direction, alignment improves. If order and slope start to disagree, alignment weakens and the state can shift toward mixed / disorder behavior.
The state logic is designed around the following structural phases:
- Bullish Coil
- Bearish Coil
- Tight Compression
- Bullish Release
- Bearish Release
- Bullish Expansion
- Bearish Expansion
- Mixed / Disorder
- Fan Stretch / Exhaustion
- Transition
The visual model is intended to keep the chart readable while still making the ribbon feel alive. Compression and release are not presented as forecasting claims. They are chart states derived from ribbon width, order, slope, and price position relative to the ribbon.
Signals & Alerts
This script can display event labels for key structural transitions and can generate alerts for the most important state changes.
Available alert conditions include:
- Bullish Ribbon Release
- Bearish Ribbon Release
- Ribbon Compression Start
- Ribbon Compression Exit
- Ribbon Exhaustion
In practical use, traders may choose to treat these alerts as workflow signals rather than standalone decisions. For example, a compression start can identify a tightening structure worth monitoring. A bullish or bearish release can indicate that the ribbon is transitioning out of compression with directional alignment. An exhaustion event can indicate that a previously expanding ribbon may no longer be accelerating.
The script also includes an on-chart panel that summarizes:
- current state
- compression score
- alignment score
- directional bias
- width condition
Key Inputs
Ribbon Settings
- Six EMA lengths
- price source
Compression Engine
- ATR length
- compression lookback
- compression threshold
- minimum width expansion
- slope lookback
- exhaustion threshold
Visual Settings
- ribbon fill visibility
- event label visibility
- panel visibility
- optional bar tinting
- label size
- panel position
- label density and cooldown controls
These settings allow the script to be adapted to different instruments and timeframes. Users can keep the default ribbon structure or study how different EMA sets behave across their own workflow.
Limitations & Transparency
This script is not a prediction engine. It does not know whether a compression will resolve into continuation, reversal, or failed expansion. It reads ribbon structure; it does not guarantee outcome.
Compression is a contextual condition, not a trade confirmation by itself. A tightly compressed ribbon can remain compressed longer than expected. Likewise, a release event can still fail if the move does not continue.
Alignment is based on moving averages and slope behavior, which means the script is responsive to structure but still derived from lagging calculations. That tradeoff is intentional: the goal is to improve structural clarity, not to eliminate lag altogether.
The indicator is also not a substitute for market context, support / resistance work, volatility analysis, or risk management. It is best used as a chart-structure tool inside a broader decision process.
Risk Disclosure
This indicator is for chart analysis and workflow support only. It does not provide financial advice, investment advice, or guaranteed trade outcomes. All trading decisions involve risk, and users should evaluate any signal, state change, or alert within their own methodology, market conditions, and risk framework. Indicator

Neural RibbonNeural Ribbon:
6 independent neural networks running live on your chart. Five predict price direction at different horizons (T+2 through T+32), forming the ribbon. A sixth "trader" network reads all five predictions, their gradients, and multi-timeframe order flow to generate entry and exit signals.
When a trade closes, the actual P&L retrains the trader via reinforcement learning - wins reinforce the pattern, losses suppress it. All trade parameters (entry threshold, stop loss, take profit, hold time, cooldown) self-adjust based on rolling performance. No curve-fitting, no static rules. The system evolves on every trade. Recommended on BTCUSDT 15m where the RL loop has been most thoroughly validated. Indicator

Gold Ribbon V1.00Gold Ribbon V1.00
Pine Script V6 · PulseWire Indicator
A multi-MA ribbon indicator built exclusively for XAUUSD trading — trend detection, squeeze alerts, and dynamic TP/SL management in one system.
• 8 Moving Averages
• Fibonacci Sequence
• Squeeze Detection
• Auto TP / SL
• Best on 15M · 1H
---
01. What Is Gold Ribbon?
Gold Ribbon V1.00 is a trend-following ribbon indicator purpose-built for Gold (XAUUSD). It stacks eight Exponential Moving Averages in Fibonacci-sequence lengths — 5, 8, 13, 21, 34, 55, 89, and 144 — to form a visual "ribbon" that bends, compresses, and expands with the market's momentum.
When the ribbon is in Perfect Order (all 8 MAs stacked cleanly), the trend is high-confidence. When the ribbon compresses into a tight band, a breakout is loading. This single visual gives you trend direction, momentum strength, and market state — all at once.
• Trend Detection: Perfect Order logic identifies true bull and bear phases with all 8 MAs aligned.
• Squeeze Alert: Detects when the ribbon compresses — signaling a high-energy breakout is imminent.
• Auto TP / SL: Calculates dynamic Take Profit and Stop Loss levels from price-to-ribbon distance.
02. How to Add It to PulseWire
1. Open Pine Script Editor: In PulseWire, open the chart for XAUUSD. At the bottom, click Pine Editor. Paste the full Gold Ribbon V1.00 source code.
2. Save and Add to Chart: Click Save, then click Add to chart. The ribbon will appear overlaid on the candles immediately.
3. Set the Correct Timeframe: Switch to the 15-minute or 1-hour chart. The indicator is optimized for these timeframes. A warning will appear on-chart if you go above 1H intraday.
4. Open Settings (⚙️ Gear Icon): Click the indicator's gear icon on the chart to open the Settings panel. All customizable inputs are organized in labeled groups inside this panel.
03. Reading the Ribbon — Market States
The ribbon always shows one of four market states. A live label appears at the right edge of the chart showing the current state.
▲ BULLISH — Perfect Bull Order
All 8 MAs are stacked M1 > M2 > … > M8. Gold is in a clean uptrend. The ribbon fills green. Look for buy setups only. The stronger the separation between MAs, the stronger the trend.
▼ BEARISH — Perfect Bear Order
All 8 MAs are stacked M1 < M2 < … < M8. Gold is in a confirmed downtrend. The ribbon fills red. Look for sell setups only. Avoid buying into a bearish ribbon.
◆ SQUEEZE — Compression Detected
The ribbon has tightened below its average width. Gold is coiling energy before a breakout. Do not trade blindly — wait for the ribbon to expand and Perfect Order to form before entering. Orange diamonds appear along the ribbon mid-line.
~ CHOPPY — No Clear Trend
MAs are tangled and not in order. The ribbon fills gray. This is a no-trade zone. Signals during choppy conditions have low reliability. Step aside and wait.
04. The 8 Moving Averages Explained
The lengths follow the Fibonacci sequence — 5, 8, 13, 21, 34, 55, 89, 144 — a progression that naturally mirrors how Gold trends unfold across time cycles.
• MA 5: Fastest · Reacts to every tick
• MA 8: Short-term momentum
• MA 13: Early trend confirmation
• MA 21: Core trend driver
• MA 34: Medium-term structure
• MA 55: Institutional bias level
• MA 89: Macro trend filter
• MA 144: Slowest · Major support/resistance
Note: The MA 144 is also used as the Stop Loss anchor — price must hold above it (long) or below it (short) for the trade to remain valid.
05. Trading Signals
The indicator generates two types of signals — Standard and High Probability. Both require Perfect Order to be active.
• Standard Buy ▲
Small green triangle below the bar. Conditions: Perfect Bull Order + price above MA5 + MA144 is rising over 3 bars. One signal per trend — no repeats until trend resets.
• Standard Sell ▼
Small red triangle above the bar. Conditions: Perfect Bear Order + price below MA5 + MA144 is falling over 3 bars. One signal per trend.
• 🚀 High Prob BUY
Large green label with a rocket icon. Only fires when a Squeeze expansion happened recently before the bull trend formed — highest conviction setup.
• 🚀 High Prob SELL
Large red label with a rocket icon. Same logic — squeeze expansion followed by Perfect Bear Order. This is the premium signal to prioritize.
⚡ Signal Priority Rule: Always prioritize 🚀 High Probability signals over standard triangles. A squeeze expansion before a trend often precedes the largest Gold moves. Wait for these setups patiently.
06. How to Execute a Trade
Once a signal fires and the ribbon is in Perfect Order, the indicator automatically draws TP1, TP2, and SL lines based on the distance between the current close price and MA144.
LONG TRADE SETUP
• Entry: Current close price when 🚀 BUY fires
• TP1: Entry + (Entry − MA144) × 0.5
• TP2: Entry + (Entry − MA144) × 1.0
• Stop Loss: MA144 × 0.998 (just below MA144)
SHORT TRADE SETUP
• Entry: Current close price when 🚀 SELL fires
• TP1: Entry − (MA144 − Entry) × 0.5
• TP2: Entry − (MA144 − Entry) × 1.0
• Stop Loss: MA144 × 1.002 (just above MA144)
💡 TP/SL Management Tip: Take partial profit at TP1 (50% of position), then move your Stop Loss to breakeven. Let the remaining 50% run toward TP2. Exit fully if the ribbon loses Perfect Order before TP2 is reached.
07. Customizable Settings
All inputs are in the Settings panel (gear icon). Here's what you can change and what each setting does:
📊 RIBBON MAs — Moving Average Settings
• MA 1–8 Length: Default lengths are Fibonacci (5 to 144). You can adjust these, but the Fibonacci sequence is recommended for Gold.
• MA 1–8 Type: Choose between EMA, SMA, WMA, or HMA. Default is EMA.
• MA 1–8 Width: Line thickness. Increase to 2–3 for larger screens.
• Show MA 1–8: Toggle visibility of individual MAs to reduce visual clutter.
🎨 RIBBON FILL — Color Settings
• Use Dynamic Trend Colors: When ON, all MA lines turn green in a bull trend and red in a bear trend. Highly recommended.
• Bullish / Bearish / Neutral Fill: Customize the fill color for each market state.
🎯 SIGNALS — Signal Display Settings
• Show Signals: Master toggle for all buy/sell markers.
• Show TP/SL Lines: Toggle the automatic Take Profit and Stop Loss lines on the right side of the chart.
• TP/SL Label Size: Default is Tiny to keep the chart clean.
💥 SQUEEZE DETECTION
• Show Squeeze Markers: Toggle the orange diamond markers.
• Squeeze Sensitivity: Range 0.1 to 0.9. Default is 0.4. For volatile Gold sessions, 0.35–0.45 works best.
🏷️ TREND LABELS
• Show Labels: Toggle the live trend label indicating the current market state.
08. Trading the Squeeze — Gold's Secret Weapon
Gold (XAUUSD) is notorious for long periods of low-volatility consolidation followed by explosive breakouts. The Squeeze Detection in Gold Ribbon is designed specifically to catch these moments.
1. Ribbon compresses → Orange diamonds appear: The ribbon width drops below 40% of its 50-bar average. Gold is coiling. Stand aside. Do not chase price in this state.
2. Ribbon begins expanding → "Expanding" crossover fires: The ribbon width crosses back above the threshold. Watch which direction price moves and whether Perfect Order is forming.
3. 🚀 High Probability signal fires: If Perfect Order locks in right after an expansion, a High Probability label appears. Enter with full conviction.
4. Manage with TP1 → Breakeven → TP2: Use the auto-drawn TP/SL lines. Scale out at TP1, protect the rest, and target TP2 while the ribbon holds Perfect Order.
09. Setting Up Alerts
Gold Ribbon fires three built-in alerts you can activate in PulseWire. Right-click the indicator name on the chart → Add Alert on Gold Ribbon V1.00.
• 🟢 BUY Signal: Fires once per bar when a Buy condition triggers.
• 🔴 SELL Signal: Fires once per bar when a Sell condition triggers.
• ⚠️ SQUEEZE Alert: Fires when the ribbon enters compression for the first time.
📱 Mobile Alert Tip: Set alerts to Push Notification on your PulseWire account. This way Gold Ribbon notifies your phone instantly when a squeeze starts or a High Probability signal fires.
10. Best Practices for Gold Trading
✅ Do This: Use on 15M or 1H charts only. Only trade in the direction of Perfect Order. Prioritize 🚀 High Prob signals. Wait for squeeze expansion before entering. Always use the auto-generated SL level.
❌ Avoid This: Trading during CHOPPY state. Entering against the ribbon direction. Ignoring the SL line. Using on daily/weekly timeframes without recalibrating lengths. Fighting a strong ribbon trend.
⚠️ Timeframe Warning: If you use an intraday timeframe above 1H, the indicator will display a red warning banner at the top-left of the chart. The default MA lengths are calibrated for scalping and intraday sessions. For swing trading on higher timeframes, consider increasing MA lengths proportionally.
Indicator

Institutional Decision Engine [JOAT]Institutional Decision Engine
Introduction
The Institutional Decision Engine is a comprehensive, unified trading system that integrates six distinct analytical engines into a cohesive decision-making framework. This is not just another indicator - it's a complete trading intelligence system designed to replicate the analytical approach of institutional trading desks. By combining market regime classification, structural analysis, momentum pressure, volatility intelligence, directional bias, and signal qualification into one unified system, this engine provides the holistic market analysis that professional traders rely on for consistent success.
This tool is built for serious traders who understand that successful trading requires multiple layers of analysis and confirmation. Whether you're a systematic trader needing a complete decision framework, a discretionary trader seeking comprehensive market intelligence, or an algorithm developer requiring robust signal generation, this engine provides the institutional-grade analysis needed to trade with the confidence and precision of professional market participants.
Why This Engine Exists
Most traders use fragmented indicators that provide conflicting signals, leading to confusion and poor decisions. This engine solves that fundamental problem by:
Unified Framework: Six engines working together as one cohesive system
Regime-Adaptive Logic: Automatically adjusts analysis based on market conditions
Multi-Layer Confirmation: Requires confluence across multiple analytical dimensions
Signal Qualification: Objectively scores and grades every potential signal
Risk Intelligence: Dynamic risk management based on market volatility and structure
Visual Clarity: Comprehensive visualization of all analytical components
The engine transforms the chaotic world of multiple indicators into a single, unified source of market truth that provides clear, actionable trading intelligence.
Core Components Explained
Engine 1: Market Regime Classification
The first engine identifies the current market environment:
// Regime Classification: 0=Neutral, 1=Trending, 2=Ranging, 3=Volatile
int market_regime = 0
if volatility_state == 1 and adx_value < i_trend_threshold
market_regime := 3 // Volatile Expansion
else if adx_value >= i_trend_threshold
market_regime := 1 // Trending
else if volatility_state == -1
market_regime := 2 // Ranging/Consolidation
// Regime Strength (0-100)
float regime_strength = 0.0
if market_regime == 1
regime_strength := math.min(adx_value / 50.0 * 100, 100)
else if market_regime == 2
regime_strength := math.min((1 - volatility_ratio) / (1 - i_contraction_mult) * 100, 100)
Regime types:
Trending: Strong directional markets with ADX > 25
Ranging: Low volatility consolidation phases
Volatile: High volatility, chaotic conditions
Neutral: Transition periods between defined states
Regime Strength: How strongly the market exhibits regime characteristics
Regime classification determines which strategies are appropriate and how risk should be managed.
Engine 2: Structural Behavior Analysis
The second engine maps market structure and key levels:
// Structure Analysis
bool higher_high = not na(last_swing_high) and not na(prev_swing_high) and last_swing_high > prev_swing_high
bool lower_low = not na(last_swing_low) and not na(prev_swing_low) and last_swing_low < prev_swing_low
bool higher_low = not na(last_swing_low) and not na(prev_swing_low) and last_swing_low > prev_swing_low
bool lower_high = not na(last_swing_high) and not na(prev_swing_high) and last_swing_high < prev_swing_high
// Structure Score (0-100)
float structure_score = 0.0
structure_score += structure_bias == 1 ? 30 : structure_bias == -1 ? 0 : 15
structure_score += higher_high ? 20 : lower_low ? 0 : 10
structure_score += bos_bullish ? 30 : bos_bearish ? 0 : 15
Structure components:
Swing Points: Key highs and lows defining market structure
Market Structure: Higher highs/higher lows (bullish) or lower highs/lower lows (bearish)
Break of Structure: Confirmation of trend changes
Liquidity Zones: Equal highs/lows where orders cluster
Structure Score: Quantifies structural quality (0-100)
Structural analysis identifies the levels where professional traders place orders.
Engine 3: Momentum Pressure Analysis
The third engine measures buying and selling pressure:
// Composite Momentum Score
float momentum_bull_score = 0.0
momentum_bull_score += wt_bullish ? 25 : 0
momentum_bull_score += rsi_bullish ? 25 : 0
momentum_bull_score += weighted_pressure > 0.1 ? 25 : weighted_pressure > 0 ? 12.5 : 0
momentum_bull_score += macd_bullish ? 25 : 0
// Net Momentum State
float net_momentum = momentum_bull_score - momentum_bear_score
int momentum_state = net_momentum > 25 ? 1 : net_momentum < -25 ? -1 : 0
Momentum components:
WaveTrend: Trend-following momentum oscillator
RSI: Relative strength with momentum filter
Pressure Analysis: Volume-weighted buying/selling pressure
MACD: Trend acceleration and deceleration
Momentum State: Bullish, bearish, or neutral momentum
Momentum analysis confirms the strength and timing of potential moves.
Engine 4: Volatility Intelligence Layer
The fourth engine analyzes volatility cycles and squeezes:
// Squeeze Detection
bool squeeze_on = bb_lower > kc_lower and bb_upper < kc_upper
bool squeeze_off = bb_lower < kc_lower or bb_upper > kc_upper
// Volatility Cycle Phase
int vol_cycle_phase = 0
if squeeze_on and squeeze_duration > 5
vol_cycle_phase := 1 // Compression
else if squeeze_off and squeeze_duration > 0
vol_cycle_phase := 2 // Expansion Trigger
else if volatility_ratio > 1.2
vol_cycle_phase := 3 // Active Expansion
// Adaptive Multipliers
float stop_multiplier = vol_cycle_phase == 3 ? 1.5 : vol_cycle_phase == 1 ? 0.8 : 1.0
float target_multiplier = vol_cycle_phase == 3 ? 1.3 : vol_cycle_phase == 1 ? 1.5 : 1.0
Volatility components:
Bollinger Bands: Standard deviation-based volatility
Keltner Channels: ATR-based volatility
Squeeze Detection: Volatility compression patterns
Cycle Phases: Compression, trigger, expansion, normal
Adaptive Multipliers: Dynamic risk adjustments
Volatility intelligence ensures risk management adapts to market conditions.
Engine 5: Directional Bias Model
The fifth engine establishes directional conviction:
// Bias Computation
float bullish_bias = 0.0
bullish_bias += ma_bullish_stack ? 30 : 0
bullish_bias += price_above_structure ? 20 : 0
bullish_bias += close > ma_anchor ? 15 : 0
bullish_bias += pos_di > neg_di ? 20 : 0
bullish_bias += slopes_aligned_bull ? 15 : 0
// Net Bias
float net_bias = bullish_bias - bearish_bias
int bias_direction = net_bias > i_bias_threshold / 2 ? 1 : net_bias < -i_bias_threshold / 2 ? -1 : 0
Bias components:
MA Stack: Fast/slow/anchor moving average relationships
Price Position: Where price sits relative to MAs
ADX Direction: +DI vs -DI for trend confirmation
MA Slopes: Directional momentum of moving averages
Bias Strength: 0-100 indicating directional conviction
Directional bias provides the primary directional framework for trading decisions.
Engine 6: Signal Qualification System
The sixth engine evaluates and qualifies all signals:
// Confluence Scoring
int bull_confluence = 0
bull_confluence += market_regime == 1 and trend_direction == 1 ? 2 : 0
bull_confluence += structure_bias == 1 ? 1 : 0
bull_confluence += bos_bullish ? 1 : 0
bull_confluence += momentum_state == 1 ? 2 : 0
bull_confluence += bias_direction == 1 ? 2 : 0
bull_confluence += squeeze_off and net_momentum > 0 ? 1 : 0
// Qualification Check
bool bull_qualified = bull_confluence >= i_min_confluence
bool bear_qualified = bear_confluence >= i_min_confluence
// Final Signal Generation
bool long_signal = bull_qualified and bull_trigger and bars_since_bull > i_signal_cooldown and
bar_confirmed and market_regime != 3
Qualification components:
Confluence Score: Points from each engine (max 10)
Minimum Threshold: Required confluence for signals (default: 5)
Signal Triggers: Entry conditions (crossovers, breakouts, etc.)
Cooldown Management: Prevents overtrading
Quality Grades: A-D grades based on confluence score
Signal qualification ensures only high-probability setups are traded.
Visual Elements
Directional Cloud: Dynamic cloud showing trend and conviction
Signal Markers: Clear entry signals with quality grades
Risk Levels: Visual stop loss and target levels
Structure Points: Marked swing highs and lows
Squeeze Background: Volatility compression indication
Signal Background: Signal strength background shading
Moving Averages: Color-coded MA system
Dashboard: Comprehensive intelligence panel
The dashboard displays:
1. Current market regime and strength
2. Trend direction and bias scores
3. Momentum state and pressure readings
4. Volatility cycle and squeeze status
5. Structure analysis and bias
6. Signal qualification and grade
7. Risk metrics and multipliers
8. Active position information
Input Parameters
Regime Engine:
ADX Period: Trend strength calculation (default: 14)
Trend Threshold: Minimum ADX for trend (default: 25)
Volatility Multipliers: Expansion/contraction thresholds
Structure Engine:
Swing Sensitivity: Pivot detection sensitivity (default: 10)
Structure Confirmation: Bars for confirmation (default: 3)
Show Liquidity: Display liquidity zones
Momentum Engine:
Pressure Period: Pressure calculation (default: 14)
WaveTrend Settings: Channel and average periods
RSI Period: Momentum oscillator (default: 14)
Volatility Layer:
Bollinger Settings: Period and deviation
Keltner Settings: Period and multiplier
Adaptive Stops: Enable dynamic stops
Signal Qualification:
Minimum Confluence: Required score (default: 5)
Signal Cooldown: Bars between signals (default: 5)
Minimum R:R: Risk/reward requirement (default: 1.5)
How to Use This Engine
Step 1: Understand Market Regime
Check the dashboard for current regime. Avoid trading in volatile regimes (red), focus on trending regimes (green), and adapt strategy for ranging regimes (purple).
Step 2: Assess Directional Bias
Look for strong bias scores (>60) with MA stack confirmation. The bias should be clear across multiple components before considering entries.
Step 3: Confirm Momentum
Ensure momentum supports the directional bias. Look for pressure in the direction of trade and momentum acceleration.
Step 4: Verify Structure
Entries near structural levels have higher probability. Look for BOS confirmation and avoid trading against established structure.
Step 5: Check Volatility
Be aware of volatility cycles. Squeeze releases offer high-probability breakout opportunities. Adjust stops based on volatility multipliers.
Step 6: Qualify Signals
Only take signals with 5+ confluence points. A-grade signals (8+ points) offer the highest probability and deserve larger position sizing.
Best Practices
Always trade in the direction of the dominant bias
Higher confluence scores mean higher probability setups
Respect regime changes - they signal strategy adjustments
Use the directional cloud as primary trend guidance
Place stops using the volatility-adjusted levels
Scale out at multiple targets as provided
Avoid trading during volatile regimes unless experienced
Wait for A-grade setups rather than forcing mediocre trades
Keep a trade journal tracking regime/bias combinations
Never override the system's risk management without strong reason
Strategy Integration
This engine is a complete trading system:
Use signal qualification as primary entry filter
Apply regime-based position sizing
Import bias scores for trend confirmation
Use structure levels for stop placement
Integrate volatility multipliers for risk management
Export all engine outputs for custom strategies
Technical Implementation
Built with Pine Script v6 featuring:
Six-engine architecture with unified signal processing
Advanced regime detection with ADX/ATR analysis
Comprehensive structure analysis with swing detection
Multi-factor momentum scoring system
Volatility cycle analysis with squeeze detection
Directional bias calculation with multiple confirmations
Signal qualification with confluence scoring
Dynamic risk management with adaptive multipliers
Comprehensive visualization with directional cloud
Real-time dashboard with 12 key metrics
Export functions for complete system integration
The code uses confirmed bars throughout to prevent repainting and ensure reliable signals.
Originality Statement
This engine is original in its comprehensive integration of six distinct analytical systems into a unified decision framework. While individual components (ADX, moving averages, RSI, etc.) are established tools, this engine is justified because:
It synthesizes six independent analytical engines into one cohesive system
The regime-adaptive logic automatically adjusts behavior based on market conditions
Signal qualification provides objective, numerical evaluation of trade quality
The directional cloud visualization offers intuitive trend analysis
Dynamic risk management adapts to volatility and structure
Comprehensive dashboard presents all critical metrics in one view
Each engine contributes unique insights: regime shows when to trade, structure shows where, momentum shows timing, volatility shows how much, bias shows direction, and qualification shows quality
The engine solves the real problem of indicator overload and conflicting signals
Export functions enable complete system integration and customization
This is institutional-grade analysis typically available only to professional traders
The engine's value lies in providing a complete, unified trading intelligence system that eliminates analysis paralysis and provides clear, actionable signals based on comprehensive market analysis.
Disclaimer
This engine is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. This is a comprehensive analysis tool, not a guaranteed profit system.
Even with comprehensive analysis, markets can behave unpredictably due to news events, economic data, or changes in market structure. Past performance of the system does not guarantee future results. The engine's signals are mathematical calculations based on historical patterns and should be used with proper risk management.
Always use stop losses and position sizing appropriate for your account size and risk tolerance. Never risk more than you can afford to lose on any single trade, regardless of signal quality or confluence score.
The author is not responsible for any losses incurred from using this engine. Users assume full responsibility for all trading decisions made using this system.
-Made with passion by officialjackofalltrades
Indicator

Indicator

Indicator

Adaptive Hull Momentum Ribbon [JOAT]Adaptive Hull Momentum Ribbon
Introduction
The Adaptive Hull Momentum Ribbon is an open-source trend-following indicator that combines a 5-layer Hull Moving Average (HMA) ribbon with EMA cloud analysis, key moving averages (SMA 50/200, EMA 200), crossover detection, and comprehensive trend strength analytics. This mashup creates a multi-layered trend identification system designed to show not just trend direction, but trend quality, alignment across multiple timeframes, and confluence between different moving average methodologies.
The indicator addresses a fundamental challenge in trend trading: single moving averages provide limited information about trend strength and quality. By layering five HMAs with different periods, adding an EMA cloud for short-term momentum, and tracking alignment with key institutional moving averages, this tool provides a complete picture of trend health that helps traders distinguish between strong trends worth following and weak trends likely to fail.
Chart showing 5-layer HMA ribbon, EMA cloud, and key MAs with trend dashboard on D timeframe
Why This Mashup Exists
This indicator combines four moving average frameworks that complement each other:
Hull Moving Average Ribbon: 5 HMAs (8, 13, 21, 34, 55) providing smooth, responsive trend indication
EMA Cloud: Fast (9) and Slow (21) EMAs showing short-term momentum
Key Institutional MAs: SMA 50, SMA 200, EMA 200 tracked by institutions globally
Crossover Detection: Golden Cross, Death Cross, and HMA crossovers
Each component serves a specific purpose: HMA Ribbon shows trend with minimal lag, EMA Cloud captures short-term momentum shifts, Key MAs provide institutional reference levels, and Crossovers signal major trend changes. Together, they create a comprehensive trend analysis system that shows both micro (HMA/EMA) and macro (SMA 50/200) trend structure.
The mashup is justified because these moving average types use fundamentally different calculations (weighted moving average with square root period for HMA, exponential weighting for EMA, simple average for SMA) that respond to price changes differently. When they align, it indicates genuine trend strength across multiple calculation methods and timeframes.
Core Components Explained
1. Hull Moving Average Ribbon System
HMA calculation provides smooth, responsive moving averages with reduced lag:
// Hull Moving Average formula
hullMA(src, length) =>
wma1 = ta.wma(src, length / 2)
wma2 = ta.wma(src, length)
ta.wma(2 * wma1 - wma2, int(math.sqrt(length)))
// 5-layer ribbon
hma8 = hullMA(close, 8) // Fastest, most responsive
hma13 = hullMA(close, 13)
hma21 = hullMA(close, 21) // Medium-term trend
hma34 = hullMA(close, 34)
hma55 = hullMA(close, 55) // Slowest, smoothest
HMA advantages over traditional MAs:
Significantly reduced lag compared to SMA/EMA
Smooth line without excessive whipsaws
Responsive to price changes while filtering noise
Square root period weighting provides optimal balance
Ribbon interpretation:
Full Bullish Alignment: HMA8 > HMA13 > HMA21 > HMA34 > HMA55 = strong uptrend
Full Bearish Alignment: HMA8 < HMA13 < HMA21 < HMA34 < HMA55 = strong downtrend
Mixed Alignment: HMAs crossing or intertwined = weak trend or consolidation
Ribbon Width: Wide ribbon = strong trend, narrow ribbon = weak trend
The indicator plots all 5 HMAs with gradient coloring (green to red) and fills between them to create visual ribbon effect.
2. EMA Cloud System
Fast and slow EMAs create a cloud showing short-term momentum:
emaFast = ta.ema(close, 9) // Short-term momentum
emaSlow = ta.ema(close, 21) // Medium-term trend
// Cloud color
emaCloudBullish = emaFast > emaSlow
emaCloudBearish = emaFast < emaSlow
EMA Cloud significance:
Fast EMA above Slow EMA = bullish momentum
Fast EMA below Slow EMA = bearish momentum
Cloud acts as dynamic support/resistance
Cloud thickness indicates momentum strength
Price above cloud = bullish, below cloud = bearish
The indicator fills the area between fast and slow EMAs with color based on direction (green for bullish, red for bearish).
3. Key Institutional Moving Averages
Three widely-watched institutional moving averages:
sma50 = ta.sma(close, 50) // Short-term institutional trend
sma200 = ta.sma(close, 200) // Long-term institutional trend
ema200 = ta.ema(close, 200) // Alternative long-term trend
// Golden Cross / Death Cross
goldenCross = sma50 > sma200 // Bullish long-term
deathCross = sma50 < sma200 // Bearish long-term
Key MA significance:
SMA 50: Short-term institutional trend, strong support/resistance
SMA 200: Most watched long-term trend indicator globally
EMA 200: More responsive alternative to SMA 200
Golden Cross: SMA 50 crosses above SMA 200 = major bullish signal
Death Cross: SMA 50 crosses below SMA 200 = major bearish signal
These MAs are plotted with distinct colors and act as major support/resistance levels.
4. Comprehensive Crossover Detection
The indicator detects multiple types of crossovers:
// Golden Cross / Death Cross (major signals)
goldenCross = ta.crossover(sma50, sma200)
deathCross = ta.crossunder(sma50, sma200)
// EMA Cloud crossovers (momentum shifts)
emaBullCross = ta.crossover(emaFast, emaSlow)
emaBearCross = ta.crossunder(emaFast, emaSlow)
// HMA fast crossovers (early trend changes)
hmaFastBullCross = ta.crossover(hma8, hma13)
hmaFastBearCross = ta.crossunder(hma8, hma13)
Crossover hierarchy:
Golden/Death Cross: Major long-term trend changes (rare, very significant)
EMA Crossovers: Medium-term momentum shifts (moderate frequency)
HMA Crossovers: Short-term trend changes (frequent, early signals)
The indicator marks crossovers with shapes: circles for Golden/Death Cross, triangles for EMA crossovers, diamonds for HMA crossovers.
5. Trend Strength Analytics
Comprehensive trend strength calculation:
// Calculate alignment score
alignmentScore = 0
alignmentScore := (close > hma8 ? 1 : -1) +
(close > hma13 ? 1 : -1) +
(close > hma21 ? 1 : -1) +
(close > hma34 ? 1 : -1) +
(close > hma55 ? 1 : -1) +
(close > emaFast ? 1 : -1) +
(close > emaSlow ? 1 : -1) +
(close > sma50 ? 1 : -1) +
(close > sma200 ? 1 : -1)
// Normalize to 0-100 scale
trendStrength = (alignmentScore + 9) / 18 * 100
Trend Strength interpretation:
75-100: STRONG BULL - price above all MAs, high-quality uptrend
55-74: BULL - price above most MAs, moderate uptrend
45-54: NEUTRAL - mixed signals, no clear trend
26-44: BEAR - price below most MAs, moderate downtrend
0-25: STRONG BEAR - price below all MAs, high-quality downtrend
Example showing full HMA alignment with 55% trend strength score
Confluence Scoring System
The indicator calculates a confluence score showing agreement between different MA systems:
Confluence Score Components:
- HMA Trend: +3 if full alignment, 0 if mixed, -3 if opposite
- EMA Cloud: +2 if bullish, -2 if bearish
- Price vs SMA 50: +1 if above, -1 if below
- Price vs SMA 200: +2 if above, -2 if below
- SMA 50 vs 200: +2 if golden cross, -2 if death cross
Total Range: -10 to +10
Confluence interpretation:
+8 to +10: STRONG confluence - all systems aligned bullish
+5 to +7: MODERATE confluence - most systems bullish
-4 to +4: WEAK confluence - mixed or conflicting signals
-7 to -5: MODERATE confluence - most systems bearish
-10 to -8: STRONG confluence - all systems aligned bearish
Enhanced Dashboard System
The dashboard (top-right position) displays 9 rows:
Row 1: MA System header
Row 2: Trend classification (STRONG BULL/BULL/NEUTRAL/BEAR/STRONG BEAR)
Row 3: Trend Strength percentage (0-100%)
Row 4: HMA Alignment status (Bullish/Bearish/Mixed)
Row 5: EMA Cloud status (Bullish/Bearish)
Row 6: Price vs 200 MA (Above/Below)
Row 7: 50 vs 200 MA (Golden/Death)
Row 8: Confluence score (-10 to +10)
Row 9: Confluence strength (STRONG/MODERATE/WEAK)
Dashboard showing trend metrics with color-coded confluence score
Visual Elements
HMA Ribbon: 5 HMA lines with gradient coloring (green to red) and fills between lines
EMA Cloud: Filled area between fast and slow EMAs with transparency
SMA 50: Blue line (short-term institutional trend)
SMA 200: Orange line (long-term institutional trend)
EMA 200: Purple line (alternative long-term trend)
Golden/Death Cross Markers: Large circles at major crossovers
EMA Cross Markers: Small triangles at EMA crossovers
HMA Cross Markers: Tiny diamonds at HMA crossovers
Dashboard: Comprehensive table with all trend metrics
How Components Work Together
The mashup creates layered trend analysis:
Layer 1 - Micro Trend: HMA 8/13 crossovers show earliest trend changes
Layer 2 - Short-Term Momentum: EMA cloud shows momentum direction
Layer 3 - Medium-Term Trend: HMA 21/34/55 ribbon shows established trend
Layer 4 - Institutional Trend: SMA 50/200 show long-term institutional bias
Layer 5 - Synthesis: Trend strength and confluence scores combine all layers
Example scenario: HMA 8 crosses above HMA 13 (Layer 1), EMA cloud turns bullish (Layer 2), all 5 HMAs align bullish (Layer 3), price is above SMA 50 and SMA 200 in golden cross (Layer 4). Trend strength reaches 92% and confluence score is +9 (Layer 5), signaling extremely strong uptrend with all systems aligned.
Input Parameters
HMA Ribbon Settings:
Show HMA Ribbon: Toggle ribbon display (default: enabled)
HMA 1 Length: Fastest HMA (default: 8)
HMA 2 Length: (default: 13)
HMA 3 Length: (default: 21)
HMA 4 Length: (default: 34)
HMA 5 Length: Slowest HMA (default: 55)
EMA Cloud Settings:
Show EMA Cloud: Toggle cloud display (default: enabled)
Fast EMA: Short-term EMA (default: 9)
Slow EMA: Medium-term EMA (default: 21)
Cloud Transparency: Adjust fill transparency (default: 85)
Key MA Settings:
Show SMA 50: Toggle SMA 50 (default: enabled)
Show SMA 200: Toggle SMA 200 (default: enabled)
Show EMA 200: Toggle EMA 200 (default: enabled)
Crossover Settings:
Show Crossovers: Toggle crossover markers (default: enabled)
Show Golden/Death Cross: Major crossovers (default: enabled)
Show EMA Crossovers: EMA cloud crossovers (default: enabled)
Show HMA Crossovers: HMA fast crossovers (default: enabled)
Display Options:
Show Trend Strength: Toggle dashboard (default: enabled)
Ribbon Transparency: Adjust HMA fill transparency (default: 70)
Dashboard Position: Top-right, top-left, etc.
Color Theme: Choose color scheme
How to Use This Indicator
Step 1: Check HMA Ribbon Alignment
Look for full alignment (all 5 HMAs in order). Full alignment indicates strong, high-quality trend worth following.
Step 2: Verify EMA Cloud Direction
Ensure EMA cloud supports HMA direction. Bullish HMA + bullish EMA cloud = strong confirmation.
Step 3: Check Key MA Position
Verify price is above SMA 50 and SMA 200 for long trades, below for short trades. Golden Cross adds significant bullish weight.
Step 4: Review Trend Strength
Check dashboard trend strength percentage. Above 70% indicates strong trend, below 40% suggests caution.
Step 5: Assess Confluence Score
Review confluence score. Scores above +7 indicate strong multi-system alignment. Scores near 0 suggest mixed signals.
Step 6: Watch for Crossovers
Monitor crossover markers. Golden/Death Cross are major signals. HMA crossovers provide early trend change warnings.
Best Practices
Use on 1-hour to daily timeframes for optimal trend identification
Full HMA alignment (5/5) produces highest-quality trend-following opportunities
EMA cloud acts as dynamic support/resistance - use for entry refinement
Golden Cross with full HMA alignment = extremely strong bullish setup
Trend strength above 80% suggests strong trend continuation potential
Confluence score above +8 indicates rare, high-probability trend alignment
HMA crossovers provide early warnings but confirm with other layers
Wide ribbon spacing indicates strong momentum, narrow spacing suggests consolidation
Combine with price action and key levels for precise entries
Indicator Limitations
Moving averages are lagging indicators - trends confirmed after they've started
HMA crossovers can produce false signals in choppy markets
Full alignment is rare - waiting only for perfect setups may miss opportunities
Trend strength can remain high even as trend is ending
Golden/Death Cross signals are very lagging (occur well after trend change)
Multiple MAs can clutter chart - adjust display settings as needed
Confluence score is mathematical calculation, not prediction
Strong trends can reverse suddenly despite high trend strength scores
Requires understanding of moving average concepts for effective use
Technical Implementation
Built with Pine Script v6 using:
Custom Hull Moving Average calculation with WMA and square root period
5-layer HMA ribbon with gradient fills
EMA cloud with dynamic coloring
Key institutional MA tracking (SMA 50/200, EMA 200)
Multiple crossover detection systems
Comprehensive trend strength algorithm
Confluence scoring with weighted components
9-row dashboard with real-time metrics
Alert conditions for all major crossovers
The code is fully open-source and can be modified to adjust MA periods, colors, and dashboard layout.
Originality Statement
This indicator is original in its multi-layer moving average integration approach. While individual components (HMA, EMA cloud, SMA 50/200, crossovers) are established tools, this mashup is justified because:
It combines three different MA calculation methods (HMA, EMA, SMA) that respond differently to price
5-layer HMA ribbon provides granular trend quality assessment
Trend strength algorithm quantifies alignment across all 9 moving averages
Confluence scoring shows agreement between different MA systems
Integration of micro (HMA/EMA) and macro (SMA 50/200) trend perspectives
Comprehensive dashboard presents complex multi-MA data clearly
Each MA type contributes unique information: HMAs provide responsive trend indication with minimal lag, EMAs show short-term momentum, and SMAs provide institutional reference levels. The mashup's value lies in showing when these different calculation methods align, indicating genuine trend strength across multiple mathematical approaches and timeframes.
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 and is not suitable for all investors.
Moving averages are lagging indicators that confirm trends after they've begun. They do not predict future price movement. Strong trends can reverse suddenly, and high trend strength scores do not guarantee trend continuation. Golden Cross and Death Cross signals are very lagging and trends may be well-established before these signals occur.
The trend strength and confluence scores are mathematical calculations based on current MA positions, not predictions of future price movement. Past trend strength does not guarantee future performance. Market conditions change, and trends that appear strong can reverse without warning.
Always use proper risk management, including stop losses and position sizing appropriate for your account size and risk tolerance. Never risk more than you can afford to lose. Consider consulting with a qualified financial advisor before making investment decisions.
The author is not responsible for any losses incurred from using this indicator. Users assume full responsibility for all trading decisions made using this tool.
-Made with passion by officialjackofalltrades Indicator
