Price Simplification [LuxAlgo]The Price Simplification indicator provides a streamlined representation of price action by reducing complex market movements into essential trend segments using the Ramer-Douglas-Peucker (RDP) algorithm.
This indicator calculates its output based on a fixed window of historical data. Consequently, the line segments are displayed retrospectively and are subject to repainting as new bars develop and the calculation window shifts.
🔶 USAGE
The indicator is designed to help traders identify the core structure of price movement by filtering out "noise"—small fluctuations that do not significantly impact the overall trend. By simplifying the price into a series of connected segments, it becomes easier to visualize support/resistance levels, trend slopes, and market geometry.
Users can adjust the level of simplification to suit their needs:
A lower ATR Multiplier will result in a line that follows price closely, capturing more minor swings.
A higher ATR Multiplier will produce a more aggressive simplification, highlighting only the most significant market turns.
🔹 Extension Line
The script includes an "Extend Last Segment" feature. When enabled, it projects the trajectory of the final simplified segment into the future using a dashed line. This projection begins one bar after the most recent data point, providing a visual guide for the current price momentum without overlapping the historical simplification.
🔶 DETAILS
The core logic of this tool relies on the Ramer-Douglas-Peucker (RDP) algorithm, a classic algorithm used in computer graphics and cartography to reduce the number of points in a curve.
The algorithm works through an iterative process:
It starts with a line segment connecting the first and last points of the lookback window.
It identifies the point between these two ends that is furthest from the segment (perpendicular distance).
If this maximum distance is greater than a specified threshold, that point is kept as a "key point," and the algorithm splits the segment into two parts, repeating the process for each.
If no point is further than the threshold, all intermediate points are discarded, and the segment remains a straight line.
To ensure the simplification remains consistent across different assets and timeframes, the script normalizes price coordinates using the Average True Range (ATR) . This means the threshold for keeping a point is relative to the current market volatility rather than a fixed price value.
🔶 SETTINGS
Window Size : The number of recent bars used to apply the RDP algorithm to.
ATR Multiplier : The sensitivity of the simplification. Higher values lead to fewer segments and a simpler line.
ATR Length : The period used to calculate the ATR for price normalization.
Line Color : The color of the simplified polyline.
Line Width : The thickness of the polyline and extension.
Extend Last Segment : When enabled, projects the slope of the final segment forward as a dashed line starting one bar after the last point.
Indicator

Indicator

Indicator

MASU+ v7.2 (NW+ELM+BOS)# MASU+ v7.2 — Institutional Multi-Strategy Framework (NW + ELM + BOS)
## Overview
MASU+ v7.2 is an advanced multi-strategy trading system that combines institutional-grade Smart Money Concepts (SMC), machine learning signal filtering, and adaptive risk management into a single unified framework. The strategy is designed for intraday and swing trading across forex, indices, and commodities.
The core philosophy is **high-confluence entries only** — every trade must pass through multiple independent filters before execution, ensuring that only the strongest setups are taken.
---
## Key Components
### 1. Nadaraya-Watson Kernel Ribbon
An 8-line non-parametric regression ribbon built on a Fibonacci bandwidth grid (3, 5, 8, 13, 21, 34, 55, 89). The ribbon acts as a dynamic trend filter with three operating modes:
- **Strict** — all 8 lines must be perfectly ordered
- **Relaxed** — a configurable threshold of ordered pairs (default 6/7)
- **Expansion** — ribbon width is increasing in the trend direction
The bandwidth can operate in **Fixed** or **Adaptive** mode. In Adaptive mode, bandwidth auto-scales based on ATR-normalized volatility, making the ribbon more responsive in volatile conditions and smoother in calm markets.
### 2. ELM Neural Filter (Extreme Learning Machine)
A lightweight online-learning neural network that trains in real time on 7 normalized features:
- RSI, Rate of Change, Distance from EMA 200, ADX, NW Kernel Slope, Ribbon Order Score, and Relative Volume
The ELM predicts price direction over a configurable lookahead window (default: 5 bars) and outputs a probability score (0–1). Key v7.2 improvements include:
- **Weight decay regularization** to prevent parameter drift
- **Real-time accuracy calibration** — the ELM tracks its own prediction accuracy and adjusts its voting weight accordingly. An ELM with <50% accuracy effectively gets silenced.
- The ELM can act as a soft vote (bonus confluence), a hard blocker, or influence position sizing — all configurable.
### 3. Smart Money Concepts (SMC)
Full institutional order flow toolkit:
- **Order Blocks** — bullish/bearish engulfing patterns with body-to-range ratio filtering
- **Fair Value Gaps (FVG)** — imbalance detection with ATR-scaled minimum size
- **Liquidity Sweeps** — stop hunt detection at recent swing highs/lows
- **Break of Structure (BOS)** — pivot-based market structure tracking
- **Demand/Supply Zones** — impulse-based zones that auto-expire when violated
### 4. BOS Immediate Entry (v7.2)
A dedicated scalp-style entry that fires **immediately** when a Break of Structure is detected — no confirmation bars required. Features:
- **TP = 0.75 × ATR** — tight scalp target for quick profit capture
- **Aggressive trailing** — activates at just 0.1 × ATR from entry with a 0.15 × ATR offset
- **Full confluence gate** — BOS entries require the same high confluence score (≥ 7.0) as all other entries, preventing low-quality breakout chasing
### 5. Multi-Timeframe (MTF) Filter
Higher timeframe EMA alignment check (default: 4H). Both fast and slow EMAs on the higher timeframe must agree with the trade direction, and price must be on the correct side of the fast EMA.
### 6. Order Flow Analysis
- **VWAP** with 3 standard deviation bands (±1σ, ±2σ, ±3σ)
- **Cumulative Volume Delta (CVD)** — divergence detection between price and volume delta
- **Volume Profile POC** — Point of Control visualization
---
## Confluence Engine (v7.2)
Every entry — whether trend-following, breakout, mean-reversion, or BOS — must achieve a **minimum weighted confluence score of 7.0** (out of a maximum 7.5 with default weights).
Each filter contributes a configurable weight:
| Filter | Default Weight |
|---|---|
| MTF Alignment | 2.0 |
| NW Ribbon | 1.5 |
| ELM AI | 1.0 (calibration-adjusted) |
| Order Flow | 1.0 |
| Smart Money | 1.0 |
| ADX Trend Strength | 0.5 |
| NW Slope Direction | 0.5 |
| **Total** | **7.5** |
With the default threshold of 7.0, nearly all filters must agree before a trade is placed. This dramatically reduces noise trades and false signals.
---
## Risk Management
### Volatility Regime Adaptation
The strategy classifies the market into 4 regimes and adapts SL/TP accordingly:
| Regime | SL Mult | TP Mult |
|---|---|---|
| High Vol + Trending | 1.5× ATR | 2.5× ATR |
| High Vol + Ranging | 1.2× ATR | 1.8× ATR |
| Low Vol + Trending | 1.5× ATR | 2.5× ATR |
| Low Vol + Ranging | 1.0× ATR | 1.5× ATR |
### Trailing Stop
Configurable trailing stop that activates at 25% of the TP distance (default) with a tight 0.2 × ATR offset. Designed to lock in profits early while giving trades room to breathe.
### Kelly Criterion Sizing
Position size is dynamically calculated using the Kelly formula based on real-time win rate and win/loss ratio, capped at 25% to prevent over-leverage.
### Quality-Based Sizing
Signal confluence score directly affects position size: high-quality setups get full allocation, moderate setups get 80%, and weaker setups get 60%.
### Equity Guard
Automatic circuit breaker that pauses trading after a configurable number of consecutive losses (default: 5) or when drawdown exceeds a threshold (default: 15%). Resumes after a cooldown period to prevent emotional revenge trading.
### Cost-Aware Filter
Estimates total round-trip cost (spread + commission) and blocks entries where ATR is too small relative to trading costs. Prevents churning in low-volatility environments.
---
## Entry Types
1. **Trend Following** — EMA crossover + volume spike + bullish/bearish trend confirmation
2. **Breakout** — New high/low break + volume spike + EMA filter alignment
3. **Mean Reversion** — Bollinger Band extreme + RSI oversold/overbought + ranging regime
4. **BOS Scalp** — Immediate entry on Break of Structure with tight TP and aggressive trailing
All entries require: session filter ✓ | confluence ≥ 7.0 ✓ | R:R check ✓ | cost filter ✓ | equity guard clear ✓ | ELM not blocking ✓
---
## Dashboard
A comprehensive real-time institutional dashboard displays:
- Multi-timeframe trend alignment (15M / 1H / 4H)
- NW Ribbon state and bandwidth scale
- ELM AI probability, accuracy, and confidence weight
- Volatility regime classification
- Order flow and Smart Money signals
- Confluence score with quality rating
- Adapted SL/TP levels with regime multipliers
- Kelly position sizing
- Equity guard status with drawdown tracking
- BOS entry status
- Session detection (London / New York / Asia / Overlap)
- Active demand/supply zone count
---
## What's New in v7.2
- **Confluence threshold raised to 7.0** for all entry types — only the highest-conviction trades are taken
- **BOS immediate entry** — no confirmation bar delay; enters on the breakout candle itself
- **BOS TP = 0.75 × ATR** — tighter scalp target optimized for quick captures with trailing doing the heavy lifting
- **Unified confluence gate** — BOS entries now use the same min_confluence_score as standard entries (no separate hardcoded threshold)
---
## Recommended Settings
- **Timeframe:** 1H (primary), with 4H MTF filter
- **Session:** 09:00–22:00 (covers London + New York)
- **Assets:** Forex majors, Gold (XAUUSD), US indices (NAS100, SPX500)
- **Account:** Works with standard lot sizing; commission and spread inputs should be adjusted to your broker
---
## Disclaimer
This strategy is provided for educational and research purposes. Past performance does not guarantee future results. Always backtest thoroughly and trade with proper risk management. The ELM neural component learns in real time and its accuracy varies across market conditions. Strategy

Indicator

Strategy

Indicator

[CT] Displacement FVG Toolkit Displacement FVG Toolkit is a complete ICT market-structure and execution toolkit designed to help you identify when price is truly repricing, where that repricing left inefficiencies, and how to frame trades with clear context, confirmation, and invalidation. The indicator brings together six institutional-grade concepts into one workflow, Displacement, Fair Value Gaps, Reload Zones, Dealing Range premium and discount, CISD, and Market Structure breaks, so you can stop reacting to random candles and start trading the sequence that professional order flow tends to follow, impulse, imbalance, retrace, and continuation or reversal.
The Displacement tool is the engine that decides whether a candle represents meaningful participation or ordinary noise. Displacement is measured by comparing the current candle’s size to the average candle size over a user-defined lookback. You can choose whether the script uses the candle body size or the full high-to-low range for this calculation. When the candle exceeds the average by your selected displacement factor, it is flagged as displacement. Displacement is important because it is the clearest visible clue that the market has moved from balanced auction to aggressive repricing, which is the environment where inefficiencies form and where your best retest trades are born. In the photo, the yellow bars represent the displacement bars, and the indicator prints Buy and Sell markers on those displacement events. The user also has full control to color displacement bars to a color of their choice, so whether you prefer bright yellow, muted gray, or any custom brand color, you can set the exact bullish and bearish displacement bar colors in the inputs. If you do not want bar coloring at all, you can simply turn off displacement bar coloring and use only the markers.
The Structure Filter is a powerful addition that prevents displacement from becoming “any big candle.” When enabled, the indicator requires the displacement candle to also break recent structure, meaning price must break above a recent high for bullish displacement or below a recent low for bearish displacement. You can decide whether the structure break is judged by a candle close beyond the prior structure level or by a wick that pierces it. Close-based structure breaks are cleaner and generally reduce false positives, while wick-based breaks are more sensitive and can trigger earlier at the cost of more noise. This filter matters because a large candle in the middle of chop is not the same as a large candle that actually breaks a meaningful swing point, and the indicator gives you a way to enforce that distinction mechanically.
The Fair Value Gap tool identifies the most valuable type of imbalance, the three-candle FVG, but it only plots those gaps when they are created by validated displacement. A bullish FVG forms when the current candle’s low is above the high from two candles ago, showing that price skipped a region without fully transacting through it. A bearish FVG forms when the current candle’s high is below the low from two candles ago. These gaps represent unfinished auction, a fast repricing that often leaves behind an inefficiency the market may later revisit to rebalance. You can choose to extend FVGs to the right for a set number of bars so you can see the levels well into the future, or you can keep them confined to the period when they formed. You can also choose whether mitigated FVGs remain visible or are hidden. Mitigation in this script means price has traded back into the gap far enough to invalidate it as an active inefficiency, and when that happens you can either keep it on the chart as historical context or remove it to keep your chart clean. The script also manages object limits by keeping only a user-defined maximum number of FVGs, trimming older ones as needed so the indicator remains stable.
Reload Zones are derived directly from the FVGs and are built for execution. Instead of treating the entire gap as the same, the indicator highlights the portion of the imbalance that most often functions as the highest-quality retest area for continuation entries. For bullish FVGs, the Reload Zone is drawn as the upper portion of the gap, and for bearish FVGs it is drawn as the lower portion, which keeps your focus on the retest region that is closest to the direction of repricing and typically provides tighter invalidation. The indicator also includes an optional Invalidation line that marks the far edge of the full FVG, giving you a clean and consistent “line in the sand” for risk management. The intended use is straightforward, you wait for displacement to print and create an FVG, you allow price to retrace into the Reload Zone, and you look for rejection behavior that confirms responsive participation, such as wicks into the zone that close back out, sharp reaction candles, or structure holding in the direction of the displacement. When price accepts inside the zone with multiple closes and slow grind, that’s often a sign the inefficiency is being repaired rather than defended, and the reload entry loses quality. Because reload zones are tied to displacement-generated FVGs, they naturally filter out weaker imbalances and focus you on the kind created during true repricing.
The Dealing Range tool provides context by defining a rolling high-to-low range over a user-defined lookback, then splitting that range into premium and discount. The indicator plots DR High, DR Low, and a DR Mid 50% line, and can optionally show PD 62% and PD 38% reference levels inside the range. The fill visually highlights premium above the midpoint and discount below it, which helps you avoid the most common retail mistake, buying in premium and selling in discount without a strong reason. The dealing range is not meant to be a rigid “support and resistance box.” It is meant to help you frame location. In general, long ideas have better location when price is in discount or reclaiming the midpoint with momentum, and short ideas have better location when price is in premium or rejecting the midpoint from below. This becomes especially powerful when combined with your other tools, because a bullish displacement and FVG that forms in discount and then holds the reload zone tends to have much better continuation odds than the same pattern forming at the very top of premium into overhead liquidity.
CISD in this indicator is your liquidity-sweep and directional-shift engine, designed to answer a very specific question, did price just take liquidity and then flip orderflow enough to justify a new directional bias. The script first maps swing liquidity using pivot highs and pivot lows over your selected swing period, then tracks when those levels are wicked or mitigated within an expiry window. When a swing high or swing low is taken, the CISD logic watches for the characteristic shift pattern that follows, and when it qualifies it prints a CISD level and establishes a trend state. The “Noise Filter” setting controls how strict the CISD trigger is, higher values reduce noise and produce fewer but more meaningful CISDs, while lower values produce more signals but may include weaker shifts. The indicator also distinguishes between a normal CISD and a stronger CISD that occurs after opposing liquidity was recently wicked within your liquidity lookback, and those stronger events are marked with the directional ▲/▼ symbols so you can immediately recognize when a sweep-and-shift sequence likely occurred instead of a random flip.
A key feature you asked for, and that this indicator includes, is that CISD levels can extend in a very controlled way so you can keep trading them without guessing where the level “ends.” The current timeframe CISD lines are drawn at the origin level and then the script can extend only the most recent X CISD lines out past the current bar by a user-defined number of bars, without creating gaps or redrawing incorrectly. This means your newest CISD levels remain visually “live” and tradable into the immediate future, while older CISDs automatically restore to their original endpoints and behave normally. This is important for execution because it keeps the focus on the levels that are most likely to matter now, while still preserving history without clutter.
The MTF CISD add-on is what gives you institutional alignment, because it allows a higher timeframe CISD to print onto your execution timeframe. The script computes CISD on the selected HTF using request.security and then draws HTF CISD lines on your chart in real time. You can choose “Confirmed HTF only,” which means the HTF CISD only prints when the higher timeframe candle closes, or you can turn confirmation off to see developing HTF CISDs while the HTF candle is still building. The HTF line style is configurable, and the HTF lines can extend to the right so they behave like real mapped levels. The HTF label is also supported and can be pinned to the right edge with an x-offset, so you always know which timeframe the CISD came from without having to guess. Optional HTF markers can print ▲/▼ on the bar where a new HTF CISD event is detected, which gives you a fast “regime shift” alert that pairs extremely well with your displacement and FVG tools.
CISD also includes a candle coloring option so you can visually trade the bias without constantly reading every label. You can keep candle coloring off, turn on an overlay candle layer using plot candle, or use bar color to recolor the native chart candles. The trend that drives candle color can be the current timeframe CISD trend or, if enabled, the HTF CISD trend so your execution timeframe candles reflect the higher timeframe shift. In the combined script, displacement bar coloring still has priority if you leave it enabled, meaning displacement bars will show your displacement color choice first, and the CISD candle coloring will apply where displacement is not overriding. That’s intentional, because displacement bars are “event bars,” while CISD coloring is “state,” and you want to see both without confusion.
In terms of how to use CISD with the rest of this indicator, the cleanest institutional workflow is to treat CISD as the directional context and trigger, and use displacement, FVG, and Reload Zones as the execution framework. A fresh HTF CISD is your “macro shift” that tells you which side is likely building control, then you wait for displacement on your execution timeframe that agrees with that bias and produces an FVG. The Reload Zone becomes your location for entry on the retrace, BOS/CHOCH tells you if structure is truly transitioning or continuing, and your invalidation stays anchored to the far edge of the FVG or the CISD level depending on which is tighter and more structurally meaningful. When CISD and displacement disagree, that’s usually a “stand down or reduce size” condition unless you’re explicitly trading a reversal, because it often means the market is still in rotation or repairing imbalance rather than trending cleanly.
The BOS and CHOCH tool is the structure confirmation layer. The indicator finds swing highs and swing lows using a pivot-based swing length and then plots structure lines at those pivots. Breaks are detected either by close or by wick, based on your setting. BOS, Break of Structure, signals continuation in the current structural regime, while CHOCH, Change of Character, signals a likely regime change. The indicator uses a simple internal state to differentiate BOS from CHOCH, so you can read structure shifts in real time rather than labeling everything as a generic “break.” You can display structure as lines, labels, or both. The lines extend until price breaks them, then they stop at the break so you can visually see exactly where the market transitioned. This module is especially useful for keeping you out of the trap of assuming a pullback is a reversal. If you see displacement and FVGs but no structural confirmation, you can reduce size or wait. If you see a CHOCH that aligns with a displacement shift and then price returns to a reload zone, you have a much higher quality reversal framework.
When you put these tools together, the intended trading workflow becomes a complete narrative. First you identify meaningful movement through displacement, and if you use the structure filter you ensure it is not just a large candle but a break in the auction. That displacement then creates an FVG, the inefficiency left behind by repricing. The Reload Zone marks the most tradable retest area of that inefficiency, and the invalidation line gives you a clear risk boundary. The Dealing Range tells you whether you are taking that setup from a favorable location, discount for longs or premium for shorts. BOS and CHOCH provide the final confirmation layer that tells you whether you are trading continuation or a genuine structural shift. This structure keeps you from chasing breakouts, because it naturally trains you to wait for the pullback into the reload zone and to only participate when price proves acceptance and rejection behavior at the level.
This indicator is built to be flexible. You can run it as a clean displacement plus imbalance tool by focusing on displacement, FVGs, and reload zones, or you can turn it into a full context-and-confirmation system by adding dealing range and BOS/CHOCH. If you want a high-signal, low-noise chart, keep the structure break requirement on, use close-based breaks, limit the number of active gaps, and hide mitigated gaps. If you want more sensitivity and earlier signals, use wick-based breaks and allow more gaps to remain visible. The goal is always the same, to help you see when the market is actually repricing, to mark the price areas where that repricing left unfinished business, and to give you a consistent way to execute retests with defined risk and clear structural context. Indicator

Auction Weighted Support and Resistance [Metrify]This script builds an “auction-weighted” S/R map that’s intentionally closer to a microstructure proxy than a classic “draw pivots → draw lines” approach.
The core idea: treat repeated interactions around the same price as evidence of auction behavior (acceptance vs rejection), then compress that behavior into a small set of ranked horizontal zones per horizon. Instead of outputting dozens of levels, it runs a selection pass to keep only the strongest, spatially distinct levels.
Candidate discovery is pivot-driven, but not used naively. The script collects pivot highs/lows into rolling buffers for three horizons (Micro/Short/Medium) with different pivot lengths and memory caps. Those candidates don’t become “levels” directly; they’re just seeds that get clustered and rescored. Clustering is ATR-normalized (distance measured in ATR multiples), so the same logic doesn’t fall apart when you change symbol volatility or timeframe. Each horizon has its own clustering radius (distATR_micro/short/medium), which makes Micro more granular and Medium more tolerant.
The “weight” you see is not a single metric. It’s a composite score that tries to approximate how meaningful a price is in an auction sense:
Touch count (distinct): interactions are counted only when the candle range gets within a near-band threshold (ATR-normalized), and then gated by minimum bar separation so you don’t get spam from chop printing 20 touches in a row. (this is done with a stride-based loop to avoid blowing runtime on deep lookbacks)
Acceptance: a rolling overlap rate of candle ranges inside the box. It’s exponentially weighted (half-life decay), so recent acceptance matters more, but older acceptance still contributes. If price has been “living” around that level, acceptance rises.
Rejection quality: wick-aware rejection, but range-gated (not close-gated). The scoring looks at whether the candle range overlaps/approaches the level, then measures wick dominance on the rejecting side plus where the close sits inside the bar range.
Age decay: older levels aren’t thrown away automatically, but they get downweighted via an exponential decay term so stale structure doesn’t dominate forever.
Those components get combined by f_weightCompose() into a bounded weight using saturating transforms (so touches don’t scale linearly forever) and a decay factor tied to age. When multiple candidates land in the same cluster, the merge is done with a saturating union on weights (1 - (1-oldW)*(1-wAdd)) rather than simple addition, so weights don’t explode and a level can converge toward 1.0 without becoming meaningless. The cluster center price is updated via a weight-based average to prevent random drift from weak additions.
After clustering, we does an explicit selection pass instead of drawing everything. First it filters by minScore, then sorts by weight, then applies a spatial suppression step (basically NMS for horizontal levels). The minimum spacing is ATR-based and incorporates both a horizon spacing floor and the zone thickness, so you don’t end up with two bands that overlap visually or convey the same information. On top of that, there’s a global cross-horizon collision gate (f_canDraw) so Medium zones can coexist with Short/Micro without the chart turning into a layered fog of rectangles.
Visualization is intentionally “zone-first.” Each selected level becomes a box band whose half-thickness is ATR-scaled per horizon (bandThicknessATR_*). Opacity isn’t linear: it normalizes weight above minScore, applies a power curve to compress mid-range values, and also scales relative to the strongest level in that horizon (so you still get contrast when everything is “kind of strong”).
The pressure overlay is not volume-based and not orderflow (pine can’t read L2), but it tries to expose short-term imbalance while price is inside a band. When the last price is inside a zone, it computes a pressure score from two parts: proximity to the center (closer = higher) and a directional imbalance proxy from recent returns sampled only on bars that intersect the band. It then draws two thin lines at the band edges with alpha proportional to that pressure score. This is meant as a “are we being pushed out or absorbed here” hint (not a prediction engine).
If you enable the audit panel, the script builds a table listing the levels that actually got drawn (post-selection + collision filtering). The columns map directly to the internal metrics (weight, touches, acceptance, rejection), so you can sanity-check why a level exists. Level IDs are horizon-prefixed (MC/ST/MD) and assigned based on ranking within each horizon.
note:
rebuild is throttled (rebuildEveryN) and only runs on the last bar. Loops that can go deep use a stride heuristic (1/2/4) to keep runtime predictable on large lookbacks. Arrays are used as bounded buffers for candidate storage, and drawing objects are aggressively deleted/rebuilt to avoid object leaks. Indicator

Adaptive BSP v6The Adaptive Buying and Selling Pressure (ABSP) indicator is the "engine" of your system. Unlike standard volume oscillators that just look at total quantity, this logic dissects the internal price action of every candle to determine who is actually in control.
1. The Core Calculation (Intra-Bar Delta)
Instead of just looking at the candle color, the ABSP logic calculates pressure based on where the price closes relative to the high and low of the bar:
• Buying Pressure (BP): Measured as the distance from the candle's Low to its Close.
BP = Close - min(Low, Close)
• Selling Pressure (SP): Measured as the distance from the candle's High to its Close.
SP = max(High, Close) - Close
2. The Adaptive Lookback (The "Pulse")
Standard indicators use a "static" period (like 14 or 20). The ABSP is different; it uses the Market Pulse to change its own length:
• It tracks the number of bars since the last significant structural pivot.
• If the market is moving fast with frequent pivots, the lookback shortens (more sensitive).
• If the market is trending smoothly without pivots, the lookback lengthens (more stable).
3. Statistical Normalization (Z-Score)
To make the data readable across different assets (like Crypto vs. Forex), we apply a Z-Score calculation. This measures how many standard deviations the current pressure is away from the mean:
• Neutral: Z = approx 0 (Balanced market).
• High Intensity: Z > 2.0 (Significant buying surge).
• Extreme Exhaustion: Z > 3.0 (Potential blow-off top/bottom).
4. Key Logic Points
Feature | Function | Trading Benefit
=============================
Net Delta | Subtracts SP from BP. | Instant view of which side is winning the tug-of-war.
----------------------------------------------------------------------------
EMA Smoothing | Uses a Series EMA on the raw values. | Filters out "noise" while remaining responsive to price.
----------------------------------------------------------------------------
Divergence Logic | Compares Price Highs to Pressure Highs. | Flags when a trend is losing "gas" before price actually drops.
----------------------------------------------------------------------------
Z-Intensity Filter | Only flags "PRO" signals at extremes. | Ensures you aren't entering during "retail chop."
How it drives the "Fusion" System:
In your current setup, the ABSP acts as the ultimate filter. A "Wave" is just a zig-zag on the chart, but the ABSP tells the script: "This wave is legitimate because the Z-Score is at 2.1 and Buying Pressure is exponentially higher than Selling Pressure."
Would you like me to add a specific "Exhaustion" alert to the ABSP logic that pings you when the Z-Score hits an extreme level (>3.0), even if a new wave hasn't formed yet? Indicator

Indicator

Indicator

Indicator

Indicator

Indicator

Indicator

Accordion Index (Swing-Based) Structural Market Regime AnalysisThe Accordion Index is a multi-dimensional market structure indicator designed to diagnose regime formation, expansion, compression, and transition phases across financial markets. Rather than generating isolated buy/sell signals, it provides contextual insight into how price, structure, and participation interact over time.
The indicator is based on a swing-based, multi-leg framework, which reflects how markets naturally alternate between expansion, correction, re-expansion, and resolution phases. These repeating swing sequences form the foundation of both classical cycle analysis and Elliott Wave structures.
By quantifying the internal quality of these swing structures, the Accordion Index evaluates whether price movements are structurally aligned, directionally efficient, and institutionally supported.
Core Components
The indicator consists of three complementary components:
1) Accordion Correlation (Blue Line) Structural Alignment
Measures the degree of synchronization between short-term swing behavior and the dominant higher-timeframe regime.
Rising values indicate increasing structural coherence.
Declining values reflect regime decay and fractal misalignment.
This component highlights whether market movements are organized within a broader cycle structure or fragmented across timeframes.
2) Efficiency (Green Line) Directional Progress
Measures how much net directional displacement price achieves relative to its internal movement.
Rising values indicate clean, trend-supportive movement.
Falling values reflect consolidation, churn, or distribution.
This component distinguishes productive trends from sideways or internally conflicted phases.
3) Average Swing Speed (Red Line) Participation and Energy
Measures the velocity and urgency of swing movements.
Rising values indicate strong institutional and speculative engagement.
Declining values suggest fading participation or exhaustion.
This component reflects whether major capital is actively sponsoring price movement.
Regime Thresholds
Two reference levels provide structural context:
Directional Regime (+0.5, Blue Dashed Line)
Identifies mature directional regimes with strong structural coherence, typically associated with sustained trend phases.
Strong Accordion (–0.5, Purple Dashed Line)
Marks extreme structural dislocation, often occurring during crisis periods, panic phases, or major regime breakdowns.
Interpreting the Accordion Index
The indicator should be interpreted as a regime and structure filter rather than a standalone signal generator.
Typical configurations include:
Rising correlation, rising efficiency, rising speed
=Trend expansion and regime confirmation
Rising correlation, falling efficiency, elevated speed
=Compression and accumulation/distribution
Falling correlation and efficiency with unstable speed
=Regime decay and transition
Simultaneous recovery in correlation and efficiency
=Structural re-synchronization and trend re-emergence
These configurations allow traders to assess whether markets are trending, consolidating, transitioning, or reorganizing internally.
Market-Agnostic and Fractal Design
The Accordion Index is market-agnostic and fractal in nature. It can be applied to:
FX, commodities, indices, equities, and crypto
Intraday, swing, and long-term timeframes
The underlying swing structure exists in all sufficiently liquid markets. Differences in behavior are reflected through changes in structural coherence, efficiency, and participation rather than through pattern distortion.
The indicator therefore adapts naturally to different asset classes and volatility regimes.
Integration with Cycle and Wave Analysis
The Accordion Index is designed to complement, not replace, existing analytical frameworks.
Cycle Analysis
It can be used to validate cycle phases by confirming whether internal structure supports expansion, compression, or transition scenarios.
Elliott Wave Analysis
The indicator aligns naturally with Elliott Wave principles by evaluating the quality of impulsive and corrective phases:
Impulsive waves typically show rising correlation, efficiency, and speed.
Corrective waves tend to display falling efficiency and structural fragmentation.
Wave extensions and failures are often preceded by changes in internal alignment.
This makes the Accordion Index a valuable supplemental tool for confirming wave counts and identifying regime exhaustion or re-synchronization.
Practical Usage
The Accordion Index functions best as a contextual filter:
High structural alignment = trust trend structure
Low efficiency = expect consolidation
Low participation = avoid forcing trades
Trades and projections should be executed in alignment with prevailing structural conditions rather than isolated price patterns.
Disclaimer
This indicator is intended for educational and analytical purposes. It does not constitute financial advice. All trading decisions remain the responsibility of the user.
Closing Note
The Accordion Index is designed to visualize how markets organize, exhaust, compress, and re-synchronize over time. By integrating structural alignment, directional efficiency, and participation dynamics, it provides a unified framework for understanding market regimes across asset classes and timeframes. Indicator

Indicator

Adaptive Kinetic Ribbon [QuantAlgo]🟢 Overview
The Adaptive Kinetic Ribbon indicator synthesizes price velocity and volatility dynamics to identify trend direction, momentum strength, and acceleration phases across varying market conditions. It combines velocity-based momentum measurement, adaptive volatility weighting, dual-speed ribbon analysis, and acceleration-deceleration detection into a unified visual system that quantifies periods of sustained directional movement and momentum shifts, helping traders and investors identify trend continuation and reversal signals across various timeframes and asset classes.
🟢 How It Works
The indicator's core methodology lies in its adaptive kinetic approach, where velocity and volatility components are calculated dynamically and then smoothed through an adaptive alpha mechanism.
First, Velocity is measured to capture raw directional momentum by calculating the net price change over the lookback period:
velocity = source - source
This creates a momentum vector that quantifies how far and in which direction price has moved, providing the foundation for understanding trend strength and establishing whether the market is in a sustained directional phase.
Then, Volatility is computed to evaluate price variability and market noise by analyzing the standard deviation of bar-to-bar price changes:
volatility = ta.stdev(source - source , length) * mult
The volatility sensitivity multiplier allows traders to adjust how responsive the indicator is to market noise, with higher values creating faster adaptation during volatile periods and lower values maintaining stability during choppy conditions.
Next, Adaptive Alpha is calculated to create a dynamic smoothing coefficient that automatically adjusts based on the relationship between velocity and volatility:
adaptive_alpha = math.abs(velocity) / (math.abs(velocity) + volatility)
This alpha value ranges from 0 to 1, where values closer to 1 indicate strong, clear directional movement (high velocity relative to volatility), causing the indicator to respond quickly, while values closer to 0 indicate noisy, range-bound conditions (high volatility relative to velocity), causing the indicator to smooth more heavily and filter out false signals.
Following this, the Kinetic Line is constructed using exponential smoothing with the adaptive alpha coefficient:
var float kinetic_line = na
kinetic_line := na(kinetic_line ) ? source : kinetic_line + adaptive_alpha * (source - kinetic_line )
This creates an adaptive moving average that automatically adjusts its responsiveness: during strong trends with clear velocity, it tracks price closely like a fast EMA; during choppy, volatile periods, it smooths heavily like a slow SMA, providing optimal trend identification across varying market regimes without manual parameter adjustment.
Then, Ribbon Lines are generated by applying additional moving average smoothing to the kinetic line at two different speeds:
ribbon_fast = ma(kinetic_line, ribbon_fast_length, ma_type)
ribbon_slow = ma(kinetic_line, ribbon_slow_length, ma_type)
The dual-ribbon structure creates a visual envelope around the kinetic line, where the fast ribbon responds quickly to kinetic changes while the slow ribbon provides trend confirmation, with crossovers between these ribbons generating primary trend reversal signals.
Finally, Trend State and Acceleration are determined by analyzing the relative positioning and directional movement of the ribbon lines:
trend_up = ribbon_fast > ribbon_slow
acceleration = ribbon_fast > ribbon_fast
ribbonColor = trend_up ?
acceleration ? bullAccel : bullDecel :
not acceleration ? bearAccel : bearDecel
This creates a four-state classification system that distinguishes between bullish acceleration (uptrend strengthening), bullish deceleration (uptrend weakening), bearish acceleration (downtrend strengthening), and bearish deceleration (downtrend weakening), providing traders with nuanced momentum insights beyond simple bullish/bearish binary signals.
🟢 Signal Interpretation
▶ Bullish Acceleration (Bright Green): Fast ribbon above slow ribbon AND fast ribbon rising, indicating confirmed uptrend with building momentum = Strongest bullish condition, ideal for new long entries, adding to positions, or holding existing longs with confidence
▶ Bullish Deceleration (Dark Green): Fast ribbon above slow ribbon BUT fast ribbon falling, indicating uptrend intact but momentum weakening = Caution signal for longs, potential trend exhaustion developing, consider tightening stops or taking partial profits
▶ Bearish Acceleration (Bright Red): Fast ribbon below slow ribbon AND fast ribbon falling, indicating confirmed downtrend with building momentum = Strongest bearish condition, ideal for new short entries, exiting longs, or maintaining defensive positioning
▶ Bearish Deceleration (Dark Red): Fast ribbon below slow ribbon BUT fast ribbon rising, indicating downtrend intact but momentum weakening = Caution signal for shorts, potential trend exhaustion developing, prepare for possible reversal or consolidation
▶ Bullish Crossover: Fast ribbon crosses above slow ribbon, signaling trend reversal from bearish to bullish and initiation of new upward momentum phase = Primary buy signal, entry opportunity for trend-following strategies, exit signal for short positions
▶ Bearish Crossover: Fast ribbon crosses below slow ribbon, signaling trend reversal from bullish to bearish and initiation of new downward momentum phase = Primary sell signal, entry opportunity for short strategies, exit signal for long positions
▶ Ribbon Spread Width: Distance between fast and slow ribbons indicates trend strength and conviction, where wider spreads suggest strong, sustained directional movement with low reversal probability, while tight or converging ribbons indicate weak trends, consolidation, or impending reversal conditions
▶ Bar Color Alignment: When bar coloring is enabled, candlestick colors mirror the ribbon state providing immediate visual confirmation of momentum conditions directly on price action, eliminating the need to reference the indicator separately and enabling faster decision-making during active trading
🟢 Features
▶ Preconfigured Presets: Three optimized parameter configurations accommodate different trading styles, timeframes, and market analysis approaches: "Default" provides balanced trend identification suitable for swing trading on 4-hour and daily charts, "Fast Response" delivers heightened sensitivity optimized for intraday trading and scalping on 5-minute to 1-hour charts, and "Smooth Trend" offers conservative trend identification ideal for position trading and long-term analysis on daily to weekly charts.
▶ Built-in Alerts: Three alert conditions enable comprehensive automated monitoring of trend reversals and momentum transitions. "Bullish Crossover" triggers when the fast ribbon crosses above the slow ribbon, signaling the shift from downtrend to uptrend and the beginning of bullish momentum building. "Bearish Crossover" activates when the fast ribbon crosses below the slow ribbon, signaling the shift from uptrend to downtrend and the beginning of bearish momentum building. "Any Ribbon Crossover" provides a combined notification for either bullish or bearish crossover regardless of direction, useful for general trend reversal monitoring and ensuring no momentum shift goes unnoticed.
▶ Color Customization: Six visual themes (Classic, Aqua, Cosmic, Cyber, Neon, plus Custom) accommodate different chart backgrounds and visual preferences, ensuring optimal contrast and immediate identification of acceleration versus deceleration states across various devices and screen sizes. Each preset uses distinct colors for the four momentum states (bullish acceleration, bullish deceleration, bearish acceleration, bearish deceleration) with proper visual hierarchy. Optional bar coloring with adjustable transparency provides instant visual context of current momentum state and trend direction without switching between the price pane and indicator pane, enabling traders and investors to immediately assess trend positioning and acceleration dynamics while analyzing price action patterns and support/resistance levels.
Indicator

Indicator

Luminous Trend Wave [Pineify]```
Luminous Trend Wave - Hull MA Based Normalized Momentum Oscillator
The Luminous Trend Wave (Pineify) is a momentum oscillator designed to provide clear, responsive trend signals while minimizing the lag commonly associated with traditional momentum indicators. By combining Hull Moving Average (HMA) calculations with ATR-based normalization and hyperbolic tangent transformation, LTW delivers a bounded oscillator that works consistently across different assets and timeframes.
Key Features
Hull Moving Average foundation for reduced lag trend detection
ATR normalization for universal applicability across all markets
Bounded output range (-100 to +100) using mathematical tanh transformation
Dynamic gradient coloring that reflects momentum intensity
Built-in signal line for momentum confirmation
Automatic alerts for trend reversals and momentum shifts
How It Works
The indicator operates through a four-stage calculation process:
Trend Basis Calculation: The indicator first calculates a Hull Moving Average (HMA) of the closing price. HMA was chosen specifically because it provides significantly less lag compared to Simple or Exponential Moving Averages while maintaining smoothness. This allows the oscillator to respond quickly to genuine price movements.
Distance Measurement: The raw distance between the current close price and the HMA trend line is calculated. This distance represents how far price has deviated from its smoothed trend.
ATR Normalization: The distance is then divided by the Average True Range (ATR) over the same lookback period. This normalization step is crucial - it makes the oscillator readings comparable across different assets regardless of their price levels or typical volatility. A stock trading at $500 and one at $5 will produce equivalent readings when their relative movements are similar.
Tanh Transformation: Finally, the normalized value is passed through a hyperbolic tangent function scaled by a sensitivity multiplier. The mathematical formula (e^2x - 1) / (e^2x + 1) naturally bounds the output between -100 and +100, preventing extreme spikes while preserving the directional information.
Trading Ideas and Insights
Zero Line Crossovers: When the oscillator crosses above zero, it indicates a shift from bearish to bullish momentum. Conversely, crossing below zero signals bearish momentum. These crossovers can be used as entry triggers when confirmed by other analysis.
Overbought/Oversold Levels: Readings above +80 suggest overbought conditions where price has extended significantly above its trend. Readings below -80 indicate oversold conditions. These extremes often precede mean reversion moves.
Signal Line Divergence: When the main oscillator (histogram) is above the signal line, momentum is increasing. When below, momentum is decreasing. This relationship helps identify the strength of the current move.
Momentum Fading: The indicator automatically fades the color intensity when the oscillator value is closer to the signal line than to the extremes, visually indicating weakening momentum before potential reversals.
How Multiple Indicators Work Together
LTW integrates three distinct technical concepts into a cohesive system:
Hull MA + ATR Integration: The Hull Moving Average provides the trend direction while ATR provides the volatility context. Together, they answer not just "where is the trend?" but "how significant is the current deviation relative to normal market movement?"
Mathematical Bounding + Visual Mapping: The tanh transformation ensures readings stay within predictable bounds, while the gradient coloring maps these bounded values to intuitive visual feedback. Strong bullish readings appear in bright green, strong bearish in bright red, with smooth transitions between.
Oscillator + Signal Line System: Similar to MACD's relationship between the MACD line and signal line, LTW uses a WMA-smoothed signal line to filter noise and confirm momentum direction. The interplay between the faster oscillator and slower signal creates actionable crossover signals.
Unique Aspects
Universal Normalization: Unlike many oscillators that produce different reading ranges on different assets, LTW's ATR normalization ensures consistent interpretation whether trading forex, crypto, stocks, or commodities.
Sensitivity Control: The sensitivity parameter allows traders to adjust how aggressively the oscillator responds to price changes. Higher values make it more responsive (useful for scalping), while lower values smooth out noise (better for swing trading).
Visual Momentum Feedback: The gradient coloring and transparency adjustments provide immediate visual feedback about trend strength without requiring traders to interpret numerical values.
How to Use
Add the indicator to your chart - it displays in a separate pane below price.
Watch for zero line crossovers as primary trend signals. Bullish when crossing above, bearish when crossing below.
Use the ±80 levels as caution zones where reversals become more likely.
Monitor the relationship between the histogram and signal line - histogram above signal indicates strengthening momentum.
Pay attention to color intensity - faded colors indicate weakening momentum and potential reversal zones.
Set alerts for automated notifications on trend changes and momentum shifts.
Customization
Trend Lookback (default: 21): Controls the HMA period. Lower values increase responsiveness but may generate more false signals. Higher values provide smoother trends but with more lag.
Signal Smoothing (default: 5): Adjusts the WMA period for the signal line. Higher values create a slower signal line with fewer crossovers.
Sensitivity (default: 1.5): Multiplier for the tanh transformation. Increase for more reactive signals, decrease for smoother readings.
Colors: Fully customizable bullish and bearish colors to match your chart theme.
Gradients: Toggle gradient coloring on/off based on preference.
Conclusion
The Luminous Trend Wave indicator offers traders a mathematically sound approach to momentum analysis. By combining the low-lag properties of Hull Moving Average with ATR-based normalization and bounded output transformation, LTW provides consistent, interpretable signals across any market. The visual feedback system makes trend strength immediately apparent, while the signal line crossovers offer clear entry and exit timing. Whether used as a standalone tool or combined with price action analysis, LTW helps traders identify trend direction, momentum strength, and potential reversal zones with clarity.
```
Indicator

LSMA25 Trend Correction Continuation
## LSMA25 Trend Correction Continuation - Publishing Description
### Overview
This indicator highlights **trend continuation opportunities** using a **25-period LSMA (Least Squares Moving Average)** with a **slope/angle filter** and a simple **correction + re-entry** logic.
It is designed to mark:
* **Continuation entries** after a pullback (correction) and re-cross of LSMA in the direction of a strong trend
* **Strong-trend state** (subtle dots) when price stays on the trend side of LSMA with a steep angle, even without a fresh cross
### Core logic
1. **LSMA (25 by default)**
* Uses `ta.linreg(close, lsmaLen, 0)` as the LSMA line.
2. **Trend strength via angle (tick-normalized)**
* Computes 1-bar LSMA slope in **ticks**:
* `slopeTicks = (lsma - lsma ) / syminfo.mintick`
* Converts slope to an angle using `atan()` and a calibration input:
* `ticksPerBarFor45` approximates how many ticks per bar corresponds to ~45°
* Strong trend conditions:
* LONG trend strength when `angleDeg >= minAngleLongDeg`
* SHORT trend strength when `angleDeg <= minAngleShortDeg`
3. **Correction detection**
* LONG side: a correction exists if within the last `corrLookback` bars the close was **below** LSMA:
* `ta.barssince(close < lsma) <= corrLookback`
* SHORT side: correction exists if within the last `corrLookback` bars the close was **above** LSMA:
* `ta.barssince(close > lsma) <= corrLookback`
4. **Continuation signals**
* **Long Continuation (LC)** triggers when:
* Price **crosses above** LSMA (`ta.crossover(close, lsma)`)
* Angle indicates **strong uptrend**
* A recent **pullback below LSMA** occurred
* Optional ATR% filter passes
* **Short Continuation (SC)** triggers symmetrically on cross below.
5. **Strong trend markers**
* When price is on the trend side of LSMA and angle is strong:
* Uptrend: `close > lsma and strongUp`
* Downtrend: `close < lsma and strongDown`
* Drawn as small, semi-transparent circles (not entry signals by themselves).
### Plots and labels
* **LSMA line** plotted in yellow.
* **LC**: green triangle below bar (trend continuation long).
* **SC**: red triangle above bar (trend continuation short).
* **Dots**: tiny circles for strong-trend state when no fresh continuation signal is present.
### Inputs (how to tune)
* **LSMA length**
* Higher = smoother, fewer signals
* Lower = more responsive, more signals/noise
* **Ticks per bar ≈ 45°**
* Calibration control for angle scaling across different instruments/timeframes
* Increase it if angles look too “aggressive”; decrease it if angles look too “flat”
* **Min angle for LONG / Max angle for SHORT**
* Tighten to filter for only steep trends; loosen to allow more setups
* **Max correction bars back**
* Larger values allow older pullbacks to qualify
* Smaller values require a more recent correction
### Optional volatility filter (ATR%)
* When enabled, the script requires:
* `ATR% = (ATR / close) * 100 >= minAtrPct`
* Useful to avoid low-volatility chop (but can filter out valid trends on slow markets).
### How to use (practical)
* Use **LC/SC** as “trend continuation after pullback” markers:
* Prefer trading in the direction of higher timeframe bias (if applicable)
* Consider entries on LC/SC with your own risk rules (stops/targets are not included)
* Use the **strong-trend dots** as a regime filter:
* If dots persist, continuation setups have higher context quality
* If dots disappear frequently, market may be ranging/choppy
### Limitations (important)
* Angle is based on **LSMA 1-bar slope**, so it is sensitive to sudden changes and can vary across markets/timeframes.
* Correction logic is binary: it only checks whether price crossed to the other side of LSMA recently (not depth/structure of pullback).
* Signals depend on **close crossing LSMA**, not intrabar wick behavior.
* Not a full trading system: no position sizing, stops, or take profits.
### Alerts
Alerts fire only on **confirmed bars** (`barstate.isconfirmed`) for:
* “LSMA25 Long continuation”
* “LSMA25 Short continuation”
Indicator

Indicator
