ATR Step Trailing Stop Positioning ToolThis indicator is an ATR-based trailing stop positioning tool.
It is not designed to generate buy or sell signals. Its purpose is to help traders visualize possible trailing stop levels based on volatility.
How it works:
The indicator calculates a stepped trailing level using the ATR distance from the high or low of the last closed candle.
For long-position management, the stop level can be positioned below price using the candle low and an ATR-based distance.
For short-position management, the stop level can be positioned above price using the candle high and an ATR-based distance.
Because the calculation is based on the last closed candle, the level is designed to behave like a step-style trailing reference instead of constantly moving tick by tick.
How this is different from a standard ATR trailing stop:
Many ATR stop indicators use a continuous trailing line or a single shared configuration for both long and short conditions.
This version is focused specifically on stop placement structure. It allows the trader to visualize ATR-based stop levels as stepped references from the most recent completed candle.
Another practical difference is that traders can add two instances of the indicator to the same chart. For example, one instance can be adjusted for long trailing stop management and another for short trailing stop management. By changing the visibility or transparency settings, it is possible to show only the positive or negative side of each instance and compare different ATR lengths or ATR multipliers for long and short positioning.
This makes the tool useful when a trader wants different trailing stop behavior for long and short positions instead of using one universal setting.
Possible use cases:
* Visualizing ATR-based trailing stop zones
* Managing open trades with a volatility-adjusted stop reference
* Comparing different ATR lengths or multipliers
* Separating long-side and short-side stop logic
* Studying how price behaves around volatility-based stop levels
Important limitation:
This indicator does not predict direction. It does not provide entry signals, exit signals, buy signals, or sell signals. The plotted levels are only a technical reference for trailing stop positioning based on ATR and closed candle structure.
Traders should combine this tool with their own entry logic, market structure analysis, risk management rules, and broader trading plan.
Indicator

Prism Strategy## Prism Strategy: Multi-Dimensional Trend & Structural Flow
**Prism Strategy** is a high-precision trend-following and momentum execution engine designed to capture institutional-grade moves while providing a comprehensive structural analysis of the market. It integrates a dynamic EMA Ribbon, RSI momentum filtering, automated Fibonacci levels, and a proprietary "Structural Wall" logic to determine the most logical points for entry and risk management.
### 1. Trend Identification (The EMA Ribbon)
The strategy utilizes a 12-layer EMA Ribbon to identify trend alignment.
* **Short-Term Stack:** 3, 5, 8, 10, 12, 15 EMAs.
* **Long-Term Stack:** 30, 35, 40, 45, 50, 60 EMAs.
A signal is only considered valid when the ribbon is in a **Full Stack** configuration (perfectly ordered from fastest to slowest), ensuring the trend is established across multiple time-cycles.
### 2. Momentum Filtering
To prevent "whipsaws" in low-volatility environments, the strategy incorporates **RSI (14)**.
* **Long Positions:** Require RSI > 50.
* **Short Positions:** Require RSI < 50.
This ensures that the price is not just trending, but moving with sufficient velocity.
### 3. The "Structural Wall" Logic
One of the most advanced features of this strategy is the **Structural Wall Analysis**. The algorithm identifies the strongest confluence between:
* **Dynamic Support/Resistance:** The Base EMA (12).
* **Static Support/Resistance:** Auto-calculated Fibonacci Retracement levels (0.0 to 1.618).
The "Wall" is formed by selecting the maximum (for Longs) or minimum (for Shorts) of these two values, creating a "Hard Floor/Ceiling" that acts as the primary anchor for the trailing stop.
### 4. Dynamic Risk Management (ATR-Based)
* **Stop Loss & Take Profit:** Initial levels are calculated using **ATR (Average True Range)** multiplied by a user-defined factor (default 1.5x for stops and a 2.0 RR ratio).
* **Intelligent Trailing Stop:** The strategy tracks the "Structural Wall" and updates the stop loss in real-time. It only moves in the direction of the trade (up for long, down for short) to lock in profits while giving the price enough room to breathe based on current volatility.
### 5. Integrated Execution Dashboard
The built-in UI provides real-time data for professional monitoring:
* **System Mode:** Displays current trend bias (Bullish/Bearish/Neutral).
* **Entry Advice:** An AI-driven logic that evaluates if the current price is "Ideal," "Overextended," or if the "Risk > Reward" is currently unfavorable for new entries.
* **Fibonacci Alerts:** Warns the user when the price is approaching a major Fibonacci level (⚠️ Alert) to prepare for potential reversals or pullbacks.
### 6. Exit Logic
The strategy employs a **Unified Exit Engine** based on three criteria:
1. **Hard Stop/TP:** Triggered if price hits the ATR-based levels.
2. **Structural Violation:** Triggered if the "Trailing Stop" (Structural Wall) is breached.
3. **Trend Break:** Triggered if the EMA Ribbon loses its "Full Stack" alignment, indicating a loss of trend momentum.
---
### **How to Use**
* **Timeframes:** Optimized for trend-rich environments (5m, 15m, 1h, and Daily).
* **Markets:** Effective on liquid assets including Equities, Forex, and Crypto.
* **Entry:** Look for "IDEAL ENTRY" status on the dashboard for the highest probability setups.
---
**Disclaimer:** *Trading involves significant risk. This strategy is an analytical tool and does not guarantee profits. Past performance is not indicative of future results. This is not investment advice; it is for educational purposes only.* Strategy

Haar Wavelet RSI [Jamallo]Author's Note
This is the oscillator companion to the Haar Wavelet Range Filter. Both indicators share the same MODWT Haar wavelet foundation, creating a synergistic effect when used together — trend and momentum derived from the same mathematical decomposition of price.
Introduction
The Haar Wavelet RSI is a momentum oscillator that replaces the standard price-difference input of a traditional RSI with wavelet detail coefficients derived from a Maximal Overlap Discrete Wavelet Transform (MODWT) with a Haar basis. Instead of measuring bar-to-bar price change, it measures momentum at a specific frequency scale — filtering out the noise above and below that scale before the RSI calculation even begins.
How It Works
MODWT Haar Wavelet Decomposition
The script decomposes hl2 through up to 5 wavelet levels using a shift-invariant Haar transform. At each level, the detail coefficients capture the local price delta at that specific scale — Level 1 is 2-bar momentum, Level 3 is 8-bar momentum, Level 5 is 32-bar momentum. These detail coefficients become the input to the RSI in place of raw price change, meaning the oscillator is measuring directional energy at a single isolated frequency rather than the full noisy price series.
Wavelet RSI Calculation
The selected detail coefficient is split into its upward and downward components, smoothed with Wilder's RMA, and fed into the standard RSI formula. The math is identical to a conventional RSI — the only difference is what it is measuring. Because the detail coefficients are already frequency-isolated, the resulting RSI is inherently cleaner than applying RSI to raw price.
Adaptive Deadband Step-Hold
The wavelet RSI output is then passed through an adaptive deadband filter. The threshold is self-derived from the RSI's own recent volatility — a short rolling average of absolute RSI changes — scaled by the deadband multiplier. The RSI only updates when it departs from its held value by more than this threshold. Below the threshold it holds flat. This eliminates the continuous micro-oscillation that makes standard RSI difficult to read on noisy bars, producing a stepped line that moves with conviction or not at all.
Closing
This is not a standard RSI with cosmetic changes. The wavelet decomposition fundamentally changes what the oscillator is measuring — momentum at a defined frequency scale rather than raw bar-to-bar noise. The decomposition level is the most important setting: lower levels suit faster timeframes and shorter momentum cycles, higher levels filter more aggressively and are better suited to swing-level momentum reads. Indicator

Anchored Value Distribution Oscillator (Zeiierman)█ Overview
Anchored Value Distribution Oscillator (Zeiierman) is a structure-driven oscillator that models price as a dynamic value distribution, then measures where price is positioned within that structure to reveal balance, imbalance, and shifting market conditions.
Instead of relying purely on price momentum, the indicator builds a rolling, volume-weighted distribution of price over time. From this structure, it extracts key reference levels such as the value center, high/low distribution bands, and peak activity zones. These are then used to normalize the price into a bounded oscillator.
Alongside the distribution, the script constructs an adaptive trailing anchor that reacts to structural shifts and volatility. The oscillator combines both the structural distribution and the adaptive anchor into a single positioning score, producing a contextual view of trend, extension, and balance.
The result is an oscillator that reflects not just direction, but where price sits within its evolving value landscape.
█ How It Works
⚪ Distribution Engine (Value Model)
The core of the indicator is a rolling value distribution built from price and volume.
Each bar contributes to a log-scaled price histogram, where:
price ranges are segmented into rows
volume is distributed across those rows
candle bodies and wicks are weighted differently
older data gradually decays over time
This produces a continuously updating view of:
Point of Control (vp)
Value High / Value Low (vh / vl)
Outer extremes (xh / xl)
Distribution center (cen)
Unlike a static volume profile, this model evolves with the market and adapts to both recent and historical activity.
⚪ Adaptive Anchor (Trend Engine)
On top of the distribution, the script builds an adaptive trend anchor (anc).
The anchor is derived from a structural base:
blended from the distribution center and peak activity
offset using volatility (ATR)
constrained to trail price in the active direction
The anchor flips direction when the price crosses it, and then trails using a volatility-adjusted distance.
This creates a structure-aware trend model that behaves similarly to a trailing stop, but is grounded in value distribution rather than raw price movement.
⚪ Normalized Positioning Model
The oscillator converts price into a normalized position within the distribution.
Two independent scores are calculated:
Position relative to the adaptive anchor (scAnc)
Position relative to the value distribution (scVp)
Each score maps price into a bounded range:
-50 → extreme downside
-25 - 20 → fair value
+50 → extreme upside
These scores are then combined into a single output using a weighted blend.
A confidence factor reduces the distribution score's contribution when it disagrees with the anchor, ensuring cleaner signals in conflicting conditions.
⚪ Smoothed Oscillator Output
The final oscillator (outAvg) is a smoothed combination of:
trend-aware positioning (anchor)
structure-aware positioning (distribution)
█ How to Use
⚪ Read Position Relative to Value
Use the oscillator to understand where the price sits within its value distribution:
Above 25 → price is positioned above fair value
Below -25 → price is positioned below fair value
Near extremes (±50) → price is extended relative to structure
This helps distinguish between:
continuation conditions
mean reversion zones
balanced market states
⚪ Follow the Adaptive Trend Anchor
The trailing anchor provides a clear trend reference:
Price above anchor → bullish regime
Price below anchor → bearish regime
Anchor flips → potential regime shift
█ Settings
Lookback – Controls how much historical data is used to build the value distribution. Higher values produce smoother structure, while lower values increase responsiveness.
Canvas Pad – Expands the distribution range to include more extreme price levels. Increasing this captures broader moves but reduces precision.
Rebuild Drift – Determines how much the distribution can drift before being recalculated. Lower values rebuild more frequently, higher values allow more continuity.
Signal Length – Controls the smoothing of the signal line. Higher values reduce noise but increase lag.
Profile Center Bias – Blends between the value distribution center and the point of control to define the structural base. Higher values anchor the trail to the broader distribution center, while lower values make it follow peak activity more closely.
Trail Acceleration – Controls how quickly the trailing stop tightens as the price accelerates. Higher values make the trail react more aggressively to impulsive moves, reducing lag during strong trends.
Max Trail Acceleration – Limits how much the acceleration can compress the trailing distance. Higher values allow the stop to tighten more during rapid expansion, while lower values keep behavior closer to the original, smoother trail.
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
Indicator

Chandelier Exit Reaction Zones + Fib LevelsAt its core, this script is built on a Chandelier Exit-style ATR stop-and-flip engine. The difference is that instead of stopping at a single trailing stop, it expands that framework into a full ladder: the multiplier 10 level becomes the primary anchor, the opposite-side multiplier 10 level becomes the extension anchor, and the space between them is mapped with a fib channel. Optional Chandelier Exit multipliers of 5.0 and 7.5 reaction zones add another layer of context for tracking how price behaves before it reaches the full multiplier 10 stretch.
The main idea is simple: markets often react when price gets extended, but not every extension behaves the same way. Sometimes price reaches an ATR threshold and reverses. Sometimes it reaches the same area and continues. This script is meant to organize that behavior into a structure you can read quickly. The Chandelier Exit engine provides the directional framework, while the ladder, fib channel, and reaction zones help show where price is stretched, where it is progressing through the channel, and where a reaction may be worth paying closer attention to.
At a high level, the script does three things. First, it identifies the current active ATR 10 side and the opposite ATR 10x extension. Second, it divides that space into a structured ladder using fib-based levels. Third, it can overlay ATR 5.0 and 7.5 reaction zones so you can see when price is pressing into an intermediate reaction area instead of only waiting for the full ATR 10 test.
A few examples of how to read it:
➡️In a bullish state, the active ATR 10 line acts as the lower anchor and the ATR 10x extension becomes the upper stretch line. The fib ladder shows how far price has progressed through that channel.
➡️In a bearish state, the structure flips. The active ATR 10 line becomes the upper anchor and the ATR 10x extension becomes the lower stretch line.
The optional ATR 5.0 and 7.5 reaction zones add another layer of context. They are useful when price is not yet at the full ATR 10 extreme but is already entering a part of the move where reaction risk is increasing.
➡️The reaction zones table is there to make the state logic visible. It shows the current main multiplier's direction, the latest flip state, the 5.0 / 7.5 reaction directions, and whether those reaction branches are actively contributing to the fill.
This is not meant to predict reversals by itself. The way I use it is more practical: it helps frame where price is stretched, where a move is still developing, and where a reaction may deserve closer attention. The value here is the structure, not a guaranteed signal.
The script also includes state-aware touch alerts for the active ATR 10 level and the ATR 10x extension. Those alerts are not entry signals on their own. They are meant to notify you when price has reached an area that may deserve a decision: continuation, reaction, or invalidation.
Bar Replay
Bar Replay is especially useful with this script. Stepping through price one bar at a time makes it much easier to see how the multiplier 10 ladder flips, how the fib channel reorients, and when the 5.0 / 7.5 reaction zones begin to matter. That can help traders understand the structure in motion instead of only judging it from a finished chart.
Confluence
This script is not meant to be used in isolation. It works best as a structural framework alongside other tools such as RSI, MACD, trend context, volume, and support/resistance. The ladder and reaction zones help define where price is stretched; confluence helps decide whether that stretch is more likely to lead to continuation, reaction, or reversal.
This is an open-source tool, so the goal is transparency and flexibility. Traders can keep it simple and use only the main ATR 10 ladder, or add the fib channel, reaction zones, candle coloring, alerts, and table for more context. The core idea stays the same either way: use a Chandelier Exit-style ATR framework to map stretched price conditions with a consistent structure.
Here's a few additional chart examples:
Indicator

Sigmoid Transition Trailing Stop [LuxAlgo]The Sigmoid Transition Trailing Stop indicator provides a dynamic risk management tool that utilizes a mathematical sigmoid function to smoothly adjust stop levels when price trends become overextended. Unlike traditional trailing stops that move linearly or remain static until a new high/low is formed, this script proactively "catches up" to price during periods of high momentum using a non-linear transition.
🔶 USAGE
The indicator functions as a trend-following stop-loss or take-profit level. When the price crosses the trailing stop, the trend direction flips, and a new stop is calculated based on the ATR-derived distance.
The unique behavior of this tool occurs during "Adjustment" phases. When the distance between the price and the trailing stop becomes too wide (exceeding the initial ATR multiplier), the script triggers a sigmoid transition. During this phase:
The trailing stop line becomes solid (0% transparency) to indicate an active adjustment.
The stop level moves towards the price following an S-curve, providing a smooth acceleration and deceleration of the stop level.
The adjustment concludes once the sigmoid duration is reached or if the stop gets too close to the price (defined by the Min Distance setting).
🔹 Visual Cues
Green Line/Fill: Indicates a bullish trend where the stop is below the price.
Red Line/Fill: Indicates a bearish trend where the stop is above the price.
Solid Line: The sigmoid adjustment is currently active, moving the stop closer to price.
Transparent Line: The stop is in its standard state, maintaining its level or trailing highs/lows.
🔶 DETAILS
The core of the script is the sigmoid function, which creates a natural-looking transition between two price levels. Mathematically, it maps a linear time input (bars passed) to an S-shaped curve between 0 and 1.
The logic ensures that the "trailing" property is never violated; even during a sigmoid transition, the stop level can only move in the direction of the trend (up for bullish, down for bearish). If the price moves against the trend during an adjustment, the stop will simply hold its level until the price moves favorably again or the adjustment period ends.
🔶 SETTINGS
🔹 General Settings
ATR Length: The lookback period used to calculate the Average True Range, which determines the volatility-based distance of the stop.
ATR Multiplier: The base distance (in ATR units) used when the trend first flips.
Sigmoid Length (Bars): The number of bars over which the sigmoid transition occurs once triggered.
Sigmoid Amplitude (ATR Units): The maximum distance the stop is allowed to travel toward the price during an adjustment phase.
Min Distance (ATR Units): A safety buffer that prevents the sigmoid adjustment from moving the stop too close to the current price, preventing premature exits.
Indicator

Indicator

[ A L P H A X ] Sniper - Tiered Entry + TP/SL LevelsAlphaX Sniper — Multi-Layer Confluence Scoring, Tiered Entry Grading, ATR-Based TP/SL Levels, Trailing Stop & Sniper Kill Zones
AlphaX Sniper is a precision entry system built around a multi-factor confluence scoring engine that evaluates trend strength, oscillator positioning, volume, session quality, and higher timeframe bias simultaneously — then grades every signal into one of three tiers: A, AA, or AAA. Designed for traders who want surgical, high-confidence entries rather than a constant stream of noise. Built for XAUUSD, forex majors, and indices across intraday timeframes.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📸 Visual Overview
Full chart view showing trend ribbon, tiered signal labels, TP/SL levels, sniper kill zones, and trailing stop
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔬 The Trend Engine — How It Works
At the foundation of AlphaX Sniper is a four-EMA Trend Engine that scores the current market structure from -4 to +4 and classifies it into distinct trend states:
Fast EMA (8) — immediate momentum reference, most sensitive to price changes
Medium EMA (21) — intermediate trend confirmation layer
Slow EMA (55) — the trend backbone, filters short-term noise
Anchor EMA (200) — the macro structural divider; being above or below it determines the dominant bias
The engine scores four independent conditions each bar:
EMA ribbon alignment (Fast > Medium > Slow for bull, reverse for bear)
Fast EMA slope direction (accelerating up or down)
Medium EMA slope direction
Price position relative to the Anchor EMA
Each condition contributes ±1 to the Trend Score , producing a value from -4 to +4:
+4 / +3 — Strong Bull Trend
+2 — Moderate Bull Trend
+1 — Mild Bull
0 — Neutral / Ranging
-1 — Mild Bear
-2 — Moderate Bear Trend
-4 / -3 — Strong Bear Trend
The space between the Fast EMA and Slow EMA is filled with a Trend Ribbon — yellow-green during bull conditions, red during bear conditions, and gray when the market is neutral or transitioning. The ribbon visually communicates the current trend state at a glance without requiring you to read any values.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 The Confluence Scoring System
Every signal in AlphaX Sniper is produced by a real-time confluence scoring engine that evaluates six independent factors and produces a bull score and a bear score from 0 to 100 on every bar.
Trend Strength (up to 30 points)
Strong Bull/Bear Trend (score ±3 or ±4) — 30 points
Moderate Trend (score ±2) — 20 points
Mild Trend (score ±1) — 10 points
Neutral — 0 points
RSI Positioning (up to 20 points)
RSI recovering from pullback zone (crossing back above/below threshold) — 20 points
RSI sitting in pullback zone — 12 points
RSI already extended in the opposite direction — up to -15 points (penalty)
Stochastic Trigger (up to 15 points)
%K crossing %D while recovering from oversold/overbought territory — 15 points
%K/%D crossover alone — 12 points
%K exiting oversold or overbought zone — 8 points
MACD Alignment (up to 10 points)
When MACD filter is enabled: aligned and accelerating — 10 points; aligned but flat — 5 points
When MACD filter is disabled: full 10 points awarded by default (does not penalize)
Volume Quality (up to 10 points)
Volume spike (>1.5× the 20-SMA) — 10 points
Above-average volume (>1.0×) — 7 points
Meets minimum volume threshold — 4 points
Candle Structure, HTF Bias & Session (up to 10 points)
Strong directional candle with solid body — 5 points
Higher timeframe EMA alignment confirming the same direction — 5 points
London/NY overlap session — 5 points; London or NY solo — 3 points; Asia — 0 points
Penalty Deductions
RSI at extreme opposing level — up to -15 points
Low volatility (ATR filter active and failing) — -10 points
Asian session — -8 points
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Three-Tier Signal Grading (A / AA / AAA)
Tiered signal labels — AAA signals carry the highest confluence score and strongest setup quality
Once the confluence scores are calculated and all filters pass, signals are graded into three quality tiers:
AAA ▲ / ▼ — Score ≥ 65. Maximum confluence. All major factors aligned. Highest-conviction entries. Displayed with the brightest label color.
AA ▲ / ▼ — Score 45–64. Strong setup with multiple confirming factors. High-quality entry with most conditions in your favor.
A ▲ / ▼ — Score 30–44. Valid setup meeting all trigger and filter requirements, but fewer confirming factors. Still a filtered, quality signal — not noise.
Signals below 30 are never displayed regardless of trigger conditions. The tier label appears directly on the chart with the score printed in parentheses so you can see exactly how strong the confluence was: e.g. ▲ AAA (71) or ▼ AA (52) .
A cooldown window (default: 5 bars) prevents back-to-back signals from firing in quick succession during choppy conditions. Bull and bear cooldowns are tracked independently.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 ATR-Based TP/SL Levels
Automatically plotted TP1, TP2, TP3, and SL dashed lines extending forward from every signal bar
Every signal automatically generates a full set of Take Profit and Stop Loss levels based on the current ATR, placing them at configurable multiples of market volatility rather than fixed pip values:
Stop Loss — 1.5× ATR from entry (default) — tight enough to protect capital, wide enough to breathe
TP1 — 1.5× ATR — the conservative first target, ideal for partial profit-taking
TP2 — 3.0× ATR — the primary target for the main portion of the position
TP3 — 5.0× ATR — the extended runner target for strong momentum moves
All levels are plotted as dashed horizontal lines extending 25 bars forward from the signal bar with clean price labels. As price hits each level, a TP1 ✓ / TP2 ✓ / TP3 ✓ marker appears on the chart and the dashboard TP Status updates in real time. When the stop loss is hit, a SL ✕ marker appears and the active trade state resets.
All ATR multiples are fully configurable. Adjust the SL multiple tighter for higher-timeframe trades or wider for volatile instruments like XAUUSD during news events.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛡 Trailing Stop
A dynamic trailing stop follows the active trade, ratcheting in the direction of the move to protect accumulated profits:
During a long trade — the trail is calculated as close − (ATR × multiplier) and only moves upward, never retracing
During a short trade — the trail is close + (ATR × multiplier) and only moves downward
If price violates the trailing stop, the active trade state resets and the trail line disappears
Default trail multiplier: 2.0× ATR — aggressive enough to capture trends while giving the position room to breathe
The trailing stop is plotted as a step-line in the bull or bear color and updates on every bar in real time.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🗺 Sniper Kill Zones
Shaded entry zones appearing on signal bars — the price area between the entry candle and the stop loss level
On every signal bar, AlphaX Sniper draws a Sniper Kill Zone — a shaded rectangular box that marks the entry price area:
For bull signals — the zone spans from the signal bar's high down to the stop loss level, colored in the bull theme
For bear signals — the zone spans from the stop loss level down to the bar's low, colored in the bear theme
The box extends forward a configurable number of bars (default: 6) to visually represent the entry window
Kill zones serve as a visual reminder of where a valid re-entry or limit order can be placed after the initial signal bar closes. If price pulls back into the zone during the next few bars, the setup is still within its original risk structure.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⏱ Session Filter & Session Quality
Session timing has a direct impact on signal quality. AlphaX Sniper tracks four session windows based on UTC/GMT time:
London/NY Overlap — highest liquidity, strongest follow-through, 100 session quality score
New York — strong directional sessions, 85 quality score
London — clean trend sessions especially in the open, 80 quality score
Asia — lowest liquidity, prone to false moves, 30 quality score — signals here receive an -8 point penalty
The optional Session Filter can be enabled to block all signals outside of London and NY entirely. When disabled (default), the session quality factor still penalizes Asian session signals through the scoring system — you see them, but they score lower.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 Live Dashboard
Real-time dashboard showing all key market state values at a glance
The built-in dashboard displays a full snapshot of current market conditions in real time:
TREND — current trend state: STRONG BULL / BULL / MILD BULL / NEUTRAL / MILD BEAR / BEAR / STRONG BEAR
TREND SCORE — the raw score from -4 to +4 powering the trend classification
RSI — current RSI value color-coded by zone (overbought / neutral / oversold)
STOCH K — current stochastic %K value with overbought/oversold coloring
MACD — current MACD state: BULL MOM / BULL / BEAR MOM / BEAR / FLAT
VOLUME — volume classification (SPIKE / HIGH / NORMAL / DRY) with live ×ratio vs the 20-SMA
ATR — current ATR value and ATR as a percentage of price
SESSION — current active session name (LN/NY / NEW YORK / LONDON / ASIA / OFF-SESSION)
HTF BIAS — higher timeframe EMA alignment: BULLISH / BEARISH / NEUTRAL
ACTIVE TRADE — current trade direction: LONG / SHORT / NONE
TP STATUS — live progress through the TP levels: RUNNING → TP1 ✓ → TP2 ✓✓ → TP3 ✓✓✓ / SL HIT
BULL SCORE — current bull confluence score out of 100
BEAR SCORE — current bear confluence score out of 100
Dashboard position (Top Right default), text size, and colors are all configurable.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 How to Trade with AlphaX Sniper — Step by Step
Step 1 — Read the Dashboard
Check the Trend and Trend Score — are you in a strong trend or a neutral range?
Check HTF Bias — does the higher timeframe EMA structure confirm your direction?
Check Session — are you in London or NY? If Asia, expect lower-quality signals.
Step 2 — Wait for a Tiered Signal
An ▲ AAA / AA / A label below the bar is your bull entry signal
A ▼ AAA / AA / A label above the bar is your bear entry signal
Prioritize AAA signals in trending markets — these represent maximum confluence
AA signals are still high quality and tradable in most conditions
A signals are valid but consider taking smaller size or waiting for additional confirmation
Step 3 — Use the Kill Zone for Entry
Enter at the close of the signal bar, or wait for a pullback into the Kill Zone
A limit order inside the Kill Zone can offer a better entry price while staying within the original risk structure
Step 4 — Set Your Levels
Stop Loss is plotted automatically — honor it
Target TP1 first for a partial close, then trail the remainder toward TP2 and TP3
Let the trailing stop manage the remainder once TP1 is achieved
Step 5 — Monitor TP Progress
The dashboard TP Status updates as each level is hit
TP ✓ markers appear on the chart at the bar where each target was reached
If the trailing stop tightens and triggers before TP3, that is the system protecting your profit — respect it
Step 6 — Reset on SL Hit
An SL ✕ marker appears when price hits the stop level
The active trade state resets — the dashboard returns to NONE and TP tracking clears
Reassess the dashboard for a fresh signal before re-entering
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Key Features
📊 Four-EMA Trend Engine with -4 to +4 scoring — classifies trend into 7 distinct strength states
🎯 Three-tier signal grading (A / AA / AAA) — score printed on every label for full transparency
🧠 Multi-factor confluence scoring across trend, RSI, Stochastic, MACD, volume, session, and HTF bias
📐 Automatic ATR-based TP1 / TP2 / TP3 and SL levels plotted on every signal
🛡 Dynamic trailing stop — ratchets with the move, resets on breach
🗺 Sniper Kill Zones — shaded entry boxes marking the valid entry area for limit orders
⏱ Session-aware scoring — London/NY overlap rewarded, Asia penalized
🔭 Higher timeframe bias filter — built-in HTF EMA alignment check without switching charts
⚙ Optional filters — Volume, Candle Body Strength, MACD Alignment, ATR Volatility Minimum, Session
🕒 Configurable signal cooldown — prevents signal spam during choppy transitions
📋 Live 13-row dashboard — trend state, scores, oscillators, volume, session, trade status, TP progress
🎨 Cohesive dual-tone color system — yellow-green for bull, red for bear, gray for neutral
🔔 17 alert conditions — tiered entries, any entry, TP levels, SL, trend state changes
⚙ Fully configurable — all EMA periods, RSI/Stoch parameters, TP/SL multiples, filters, colors, and dashboard settings
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Settings Reference
Trend Engine
Trend Fast EMA — momentum reference (default: 8)
Trend Medium EMA — intermediate confirmation (default: 21)
Trend Slow EMA — trend backbone (default: 55)
Trend Anchor EMA — macro structural divider (default: 200)
Show Trend EMAs — toggle EMA line and ribbon visibility
Show Anchor EMA (200) — toggle the 200 EMA separately
Sniper Entry
RSI Period — oscillator lookback (default: 9)
RSI Bull Pullback ≤ — threshold defining the bull pullback zone (default: 48)
RSI Bear Pullback ≥ — threshold defining the bear pullback zone (default: 52)
Stoch Length — stochastic lookback (default: 14)
Stoch Smooth — %K smoothing period (default: 3)
Stoch Overbought / Oversold — extreme zone thresholds (default: 75 / 25)
Precision Filters
Require Volume Confirmation — enforce minimum volume vs 20-SMA (default: off)
Min Volume vs 20-SMA — minimum volume ratio when filter is on (default: 0.6×)
Require Candle Strength — enforce minimum body/range ratio (default: on)
Min Body/Range Ratio — minimum candle body as a fraction of full range (default: 0.25)
Require MACD Alignment — block signals when MACD is counter-directional (default: off)
Filter Low Volatility — require minimum ATR % of price (default: off)
Min ATR % of Price — minimum ATR threshold when volatility filter is on (default: 0.02%)
Signal Cooldown (bars) — minimum bars between same-direction signals (default: 5)
TP / SL
Show TP/SL Levels — toggle all TP and SL line display
ATR Period for TP/SL — ATR calculation period (default: 14)
Stop Loss ATR Multiple — SL distance (default: 1.5×)
TP1 / TP2 / TP3 ATR Multiples — target distances (defaults: 1.5× / 3.0× / 5.0×)
Sniper Zones
Show Sniper Kill Zones — toggle entry zone boxes
Zone Forward Extension — how many bars the zone box extends forward (default: 6)
Session Filter
Enable Session Filter — block signals outside kill zone windows (default: off)
London Open / NY Open / NY Close / Asia Open / Asia Close — configurable GMT hour boundaries
Appearance
Label Size — Tiny / Small / Normal
Show Trailing Stop — toggle trailing stop line
Trail ATR Multiple — trailing stop distance (default: 2.0×)
Colors
Full dual-tone color system — every bull, bear, and neutral element is independently configurable
Separate colors for: ribbon, EMAs, labels (background + text), TP lines, SL lines, kill zones, trailing stops, dashboard
Dashboard
Show Dashboard — toggle visibility
Position — Top Left / Top Right / Bottom Left / Bottom Right (default: Top Right)
Text Size — Tiny / Small / Normal
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 Alert Conditions
AAA Bull Sniper Entry — fires on maximum-confluence bull signals only
AA Bull Sniper Entry — fires on high-quality bull signals
A Bull Sniper Entry — fires on valid bull signals
AAA / AA / A Bear Sniper Entry — same three tiers for bear signals
Any Bull Sniper Entry — fires on any bull signal regardless of tier
Any Bear Sniper Entry — fires on any bear signal regardless of tier
Any Sniper Entry — fires on any signal in either direction
TP1 Hit / TP2 Hit / TP3 Hit — fires when each take profit level is reached
Stop Loss Hit — fires when the stop loss is breached
Strong Bull Trend Started — fires when Trend Score first reaches ≥ +3
Strong Bear Trend Started — fires when Trend Score first reaches ≤ -3
All alert messages include {{ticker}} and {{interval}} placeholders for clean webhook integration.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Default Settings — Optimized For
The default configuration is specifically tuned for XAUUSD (Gold) on the 1-minute and 5-minute timeframes :
RSI period of 9 for fast response to gold's intraday price swings
Candle Strength filter on (0.25 body ratio) to avoid wicks and indecision candles
Cooldown of 5 bars prevents signal clustering during volatile transitions
Session scoring automatically penalizes Asian-session signals on gold
Trail ATR multiple at 2.0× provides generous breathing room for gold's characteristic oscillations
For other instruments or timeframes, consider adjusting:
Higher timeframes (15m, 1H) — increase EMA periods, increase TP2/TP3 multiples to 4×/7×
Forex majors — reduce Fast EMA to 5–8, reduce SL multiple to 1.0–1.2×
Indices (NAS100, US30) — increase RSI period to 11–14, enable MACD filter for extra precision
More signals — reduce cooldown, disable Candle Strength filter, lower score threshold to ~25
Fewer signals — enable all filters, increase cooldown to 8–10 bars, use AAA alerts only
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👥 Who This Is For
🥇 Gold (XAUUSD) scalpers and intraday traders — default settings tuned specifically for gold's session structure and volatility
📉 Forex traders — applicable to all majors and minors with minor EMA and RSI adjustments
📊 Index traders — works on US30, NAS100, SPX500, DAX, and others
🧠 Data-driven traders — the scored, graded signal system provides a quantitative framework rather than arbitrary lines on a chart
🎯 Precision-focused traders — tiered grading lets you focus exclusively on AAA setups for the highest-conviction trades
📈 Trade management focused traders — the automatic TP/SL levels, trailing stop, and live TP status tracker remove the guesswork from position management
⚠ Traders who struggle with overtrading — the cooldown, minimum score threshold, and optional filters physically prevent low-quality signals from appearing
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 Notes
Session detection uses UTC/GMT — the indicator automatically identifies London, NY, and Asia windows on any broker timezone
Higher timeframe bias is calculated using multiplied EMA periods on the same chart rather than requesting a secondary timeframe — this avoids repainting and keeps all calculations on bar close
All signal conditions are evaluated on bar close — the indicator does not repaint
The trailing stop logic and TP hit detection use intrabar high/low values to accurately reflect when levels were reached, consistent with standard trade execution behavior
Maximum 500 labels are used — on very long chart histories at low timeframes, the oldest labels may be automatically removed by PulseWire's rendering limits
Volume-based features (volume filter, volume score) may behave differently on instruments with limited volume data — consider disabling the volume filter on synthetics and CFDs if volume data is unreliable
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Disclaimer
This indicator is a technical analysis and visualization tool intended for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument. All signals are generated from historical and real-time price data using mathematical calculations — their accuracy or profitability is not guaranteed. Past performance of any signal type does not guarantee future results. Always conduct your own analysis, use proper risk management, and consult a licensed financial advisor before making any trading decisions. The author accepts no responsibility for any losses incurred from the use of this indicator.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Built for traders who demand precision over volume — fewer signals, higher conviction, complete trade management. Indicator

Liquidity Trail Signals [BOSWaves]Liquidity Trail Signals - Structural Trend Engine with Liquidity Zone Detection and Position Management
Overview
Liquidity Trail Signals is a structure-aware trend following system that tracks directional price movement through an adaptive trailing stop anchored to a baseline EMA, where signal generation is governed by trail crossovers and confirmed by price structure rather than lagging oscillators or fixed threshold conditions.
Instead of relying on isolated momentum readings or static support and resistance plotting, trend state, signal generation, and level management are determined through volatility-scaled trail construction, pivot-based liquidity zone detection, and configurable position sizing that adapts entries to either immediate signal changes or trail retest confirmations.
This creates a continuously updating trend framework that reflects actual structural conviction rather than noise-reactive triggers - maintaining directional bias while price respects the trail, detecting meaningful liquidity pools at swing pivot levels, and automatically constructing risk-defined position overlays when trend state shifts occur.
Price is therefore evaluated relative to a dynamic trail boundary anchored in volatility and price structure rather than arbitrary fixed-distance rules or subjective level placement.
Conceptual Framework
Liquidity Trail Signals is founded on the principle that durable trend signals emerge when price respects a volatility-scaled trailing stop anchored to a baseline EMA, while actionable liquidity zones form at historical swing pivot highs and lows where institutional order flow is likely concentrated.
Traditional trend following tools either use fixed-distance trails that ignore volatility context or rely on static support and resistance levels that require manual placement. This framework replaces both with a unified system built on normalized trail logic, automated pivot-based zone detection, and an integrated position tool that converts every signal into a structured, risk-defined trade setup.
Three core principles guide the design:
Trend direction should be determined by an EMA-anchored trailing stop that advances in the favorable direction and never retreats until price closes through the trail boundary.
Liquidity zones should form automatically at swing pivot highs and lows, tracking breakout and retest behavior to identify when structural order flow has been absorbed or rejected.
Every trend signal should be immediately translatable into a defined trade with entry, stop loss, and multiple take profit levels without requiring manual measurement.
This shifts trend analysis from reactive signal-following into a structured, position-aware framework with automated liquidity context.
Theoretical Foundation
The indicator combines EMA baseline smoothing, Average True Range volatility measurement, unidirectional trailing stop logic, pivot-based liquidity zone construction, and configurable position sizing methodology.
A fixed-length EMA provides the trend baseline for directional reference and trail anchor calculation, while ATR offers volatility-normalized scaling for trail distance and zone thickness. Pivot detection identifies swing highs and lows that become liquidity zones, tracking break and retest conditions as price interacts with these levels. The position tool converts signal events into visually complete trade setups with risk-proportional take profit projections.
Four internal systems operate in tandem:
Trend Engine : Computes EMA baseline and maintains a volatility-scaled unidirectional trailing stop that advances with trend and reverses only on a confirmed close-based crossover.
Liquidity Zone System : Detects swing pivot highs and lows using a configurable lookback, constructs zones at each pivot, and monitors break and retest behavior with dynamic visual state updates.
Break and Retest Engine : Identifies when price closes through existing liquidity zones, marks broken zones with faded appearance, and detects subsequent retests for continuation confirmation signals.
Position Tool : Generates entry, stop loss, and three configurable R-multiple take profit levels on every signal, with selectable entry mode and optional left-edge pinning behavior.
This design allows each system component to inform the others - trail position sets stop loss distance, liquidity zones provide structural context, and break or retest events produce additional signal conditions beyond the primary trail crossover.
How It Works
Liquidity Trail Signals evaluates price through a sequence of structure-aware processes:
Baseline Calculation : EMA smoothing of close price over a configurable length creates a directional trend reference used as the trail anchor point.
Trail Positioning : In bullish trend, the trail sits below the EMA acting as dynamic support; in bearish trend, the trail sits above the EMA acting as dynamic resistance.
Trail Advancement Logic : The bullish trail can only rise, never fall; the bearish trail can only fall, never rise, creating a unidirectional risk boundary that locks in favorable progress.
Trend State Switches : Price closing below the bullish trail triggers a bearish state switch with a diamond signal marker; price closing above the bearish trail triggers a bullish state switch with a diamond signal marker.
Pivot Detection : Swing highs and lows identified using a configurable lookback window are registered as liquidity zone anchor points at their respective price levels.
Zone Construction : Each pivot creates a forward-extending box sized to current volatility, colored to reflect whether the level represents supply (swing high) or demand (swing low).
Break Detection : A close above a zone's upper boundary triggers a bullish break; a close below the lower boundary triggers a bearish break, updating the zone's appearance to a broken state.
Retest Detection : After a confirmed break, price re-entering the zone and closing back on the correct side registers a retest event, updating the zone label and reinforcing the border.
Zone Management : Maximum zone count is enforced using FIFO rotation; broken zones are optionally retained or removed immediately based on user preference.
Position Tool Construction : On the signal entry bar, close price is used as entry, the trail level is used as stop loss, and R-multiple projections are calculated for three configurable take profit targets.
Position Extension : All position lines, labels, and the risk box extend to the current bar each tick with optional left-edge pinning to the current bar or locking to the original entry bar.
Together, these elements form a continuously updating structural framework that connects trend state, liquidity context, and trade management into a single coherent system.
Interpretation
Liquidity Trail Signals should be interpreted as a unified trend and structure system with integrated position management context:
Bullish Trend State (Green) : Established when price remains above the adaptive trailing stop, indicating sustained upward momentum with the trail acting as dynamic rising support.
Bearish Trend State (Red) : Established when price remains below the adaptive trailing stop, signaling sustained downward momentum with the trail acting as dynamic falling resistance.
Trend Cloud : Gradient-filled zone between the EMA baseline and trailing stop provides visual reference for the structural gap between smoothed price and the dynamic risk boundary.
◆ Buy Signals : Green diamond markers appear on the trail when trend state switches from bearish to bullish, indicating a confirmed structural momentum shift to the upside.
◆ Sell Signals : Red diamond markers appear on the trail when trend state switches from bullish to bearish, signaling a confirmed structural momentum shift to the downside.
Colored Candles : Bar coloring reflects current trend state for immediate directional reference across the full price history.
Supply Zones (Red Boxes) : Volatility-sized zones at swing pivot highs marking areas of likely overhead supply or historical selling pressure.
Demand Zones (Green Boxes) : Volatility-sized zones at swing pivot lows marking areas of likely structural support or historical buying interest.
Broken Zone Appearance : Faded fill with reduced border opacity indicates price has closed through the zone, signaling absorption or displacement of that liquidity pool.
Retested Zone Labels : Updated label text and thickened border indicates a broken zone has been successfully retested, confirming role reversal from support to resistance or vice versa.
Position Tool Overlay : Visual trade layout showing entry level, stop loss at the current trail, and TP1/TP2/TP3 at configurable R-multiples with color-graded lines and labeled price levels.
Trail direction, zone interaction behavior, and the structural position of price relative to liquidity pools outweigh isolated candle patterns or short-term price oscillations.
Liquidity Zones
The liquidity zone system detects swing pivot highs and lows using a configurable lookback window and constructs forward-extending boxes at each pivot level, creating an automated structural map of likely supply and demand concentrations without manual placement.
Zone behavior follows a defined lifecycle:
Active Zones : Newly created zones display with standard fill opacity, indicating an untested liquidity pool that price has not yet interacted with following creation.
Broken Zones : When price closes through a zone boundary, the box transitions to a faded broken state using configurable opacity, signaling that the liquidity pool has been absorbed or displaced. Bullish breaks of supply zones and bearish breaks of demand zones each generate distinct alert conditions.
Retested Zones : After a confirmed break, if price returns to the zone and closes back on the originating side, the zone is marked as retested with updated label text and a reinforced border, confirming role reversal behavior.
Zone Rotation : When the maximum zone count is reached, the oldest zone is removed to maintain chart clarity. Broken zones can optionally be retained using the Keep Broken Zones setting, allowing historical structural context to remain visible until naturally rotated out.
Zone thickness is controlled by the Zone Thickness multiplier, allowing adjustment of how wide each liquidity band appears relative to current volatility. Extending the forward projection through the Extend Bars parameter keeps zones visible further into the right side of the chart for ongoing reference.
Liquidity zone alerts include bullish and bearish break conditions for immediate displacement detection, and bullish and bearish retest conditions for role-reversal confirmation, enabling systematic monitoring of structural level interactions without constant manual observation.
Position Tool
The position tool automatically constructs a complete trade layout on every signal bar, converting trend state switches or trail retest entries into structured, risk-defined setups with entry, stop loss, and three take profit levels calculated from the current risk distance.
Two entry modes are available:
Signal Change : The position tool draws immediately on the bar where trend state flips, using close as entry and the current trail as stop loss. This mode prioritizes responsiveness and captures the full move from the initial crossover.
Trail Retest : After a trend flip, the system waits for price to pull back and touch the trail before triggering, using the touch bar's close as entry. This mode prioritizes confirmation and typically offers a tighter risk-to-reward setup by entering at a structurally tested trail level rather than the initial crossover candle.
Stop loss is always set at the trail level at the time of entry, ensuring the risk boundary reflects the dynamic structural floor or ceiling rather than a fixed distance.
Three take profit levels are calculated as R-multiples of the entry-to-stop distance:
TP1 : First partial target at configurable R, typically used for early profit protection or a break-even scale-out level.
TP2 : Second target at configurable R, representing a standard reward objective relative to the defined risk.
TP3 : Third target at configurable R, displayed with a full-opacity line as the extended profit objective and runner target.
The risk zone between entry and stop loss is shaded with a subtle background fill to provide immediate visual reference for the defined risk area on each setup. Left-edge behavior is controlled by the Pin to Current Bar setting - when disabled, the left edge locks to the original entry bar preserving the historical trade layout; when enabled, it slides with the current bar for a compact forward-looking view. All lines, labels, and the risk box extend automatically to the current bar plus the configured Extend Bars offset.
Signal Logic & Visual Cues
Liquidity Trail Signals presents four primary interaction signals:
Buy Signal (◆) : Green diamond appears when trend state switches from bearish to bullish via trailing stop crossover, suggesting momentum shift to upside with a new dynamic support level established.
Sell Signal (◆) : Red diamond displays when trend state switches from bullish to bearish via trailing stop crossunder, indicating momentum shift to downside with a new dynamic resistance level established.
Liquidity Break : Generated when price closes through an active supply or demand zone, signaling displacement of the identified liquidity pool and potential continuation in the breakout direction.
Liquidity Retest : Generated when price returns to a broken zone and closes back on the originating side, confirming role reversal and offering secondary entry confirmation in the breakout direction.
Alert generation covers all four signal categories - bull and bear trend signals, bull and bear zone breaks, bull and bear zone retests, and bull and bear trail retest entries - enabling systematic monitoring across all interaction types.
Strategy Integration
Liquidity Trail Signals fits within structural trend-following and liquidity-aware approaches:
Trail-Based Risk Management : Use the trailing stop as the primary risk boundary - close long positions when price closes below the bullish trail, close short positions when price closes above the bearish trail.
Liquidity Zone Confluence : Enter trend-aligned positions when price retests broken demand zones during bullish trend states or broken supply zones during bearish trend states for structural confirmation.
Position Tool Execution : Use the automatically generated entry, stop loss, and take profit levels as trade management anchors rather than manually measuring risk-reward from each signal.
Trail Retest Entry Refinement : Switch to Trail Retest mode for entries requiring structural confirmation, accepting a slightly later entry in exchange for a higher-probability setup at a tested trail level.
Zone Cluster Analysis : Monitor areas where multiple liquidity zones stack in close proximity as these represent denser structural memory with heightened probability of meaningful price reactions.
Multi-Level Take Profit Laddering : Use TP1 as an initial scale-out to reduce risk, TP2 as the primary profit objective, and TP3 as a runner target held while the trail continues to advance.
Multi-Timeframe Confirmation : Apply higher-timeframe trend state as a directional filter for lower-timeframe entries, ensuring zone interactions and trail crossovers are taken in the direction of broader structural momentum.
Technical Implementation Details
Core Engine : Configurable EMA baseline with ATR volatility measurement and adjustable trail distance multiplier
Trail Model : Unidirectional advancing logic anchored to EMA, reversing only on confirmed close-based crossover
Pivot System : Configurable swing lookback for high and low detection with forward-extending zone construction
Zone Lifecycle : Active, broken, and retested states with automatic appearance transitions and FIFO rotation at maximum zone capacity
Position Tool : Dual entry mode system (Signal Change / Trail Retest) with R-multiple take profit calculation and optional left-edge pinning
Visualization : Trend cloud fill between EMA and trail, diamond signal markers, colored candles, and full position tool overlay
Signal Logic : State-switch detection for trend signals, close-based break detection for zone signals, and touch-then-close retest confirmation
Performance Profile : Optimized for real-time execution across all timeframes with efficient zone management and minimal object overhead
Optimal Application Parameters
Timeframe Guidance:
1 - 5 min : Scalping with responsive trail settings and tighter zone thickness for high-frequency structural interaction
15 - 60 min : Intraday momentum following with balanced trail distance and standard zone management
4H - Daily : Swing-level structural trend identification with wider trail tolerance and extended zone projection
Suggested Baseline Configuration:
MA Length : 28
ATR Length : 15
Trail Distance : 1.25 ATR
Swing Lookback : 12
Zone Thickness : 0.35 ATR
Max Zones : 3
Extend Bars : 50
Keep Broken Zones : Enabled
Broken Zone Fade : 88
Entry Mode : Signal Change
TP1 : 1.0R | TP2 : 2.0R | TP3 : 3.0R
Bullish Color : Green (#00ff00)
Bearish Color : Red (#ff0000)
These suggested parameters should be used as a baseline; their effectiveness depends on the asset's volatility profile, trending characteristics, and preferred signal frequency, so fine-tuning is expected for optimal performance.
Parameter Calibration Notes
Use the following adjustments to refine behavior without altering the core logic:
Trail too close or loose : Adjust Trail Distance to modify how far the trailing stop sits from the EMA baseline - lower values create tighter trails with more frequent flips, higher values create looser trails with greater trend persistence.
Too many liquidity zones cluttering the chart : Reduce Max Zones to focus on the most recent structural levels, or decrease Swing Lookback to reduce pivot detection sensitivity.
Zones breaking too frequently : Reduce Zone Thickness to narrow zone bands, requiring price to move further through the level before a break is registered.
Missing important swing levels : Increase Swing Lookback to detect only the most significant pivots rather than minor swings, creating fewer but higher-conviction zone levels.
Broken zones too distracting : Increase Broken Zone Fade toward 95-100 to make broken zones nearly invisible while retaining chart history, or disable Keep Broken Zones to remove them immediately upon break.
Position tool entries too aggressive : Switch Entry Mode to Trail Retest to require price to return to and confirm the trail before constructing the position layout.
Take profit levels too conservative or extended : Adjust TP1, TP2, and TP3 R-multiple values to match the typical reward structure of the traded instrument and timeframe.
Position tool lines extending too far : Reduce Position Tool Extend Bars to keep the forward projection compact relative to recent price action.
Adjustments should be incremental and evaluated across multiple session types rather than isolated market conditions.
Performance Characteristics
High Effectiveness:
Trending markets with clear directional persistence where the trail advances continuously without frequent state reversals
Instruments with defined swing structure where pivot highs and lows create meaningful liquidity concentrations
Momentum continuation strategies using broken and retested liquidity zones as structured re-entry points
Swing trading approaches benefiting from automated position tool construction and multi-R take profit laddering
Markets where role reversal behavior at broken supply and demand zones occurs with sufficient regularity for zone retest signals to add value
Reduced Effectiveness:
Choppy, range-bound markets with frequent trail crossovers producing whipsaw signals and repeated position tool resets
News-driven or gapped markets with discontinuous price action that bypasses trail logic and creates incomplete zone interactions
Markets with irregular swing structure where pivot detection produces levels at unsuitable price points
Consolidation and sideways price action where trend-following methodologies inherently struggle due to absence of sustained directional movement
Integration Guidelines
Confluence : Combine with BOSWaves structure analysis, volume indicators, or session-based levels for additional zone confirmation
Trail Respect : Honor the trailing stop as the primary risk boundary - maintain positions while price respects the trail and close positions on confirmed breach
Zone Prioritization : Focus on liquidity zones that align with the current trend state - demand zones during bullish trends, supply zones during bearish trends
Position Tool Discipline : Use the automatically constructed position levels as pre-defined management anchors, avoiding manual adjustment of stop loss beyond the trail level
Retest Patience : Where zone retest signals are present in trend direction, treat them as higher-conviction continuation setups relative to raw trail crossover entries
State Discipline : Maintain directional bias aligned with current trend state until a confirmed trail breach occurs, regardless of short-term oscillation within the cloud
Multi-Timeframe Alignment : Use higher timeframe trend state as a directional filter for lower timeframe entries to ensure structural confluence across time horizons
Disclaimer
Liquidity Trail Signals is a professional-grade trend following and structural liquidity detection tool. It uses volatility-normalized trailing stops, pivot-based zone construction, and integrated position sizing but does not predict future price movements. Results depend on market conditions, parameter selection, and disciplined execution. BOSWaves recommends deploying this indicator within a broader analytical framework that incorporates price structure, volume context, and comprehensive risk management. Indicator

Alpha SuperTrend Signal [identityKa]Overview
The Alpha SuperTrend Signal is a highly optimized trend-following system designed to fix the inherent lagging issues found in traditional SuperTrend indicators. While standard SuperTrends use fixed ATR multipliers across all timeframes, this script features a proprietary Auto-Adaptive Sensitivity Engine. It dynamically adjusts its own mathematical parameters based on the chart's timeframe, ensuring rapid response times during intraday scalping while maintaining robust, noise-free structural integrity on macro swing charts.
The Auto-Adaptive Engine Logic
Standard SuperTrends often fail because a 3.0x multiplier is too slow for a 15-minute chart and too volatile for a Daily chart. This script solves that computationally:
Intraday Scalping (≤ 15m): The engine automatically drops the ATR multiplier to 1.8x, hugging the price action tightly to catch micro-reversals early.
Day Trading (≤ 60m): The engine adjusts the multiplier to a balanced 2.2x, filtering out mid-session noise while capturing the dominant daily trend.
Swing/Macro (≥ 4H): The engine defaults to a wider 2.6x to 3.0x multiplier to prevent premature stop-outs from standard market pullbacks.
(Note: Traders can disable the Auto-Adaptive engine in the settings and manually input their preferred fixed multiplier).
Flawless Visuals & Aesthetics
To maintain a clean, institutional-grade chart, the script features "Flawless Label Positioning." Instead of plotting BUY/SELL signals randomly above or below candle wicks (which often causes visual clutter during high volatility), the script mathematically anchors the signal labels directly to the exact pivot coordinate of the SuperTrend line itself. This creates a visually perfect and undeniable invalidation point.
HUD Dashboard & AI Trade Logic
The integrated on-chart panel evaluates the distance between the live price and the active SuperTrend line to output a mechanical suggestion:
Dangerous: Triggered whenever the current closing price enters within a 0.5 ATR threshold of the SuperTrend line. This mathematically indicates that the trend is actively being tested, stop-losses are vulnerable, and a structural flip is highly probable. Traders should exercise extreme caution and avoid entering new trend-continuation setups.
LONG / SHORT: Triggered when the price is trending safely in the direction of the SuperTrend (LONG for a green line, SHORT for a red line) and is comfortably outside the 0.5 ATR danger zone.
How to Use It
Traders should use the painted candlesticks and the Alpha ST Line to define their strict directional bias. When a new BUY or SELL label prints, wait for a pullback. Execute trades only when the AI Suggestion reads "LONG" or "SHORT," and use the step-line itself as a trailing stop-loss to manage risk mathematically. Indicator

Advanced UT-Trail System Pros [identityKa]Overview
The Advanced UT-Trail System Pro is a comprehensive trend-following and trade management indicator. Built upon the foundation of Average True Range (ATR) trailing stops, this script introduces dynamic timeframe adaptation and Heikin-Ashi noise filtering to provide smoother, more reliable structural signals. It is designed to keep traders in prevailing trends longer while mathematically defining risk and automated profit targets.
Core Calculations & Engine
The indicator relies on a robust trailing stop logic driven by volatility:
1-) ATR Volatility Baseline: It calculates the ATR over a user-defined period (default 10). This value is multiplied by a "Base Key Value" to determine the strict distance the trailing stop will maintain from the price action.
2-) Heikin-Ashi Filtering: Traditional price action can cause premature stop-outs due to market noise. By default, this script pulls Heikin-Ashi close data (ticker.heikinashi) as the source (src) for the trailing calculation. This dramatically smooths the underlying data feed, preventing false wick-outs.
3-) Auto-Adaptive Sensitivity: To combat the lag inherent in macro trailing stops on lower timeframes, the script features an adaptive multiplier engine. If the trader switches to an intraday timeframe (≤ 60 minutes) or a scalp timeframe (≤ 15 minutes), the script mathematically reduces the Base Key Value multiplier (e.g., $a \times 0.6$), tightening the trailing stop dynamically to suit the faster price action.
Dynamic Trade Management
Upon the confirmation of a directional flip (the source crossing the trailing stop line), the script plots actionable data:
Trailing Stop Line: A step-line visualizes the exact, non-repainting invalidation level.
Auto Take-Profit Projection: Utilizing the exact ATR value at the moment of the signal, the script automatically projects and draws Target 1 (TP1) and Target 2 (TP2) dashed lines into the future. These targets are based on predefined ATR multipliers (default 1.5x and 3.0x), enforcing a mechanical risk-to-reward ratio.
HUD Dashboard & AI State Tracker
The integrated on-chart panel aggregates the current system data:
Engine Mode: Displays whether the script is operating in SCALP, DAY, or SWING sensitivity mode based on the current chart.
AI Suggestion: Evaluates the proximity of the current price to the trailing stop.
LONG / SHORT: Triggered when the price is safely trending in the direction of the trailing stop.
Dangerous: Triggered strictly when the current closing price enters a 0.2 ATR threshold of the trailing stop line. This mathematical condition acts as a warning that the trend is actively being tested and a reversal may be imminent.
How to Use It
Traders should utilize the printed BUY/SELL labels as macro directional bias. The trailing step-line serves as an objective, mechanical Stop-Loss level. When entering a position, traders can use the automatically projected TP1 and TP2 lines to scale out of their positions incrementally. If the AI Suggestion shifts to "Dangerous", it is a mechanical cue to protect capital, tighten stops manually, or avoid adding to existing positions. Indicator

CUSUM Trend [AlgoPoint]The CUSUM Trend by AlgoPoint brings hedge-fund-level quantitative analysis directly to your charts. While standard moving averages suffer from lag and fakeouts, this script utilizes an advanced Cumulative Sum (CUSUM) algorithm, deeply re-engineered with adaptive volatility and volume-weighted metrics to identify true market regimes.
It is designed to protect traders from choppy markets and explicitly capture high-probability, volume-backed trend breakouts before they become obvious to the retail crowd.
🧠 Under the Hood: The Quant Mechanics
Instead of a basic price deviation model, the CUSUM Trend operates on four advanced pillars:
- Zero-Lag Kernel (Ehlers SuperSmoother): We replaced traditional MAs with John Ehlers' SuperSmoother filter to establish a mathematically zero-lag baseline.
- Volume-Weighted Residuals: Price deviations (residuals) only build up the CUSUM pressure pools if they are backed by institutional volume. Low-volume spikes are treated as noise and explicitly filtered out.
- Fractal Dimension (Adaptive Thresholds): By using a proxy for the Hurst Exponent, the engine "reads" the market state. In choppy conditions, the bands expand defensively to prevent fakeouts. In trending conditions, they tighten aggressively.
- Asymmetric Volatility: The algorithm calculates upside and downside variance independently, recognizing that market drops are often much sharper than rallies.
📊 How to Read the Chart
- The Dynamic Trend Cloud: The asymmetric bands represent the institutional pressure thresholds. When price breaks and confirms outside this zone, a regime change (Bull/Bear trend) is triggered.
- Gradient Candles: Candle colors dynamically shift based on the built-up CUSUM pressure. Bright green/red indicates extreme breakout momentum, while faded colors represent a stable trend or a ranging market.
- Trailing Stop: Once a trend is established, the opposite side of the threshold acts as a dynamic trailing stop line, allowing you to ride the trend to its mathematical exhaustion.
- Hybrid Dashboard: Monitor the internal breakout pressure, fractal regime, and exact trailing stop value in real-time without cluttering your main view.
⚙️ How to Use It
- Sensitivity Profiles: Choose between Fast (Day Trade), Balanced (Swing), or Slow (Trend) in the settings. The engine automatically recalculates all internal variance and fractal thresholds based on your choice.
- Automation Ready: Fully compatible with webhook automation (3Commas, PineConnector, etc.) via dynamic JSON alerts triggering on confirmed regime breakouts.
Disclaimer: This indicator is for educational and analytical purposes only. Past performance is not indicative of future results. Indicator

Vector Logic: Macro Regime SwingVector Logic: Macro Regime Swing 🦅
Most standard moving average strategies fail because they cannot tell the difference between a true trending market and a sideways "chop zone" (accumulation/distribution). They constantly fire false 'BUY' and 'SELL' signals while the asset is just moving sideways, leading to a slow bleed of your capital.
The Vector Logic: Macro Regime Swing indicator was built to solve exactly that. Instead of just looking for trends, this script mathematically detects when a stock has fallen asleep, throws up a visual "Trap," and sits safely on the sidelines until a real breakout happens.
⚙️ How the Engine Works
This indicator combines four engines/logics to confirm a trade:
1. The Macro Trap (The Purple Lines) 🟪
The script constantly monitors the last 60 days of price action. If the asset goes just 7 days without making a new 60-day high or low, the indicator declares the stock is "chopping."
• It instantly draws a faint purple ceiling and floor on your chart.
• While the price is trapped inside this purple chop zone, all trades are strictly blocked. You sit safely on the sidelines.
2. The Trend Engine (The Blue & Orange Lines) 🌊
For a trend to be valid, the script requires structural alignment. We use a classic, robust Moving Average crossover:
• Fast Trend: 20-period EMA (Cyan)
• Slow Trend: 50-period EMA (Orange)
• The price must be aggressively crossing the 20 EMA in the direction of the trend to trigger an entry.
3. The Volume Consensus 📊
A breakout without volume is a trap. The script monitors On-Balance-Volume (OBV) in the background. A trade will only fire if institutional volume is actively pushing the price in your direction.
4. The Momentum Exit (The Yellow Dotted Line) 🟡
Getting into a trade is only half the battle; keeping your profits is the other.
Instead of waiting for the price to crash all the way back down to the 20 or 50 EMA, this script uses a rapid 10-period EMA (the dotted yellow line) as a tight trailing stop. The moment a daily candle closes on the wrong side of this yellow line, the script ruthlessly exits the trade to lock in your momentum profits.
⏱️ Adapting for Smaller Timeframes
By default, the VL Macro Regime is tuned for Daily (1D) swing trading. However, the engine is fully dynamic. When you drop down to intraday timeframes (like 1H, 15m, or 5m), keep in mind that "Days" in the settings menu translates directly to "Candles" or "Bars". If you want to trap a true macro-level chop zone on a 15-minute chart, you should increase your Historical Range Lookback (e.g., 100 to 200 bars) to capture the overarching structure of the week. For highly aggressive day trading, you can also tighten the Trend MAs (e.g., 9 and 21) to catch rapid intraday momentum breakouts before the volume fades.
💡 How to Read the Chart
• BUY / SELL Labels: A clean, confirmed breakout. The trend is aligned, volume is backing it up, and the stock has escaped the purple Macro Trap.
• EXIT Circles: The tiny grey circles tell you exactly when the price closed across the yellow 10 EMA trailing stop. Time to take your profits and step away.
• TP Flags: Subtle green flags suggest a standard 5% partial Take-Profit zone.
• The Dashboard HUD: Located in the top right, this panel gives you a real-time pulse check on the current trade status, volatility state, and volume trend.
🛠️ Built-In Failsafes
• Zero Repainting: All signals are strictly hardcoded to the candle close (barstate.isconfirmed). What you see on a closed daily candle is permanently locked in history. No flickering, no vanishing signals.
• Glitch Protection: Automatically untethers and resets itself if it encounters broken historical data or extreme anomalies (like leveraged ETF reverse splits).
Disclaimer: This script is for educational and informational purposes only. It does not constitute financial advice. Always backtest strategies and manage your own risk. Indicator

Premium Price Action [Alpha Extract]A sophisticated trend-following rail system that combines dual-lookback price averaging with adaptive ATR-based trailing levels for clean trend identification and momentum-sensitive visual feedback. Utilizing staircase rail logic with dynamic ribbon visualization and strength-modulated transparency, this indicator delivers institutional-grade trend detection with minimal whipsaw through intelligent rail adaptation. The system's multi-lookback baseline construction combined with ATR-scaled distance creates robust trend rails that only flip on genuine structural changes while maintaining visual clarity through glow effects and regime-based background coloring.
🔶 Advanced Dual-Lookback Baseline Framework
Implements sophisticated baseline calculation using two configurable lookback periods to sample recent price history at different intervals, averaging results and applying dual smoothing for stable trend reference. The system retrieves close prices from first lookback (default 12 bars) and second lookback (default 27 bars), calculates their average, applies SMA smoothing, then EMA smoothing for ultra-clean baseline resistant to short-term noise while maintaining responsiveness to genuine trend shifts.
// Dual-Lookback Baseline Construction
Close_1 = close
Close_2 = close
Close_Avg = (Close_1 + Close_2) / 2.0
Baseline_Raw = ta.sma(Close_Avg, SMA_Length)
Baseline = ta.ema(Baseline_Raw, Smooth_Length)
🔶 Adaptive Trailing Rail Architecture
Features intelligent rail calculation that trails price using ATR-scaled distance from baseline with ratcheting logic preventing premature reversals. The system calculates upper rail (baseline + ATR × multiplier) and lower rail (baseline - ATR × multiplier), implements adaptive trailing where bullish rail only rises or holds while bearish rail only falls or holds, and transitions rails only when price violates opposite rail creating clean staircase pattern.
// Adaptive Rail Logic
Upper_Rail = Baseline + ATR * Rail_Multiplier
Lower_Rail = Baseline - ATR * Rail_Multiplier
// Ratcheting Behavior
Bull_Rail = close > Bull_Rail ? max(Lower_Rail, Bull_Rail ) : Lower_Rail
Bear_Rail = close < Bear_Rail ? min(Upper_Rail, Bear_Rail ) : Upper_Rail
// Trend Determination
Trend = close < Bull_Rail ? -1 : close > Bear_Rail ? 1 : Trend
🔶 Staircase Step-Line Visualization
Implements stepline plot style creating distinctive staircase appearance that visually emphasizes trend persistence and makes rail level changes instantly recognizable. The system uses plot.style_stepline rendering that draws horizontal segments at each rail level with vertical connections only at transition points, producing clean geometric pattern that distinguishes this rail system from curved moving averages or bands.
🔶 Dynamic Strength-Based Transparency
Provides sophisticated transparency modulation where background and ribbon opacity adjust based on momentum strength relative to ATR volatility. The system calculates momentum as price distance from baseline, normalizes by ATR to produce 0-1 strength score, and reduces transparency (increases intensity) as strength increases, creating visual feedback where strong trends display vivid colors and weak trends show muted tones.
🔶 Multi-Layer Glow Effect System
Features triple-layer rail rendering with progressively wider and more transparent outer layers creating luminous glow effect emphasizing trend rail. The system plots core rail at specified width with full color intensity, adds inner glow layer at +2 width with moderate transparency, and outer glow at +4 width with higher transparency, producing visual depth and making rail instantly recognizable without cluttering chart space.
🔶 Adaptive Ribbon Visualization
Creates ATR-scaled ribbon extending below bullish rail or above bearish rail with width proportional to current volatility and transparency modulated by trend strength. The system calculates ribbon size using ATR × ribbon multiplier, positions ribbon adjacent to active rail, and applies dynamic transparency that intensifies during strong momentum creating intuitive visual representation of trend conviction and volatility context.
🔶 Regime Background Highlighting
Implements subtle background wash using trend color with strength-adjusted transparency providing full-chart regime awareness without obscuring price action. The system applies bullish or bearish background color with base transparency that decreases (color intensifies) as momentum strength increases, creating gradient effect where powerful trends display more prominent backgrounds while weak trends maintain subtle presence.
🔶 Intelligent Flip Detection Logic
Generates trend reversal signals only when price violates opposite rail with confirmation, preventing false signals during normal retracements. The system detects bullish flip when previous trend bearish and close crosses above bearish rail, detects bearish flip when previous trend bullish and close crosses below bullish rail, and places compact BULL/BEAR labels at ribbon edges marking exact reversal bars for clear visual confirmation.
🔶 Comprehensive Visual Integration
Provides multi-dimensional trend visualization through colored rail with glow effects, ATR-scaled ribbons, regime backgrounds, trend-synchronized candle plotting, and optional chart candle coloring. The system enables selective display toggling for each visual component while maintaining consistent color scheme and strength-based intensity across all elements, allowing customization from minimal (rail only) to comprehensive (all features) presentation.
🔶 Baseline Reference System
Includes optional baseline plot showing underlying smoothed dual-lookback average serving as neutral reference level and trend bias indicator. The system displays baseline with neutral color at reduced opacity, enabling traders to assess whether price trades above baseline (inherent bullish bias) or below baseline (inherent bearish bias) independent of current rail trend state for confluence analysis.
🔶 Performance Optimization Framework
Employs efficient calculation methods with optimized rail ratcheting logic, streamlined strength calculations, and intelligent plot rendering that only processes active visual elements. The system includes smart state tracking for trend persistence, minimal recalculation overhead through nz() functions and conditional logic, and smooth visual updates maintaining consistent performance across extended historical periods.
🔶 Why Choose Premium Price Action ?
This indicator delivers sophisticated trend-following analysis through adaptive rail methodology with dual-lookback baseline construction and ATR-scaled distance. Unlike traditional moving average systems prone to whipsaw during choppy conditions, the ratcheting rail logic with opposite-rail violation requirements creates definitive trend states that persist through normal retracements. The system's staircase visualization instantly communicates trend persistence, strength-modulated transparency provides conviction feedback, and comprehensive visual integration enables complete trend assessment without switching between multiple indicators. Perfect for swing traders and position managers seeking clear trend identification with minimal false signals across cryptocurrency, forex, and equity markets where the adaptive rails naturally adjust to varying volatility regimes while maintaining consistent signal quality. Indicator

Neighboring Trailing Stop [LuxAlgo]The Neighboring Trailing Stop indicator provides a dynamic, data-driven trailing stop-loss mechanism by analyzing the local distribution of prices relative to the current market position. It uses a "k-nearest neighbors" approach to identify support and resistance levels based on historical price clusters, offering a unique alternative to standard volatility-based stops like ATR.
🔶 USAGE
The indicator helps traders identify trend reversals and manage open positions by providing a protective stop that adjusts based on where price has historically "congested" near the current level.
🔹 Trend Interpretation
Bullish Trend: When the stop-loss line is below the price (colored green), the market is in a bullish state. The trailing stop will only move upward, securing profits as the price creates new local distribution highs.
Bearish Trend: When the stop-loss line is above the price (colored red), the market is in a bearish state. The trailing stop will only move downward, following the price as it explores lower distribution zones.
🔹 Signals
The script plots "B" (Buy) and "S" (Sell) labels at the point of trend reversals. These occurs when the price breaks through the current "neighboring" distribution boundary, suggesting a shift in the local market structure.
🔶 DETAILS
The methodology behind this indicator is rooted in non-parametric statistics and price distribution analysis rather than simple moving averages or volatility.
🔹 Price Distribution & K-Neighbors
The script maintains a "Historical Buffer" of recent prices in a sorted array. For every new bar, it identifies the position of the current price within this sorted distribution. It then looks at k neighbors above the price and k neighbors below the price.
🔹 Percentile Bands
Within these local "neighborhoods" of price data, the script calculates a specific percentile. This allows the indicator to ignore outliers and focus on where the bulk of historical price action occurred near the current level. If the price moves into a "discovery" phase where it exceeds the range of its historical neighbors, a trend reversal is triggered.
🔹 Trailing Logic
The resulting levels are smoothed via an SMA to prevent erratic jumps. The trailing stop is "ratcheted"—meaning it can only move in the direction of the trend (up for long, down for short)—ensuring that realized gains are protected even if the distribution neighborhood expands.
🔶 SETTINGS
Historical Buffer (Bars): Determines how many historical price points are kept in the distribution memory. A larger buffer considers more history, leading to more stable but slower-reacting levels.
Neighboring Range (K): The number of price points to analyze immediately above and below the current price. Smaller values make the stop more sensitive to local price changes.
Percentile: Controls the depth within the neighborhood used for the stop level. A higher percentile (e.g., 90) places the stop further away from the current price.
Smoothing: Applies a Simple Moving Average (SMA) to the raw distribution levels to create a smoother trailing line.
Indicator

Indicator

SuperTrend Recovery [LuxAlgo]The SuperTrend Recovery indicator provides a modified version of the classic SuperTrend algorithm that incorporates a dynamic "recovery" mechanism designed to adjust the trailing stop when price action moves significantly against the current trend. This script aims to help traders manage volatile environments by tightening the trend band when the market experiences deep pullbacks without triggering a full trend reversal.
🔶 USAGE
The indicator can be used similarly to a standard SuperTrend to identify market direction and potential trailing stop-loss levels. However, the unique recovery logic allows for a more adaptive response to price deviations.
🔹 Trend Detection
When the price is above the band, the indicator signals a BULL trend.
When the price is below the band, the indicator signals a BEAR trend.
Trend switches are marked with "BULL" or "BEAR" labels and a colored circle at the switch point.
🔹 Recovery Mechanism
In a standard SuperTrend, the band stays flat if price moves against the trend (but doesn't break it). In the SuperTrend Recovery version, if the price drops significantly below the "Switch Price" (for a bull trend) or rises above it (for a bear trend), the band begins to move toward the price based on the Recovery Alpha . This allows the trailing stop to "catch up" during high-volatility pullbacks, potentially securing a faster exit if the recovery fails.
🔶 DETAILS
The core of this indicator lies in its two-stage calculation: the Base SuperTrend and the Recovery Logic.
🔹 Base Logic
The indicator calculates a base upper and lower band using the Average True Range (ATR) multiplied by a user-defined factor. Under normal conditions, the band follows the classic rules: it can only move up during a bull trend and only down during a bear trend.
🔹 Recovery Logic
When price enters a "loss" state relative to the price where the trend initially started (the Switch Price), the script checks if the deviation exceeds the Recovery Threshold .
If the threshold is met, the band is calculated as an exponential moving average (EMA) of the current price and the previous band value, weighted by the Recovery Alpha :
targetBand = alpha * close + (1.0 - alpha) * prevBand
This creates a "tapering" effect where the band aggressively tightens toward the price during deep retracements, helping to mitigate drawdown by providing an earlier exit signal compared to the standard static band.
🔶 SETTINGS
🔹 Supertrend Settings
ATR Length : The lookback period used to calculate market volatility.
Base Multiplier : The factor applied to the ATR to determine the distance of the band from the price.
🔹 Recovery Logic
Recovery Alpha (%) : Determines how quickly the band adjusts toward the price when the recovery logic is active. Higher values make the band more reactive.
Recovery Threshold (xATR) : The distance (in ATR units) the price must deviate from the switch price before the recovery mechanism activates.
🔹 Visualization
Show Gradient Fills : Toggles the background gradient between the price (source) and the SuperTrend band.
Show Signal Labels : Toggles the "BULL" and "BEAR" labels at trend reversal points.
Indicator

Adaptive Trend Sabre [BOSWaves]Adaptive Trend Sabre - Dynamic Trailing Stop System with Tension-Based Support and Resistance Detection
Overview
Adaptive Trend Sabre is a tension-aware trend following system that tracks directional price movement through adaptive trailing stops, where band positioning dynamically adjusts based on price tension relative to the trend baseline and automatically generates support and resistance levels when extreme tension conditions are released.
Instead of relying on fixed trailing stop distances or static support/resistance plotting, trend state, band positioning, and level creation are determined through ATR-normalized tension measurement, elastic snap detection, and dynamic level management that maintains only the most relevant price zones.
This creates dynamic trend boundaries that reflect actual price tension rather than arbitrary technical levels - tightening during low-tension conditions when trend conviction is high, maintaining distance during stretched conditions when directional stress builds, and capturing snap levels at extremes to mark future support and resistance zones where price demonstrated significant elasticity.
Price is therefore evaluated relative to bands that adapt to tension dynamics and historically significant stress-release points rather than conventional fixed-distance trails.
Conceptual Framework
Adaptive Trend Sabre is founded on the principle that meaningful trend signals emerge when price maintains position relative to adaptive trailing stops that adjust based on tension dynamics, while significant support and resistance zones form at locations where extreme price tension is released back toward equilibrium.
Traditional trailing stop methods use fixed ATR multipliers that ignore the underlying tension dynamics and stress accumulation that occur during extended moves. This framework replaces static-distance logic with tension-driven band construction informed by actual price elasticity and snap behavior relative to the trend baseline.
Three core principles guide the design:
Trend direction should be determined by adaptive trailing stop breaches that adjust to maintain optimal distance from the moving average baseline.
Support and resistance levels should form automatically at points where extreme price tension releases, marking zones of proven price elasticity.
Tension measurement reveals whether price is operating within normal bounds or building stress that may lead to reversal or continuation acceleration.
This shifts trend analysis from fixed-distance trailing stops into adaptive, tension-anchored confidence boundaries with intelligent level detection.
Theoretical Foundation
The indicator combines configurable moving average smoothing, Average True Range volatility measurement, tension-based trailing stop logic, and snap-release level detection methodology.
A user-selected MA type (HMA, EMA, SMA, WMA, DEMA, TEMA, VWMA, ALMA, LSMA) provides the trend baseline for directional reference, while ATR offers volatility-normalized scaling for distance calculation and tension measurement. Tension detection identifies when price has stretched beyond threshold distances relative to the baseline, tracking extremes and triggering level creation upon release. The trailing stop advances in favorable trend direction but never retreats, creating a dynamic risk boundary.
Four internal systems operate in tandem:
Trend Baseline Engine : Computes user-selected moving average of price for directional reference and tension calculation anchor point.
Volatility Measurement System : Calculates 14-period ATR to provide adaptive scaling that normalizes distance and tension across varying market conditions.
Adaptive Trailing Logic : Maintains trailing stop at configurable ATR distance from baseline, advancing in trend direction but never reversing until price crosses the trail.
Snap-Level Detection System : Monitors tension thresholds, captures price extremes during stretched conditions, and creates support/resistance lines at release points with automatic extension and break management.
This design allows trend boundaries to reflect actual price behavior dynamics rather than reacting mechanically to fixed distance rules.
How It Works
Adaptive Trend Sabre evaluates price through a sequence of tension-aware processes:
Baseline Calculation : Selected MA type smoothing of close price creates a directional trend reference that filters short-term noise.
ATR Distance Scaling : 14-period ATR calculation multiplied by trail factor determines optimal trailing stop distance from baseline.
Trail Positioning : In bullish trend, trail sits below MA at ATR distance; in bearish trend, trail sits above MA at ATR distance.
Trail Advancement Logic : Bullish trail can only rise (never fall); bearish trail can only fall (never rise), creating unidirectional risk boundary.
Trend State Switches : Price closing below bullish trail triggers bearish state switch; price closing above bearish trail triggers bullish state switch.
Tension Measurement : Distance between close and MA baseline divided by ATR creates normalized tension reading showing price elasticity.
Snap Detection : When absolute tension exceeds snap threshold (default 2.0 ATR), system enters "snapped" state and begins tracking price extremes.
Extreme Capture : During bullish snap (tension > +2.0), highest high is recorded; during bearish snap (tension < -2.0), lowest low is recorded.
Release Identification : When tension returns below half the snap threshold after being snapped, system registers a release event at the captured extreme.
Level Creation : Release of bullish snap creates resistance line at captured high; release of bearish snap creates support line at captured low.
Level Management : Lines extend forward in time and are automatically deleted when price closes beyond buffer distance (0.25 ATR), maintaining only 8 most recent levels.
Retest Detection : Price touching trail or snap levels after cooldown period marks retests, with minimum bar spacing preventing excessive plotting.
Together, these elements form a continuously updating trend framework anchored in tension dynamics and elastic price behavior.
Interpretation
Adaptive Trend Sabre should be interpreted as tension-anchored trend boundaries with automated support/resistance detection:
Bullish Trend State (Green) : Established when price remains above adaptive trailing stop, indicating sustained upward momentum with trail acting as dynamic support.
Bearish Trend State (Red) : Established when price remains below adaptive trailing stop, signaling sustained downward momentum with trail acting as dynamic resistance.
Elastic Cloud : Visual gradient zone displays between MA baseline and trailing stop, with fill intensity reflecting current tension level - lighter when tension is low, darker when tension builds.
Tension Dynamics : High tension (>2.0 ATR) indicates price stretched far from baseline; low tension (<1.0 ATR) indicates price operating near equilibrium.
◆ Buy Signals : Green diamond markers appear when trend state switches from bearish to bullish at trail crossover, indicating momentum shift to upside.
◆ Sell Signals : Red diamond markers appear when trend state switches from bullish to bearish at trail crossunder, signaling momentum shift to downside.
✦ Retest Markers : Small diamonds identify price retouching trail or support/resistance levels during bullish/bearish trends after cooldown period.
Dotted Support Lines (Green) : Horizontal levels created at bearish snap releases, marking zones where price demonstrated extreme downward elasticity.
Dotted Resistance Lines (Red) : Horizontal levels created at bullish snap releases, marking zones where price demonstrated extreme upward elasticity.
Colored Candles : Bar coloring reflects current trend state for immediate visual reference.
Tension measurement, snap behavior, and trail dynamics outweigh isolated price movements.
Signal Logic & Visual Cues
Adaptive Trend Sabre presents three primary interaction signals:
Buy Signal (◆) : Green diamond appears when trend state switches from bearish to bullish via trailing stop crossover, suggesting momentum shift to upside with new dynamic support level established.
Sell Signal (◆) : Red diamond displays when trend state switches from bullish to bearish via trailing stop crossunder, indicating momentum shift to downside with new dynamic resistance level established.
Retest Confirmation (✦) : Small diamonds mark price revisiting trail or snap levels after cooldown period, suggesting trend continuation at established support/resistance zones.
Snap level creation provides automatic support/resistance detection when extreme tension conditions release, marking zones of proven price elasticity without manual drawing.
Alert generation covers trend state switches (bullish/bearish signals) and retest occurrences for systematic monitoring.
Strategy Integration
Adaptive Trend Sabre fits within adaptive trend-following and dynamic support/resistance approaches:
Trail-Based Position Management : Use trailing stop as primary risk boundary - exit long positions when price closes below bullish trail, exit short positions when price closes above bearish trail.
Snap Level Entry Refinement : Enter trends on retest of snap support/resistance levels for lower-risk entry points within established directional moves.
Tension-Aware Sizing : Reduce position sizing during high tension periods (>2.5 ATR) as price operates in stretched conditions with elevated reversal risk.
Multi-Level Zone Analysis : Monitor density of snap levels - clustered support/resistance zones indicate stronger price memory areas warranting attention.
Cloud-Aligned Directional Bias : Favor trades aligning with current trend state color rather than counter-trend positions against the trail.
Retest-Based Re-entry : Use retest signals as continuation confirmation opportunities to add to or re-enter positions within established trends.
Multi-Timeframe Trail Confirmation : Apply higher-timeframe trend state to filter lower-timeframe entry precision, entering only when trails align across timeframes.
Technical Implementation Details
Core Engine : Configurable MA baseline (HMA, EMA, SMA, WMA, DEMA, TEMA, VWMA, ALMA, LSMA) with 14-period ATR volatility measurement
Trail Model : Unidirectional advancing logic with ATR-scaled distance from MA baseline
Tension System : Normalized distance calculation with threshold-based snap detection (default 2.0 ATR)
Level Construction : Extreme capture during snap conditions with release-triggered line creation at high/low points
Level Management : FIFO queue with maximum capacity (default 8 levels), automatic extension, and break-based deletion with buffer zone
Visualization : Gradient-filled elastic cloud with bar coloring, diamond signals, and extended dotted snap levels
Signal Logic : State-switch detection with retest buffer (default 5 bars) and cooldown mechanisms
Performance Profile : Optimized for real-time execution across all timeframes with efficient level management
Optimal Application Parameters
Timeframe Guidance:
1 - 5 min : Micro-trend tracking for scalping with responsive trail distance settings
15 - 60 min : Intraday momentum following with balanced snap threshold characteristics
4H - Daily : Swing-level trend identification with sustained trail protection
Suggested Baseline Configuration:
MA Type : HMA
MA Length : 34
Trail Distance : 3.25 ATR
Snap Threshold : 2.0 ATR
Level Break Buffer : 0.25 ATR
Maximum Levels : 8
Show Retests : Enabled
Retest Cooldown : 5 bars
Bullish Color : Green (#00ff00)
Bearish Color : Red (#ff0000)
These suggested parameters should be used as a baseline; their effectiveness depends on the asset's volatility profile, trending characteristics, and preferred signal frequency, so fine-tuning is expected for optimal performance.
Parameter Calibration Notes
Use the following adjustments to refine behavior without altering the core logic:
Trail too close/loose : Adjust Trail Distance multiplier to modify how far the trailing stop sits from MA baseline - lower values create tighter trails with more frequent switches, higher values create looser trails with greater trend persistence.
Excessive snap levels : Increase Snap Threshold to demand more extreme tension before snap detection activates, reducing level creation frequency.
Missed important levels : Decrease Snap Threshold toward 1.5 ATR to capture less extreme tension releases as support/resistance zones.
Levels breaking too easily : Increase Level Break Buffer to require price to close further beyond snap lines before deletion.
Too many levels cluttering chart : Decrease Maximum Levels to maintain fewer historical snap zones, focusing on most recent tension releases.
Baseline too reactive : Increase MA Length for smoother trend reference that filters more short-term noise, or switch to slower MA types (SMA, ALMA).
Baseline too slow : Decrease MA Length for more responsive trend tracking, or switch to faster MA types (HMA, DEMA, TEMA).
Excessive retest markers : Increase Retest Cooldown to space out retest signals and reduce visual noise.
Adjustments should be incremental and evaluated across multiple session types rather than isolated market conditions.
Performance Characteristics
High Effectiveness:
Trending markets with clear directional persistence and sustained moves away from baseline
Instruments with consistent volatility characteristics where ATR scaling normalizes effectively
Momentum continuation strategies using trail as dynamic support/resistance boundary
Swing trading approaches benefiting from automated snap level detection at tension extremes
Breakout strategies where snap levels mark zones of proven elasticity for retest entries
Reduced Effectiveness:
Choppy, range-bound markets with frequent trail crossovers causing whipsaw signals
Extremely low volatility environments where snap threshold becomes difficult to breach
News-driven or gapped markets with discontinuous price action that bypasses trail logic
High-frequency mean-reversion dominant conditions where price oscillates around MA baseline
Consolidation and sideways price action where trend-following methodologies inherently struggle due to lack of sustained directional movement
Integration Guidelines
Confluence : Combine with BOSWaves structure analysis, volume indicators, or traditional support/resistance zones
Trail Respect : Honor trailing stop as primary risk boundary - close positions when trail is breached regardless of other factors
Level Awareness : Pay attention to snap level clusters as these represent zones of historical price memory and tension release
Tension Monitoring : Track tension readings to identify overextended conditions (>2.5 ATR) warranting profit-taking or position reduction
Retest Utilization : Treat retest signals as continuation confirmation opportunities rather than reversal warnings
State Discipline : Maintain directional bias aligned with current trend state until trail breach occurs
Multi-Timeframe Alignment : Use higher timeframe trend state as filter for lower timeframe entries to ensure confluence across time horizons
Disclaimer
Adaptive Trend Sabre is a professional-grade trend following and dynamic support/resistance detection tool. It uses ATR-normalized trailing stops with tension-based snap level creation but does not predict future price movements. Results depend on market conditions, volatility characteristics, parameter selection, and disciplined execution. BOSWaves recommends deploying this indicator within a broader analytical framework that incorporates price structure, volume context, and comprehensive risk management. Indicator

Dynamic Extreme Channels & Reversals [LuxAlgo]The Dynamic Extreme Channels & Reversals indicator provides an adaptive framework for identifying price extremes and trend shifts through self-adjusting boundaries. Unlike static channels, this tool dynamically resets its levels based on price activity, offering a responsive environment for trend following and mean-reversion analysis.
🔶 USAGE
The indicator functions by tracking the highest highs and lowest lows over a specific window. When the price fails to make a new extreme within the defined period, the boundaries contract toward the current price action. This behavior creates a "breathing" channel that adapts to market volatility and consolidation phases.
Users can toggle between two primary viewing modes:
Channel Mode: Displays the upper, lower, and midline boundaries. This is ideal for identifying overextended price levels and potential mean-reversion targets.
Trailing Stop Mode: Simplifies the visual output into a single step-line that tracks the lower boundary during uptrends and the upper boundary during downtrends, serving as a dynamic exit or trend-following level.
🔹 Reversal Signals
The script includes built-in reversal signals designed to catch "blow-off" tops or "panic" bottoms where price briefly exceeds a boundary but immediately loses momentum.
Bullish Signal (▲): Occurs when the price hits a new lower extreme (LL) but the current candle manages to peak back above the channel midline.
Bearish Signal (▼): Occurs when the price hits a new higher extreme (HH) but the current candle manages to drop below the channel midline.
The sensitivity and frequency of these signals are directly influenced by the Lookback Period and Reset Alpha % :
Lookback Period: A shorter lookback causes the channel boundaries to "reset" more frequently. This results in tighter channels and more frequent reversal signals, as the midline becomes easier to cross. A longer lookback creates wider, more stable channels, resulting in fewer, high-conviction signals.
Reset Alpha %: This determines how aggressively the levels move toward the price after the lookback period expires. A high Alpha (e.g., 100%) creates sharp adjustments, which can lead to rapid signal generation during choppy markets. A lower Alpha creates smoother transitions, filtering out noise in the reversal logic.
🔶 DETAILS
The core logic avoids standard rolling maximum/minimum functions to provide a more "sticky" boundary. Instead of the channel edge constantly moving with every bar, it remains fixed until a new extreme is reached or the "timer" (Lookback Period) runs out.
When the timer runs out, the level interpolates toward the price based on the Reset Alpha. This simulates a decaying memory of past price extremes, ensuring the indicator remains relevant even after long periods of sideways movement.
🔶 SETTINGS
🔹 Core Settings
Lookback Period: The number of bars the indicator waits before adjusting an extreme level if no new high/low is found.
Reset Alpha %: Controls the intensity of the level adjustment. 100% resets the level entirely to the current price, while 0% keeps it static.
Trailing Stop Mode: Switches the display from a three-line channel to a single trend-following stop line.
🔹 Visuals
Show Reversal Signals: Toggles the visibility of the triangle reversal labels.
Upper Color: Customizes the color and transparency of the upper boundary.
Midline Color: Customizes the color and transparency of the center line.
Lower Color: Customizes the color and transparency of the lower boundary.
🔹 Dashboard
Dashboard: Toggles the on-screen information panel.
Position: Controls the location of the dashboard on the chart.
Size: Controls the scale of the dashboard text and cells.
Indicator

Smart SafeZone Stops [MarkitTick]💡 This script represents a sophisticated evolution of volatility-based trailing stop methodologies. It is designed to assist traders in managing trend-following positions by dynamically adjusting stop-loss levels based on market noise, directional momentum, and volume flows. Unlike static trailing stops that move by a fixed percentage or simple ATR multiples, this tool calculates the "safe zone" by analyzing how far price has penetrated against the trend over a specific lookback period, offering a granular approach to risk management that adapts to changing market conditions.
✨ Originality and Utility
The primary utility of this indicator lies in its ability to filter out market noise while remaining tight enough to protect profits during strong trends. While the classic SafeZone concept (popularized by Dr. Alexander Elder) is effective, this script introduces several modern enhancements that increase its robustness:
● Dynamic ADX Integration Standard SafeZone stops use a fixed multiplier. This script integrates the Average Directional Index (ADX) to gauge trend strength. When the trend is strong, the stop tightens (Aggressive Multiplier) to lock in profits rapidly. When the trend is weak or choppy, the stop widens (Conservative Multiplier) to prevent premature shakeouts. ● Volume-Weighted Noise Price movement on low volume is often considered "noise," while high-volume movement signifies conviction. This script optionally weights the noise calculation by Relative Volume. A downward spike on low volume will affect the stop level less than a downward spike on high volume.
● 3-Day Smoothing Mechanism To prevent the stop line from becoming too jagged or reacting to single-bar anomalies, the script applies a 3-day smoothing algorithm. It utilizes the "worst-case" scenario of the last three calculated stop levels, ensuring the stop only moves when the trend structure genuinely shifts.
🔬 Methodology and Concepts
The underlying logic operates on a "Ratchet" mechanism, meaning the stop line can only move in the direction of the trade (up for longs, down for shorts) and never retraces until a trend reversal occurs.
● Directional Noise Calculation The script separates market noise into two components: Downside Penetration (for Longs): The distance the price dips below the previous bar's low. Upside Penetration (for Shorts): The distance the price spikes above the previous bar's high. The average of these penetrations is calculated over the Noise Lookback Period .
● The SafeZone Formula The raw stop level is derived as follows: Long Stop = Previous Low - (Average Downside Noise × Multiplier) Short Stop = Previous High + (Average Upside Noise × Multiplier)
● Adaptive Multiplier Logic If Dynamic ADX is enabled: If ADX > Strong Threshold: Use Aggressive Multiplier (e.g., 1.5x). If ADX < Weak Threshold: Use Conservative Multiplier (e.g., 3.5x). Otherwise: Use the Base Safety Coefficient.
● Exhaustion Detection The script calculates the distance between the current Close price and the Active Stop. If this distance exceeds a specific multiple of the ATR (Average True Range), it flags a "Mean Reversion" or "Exhaustion" warning, suggesting price has extended too far from equilibrium.
🎨 Visual Guide
The indicator plots distinct visual elements to guide decision-making without cluttering the chart excessively.
● Trailing Stop Lines Green Line (Solid): Represents the SafeZone Long Stop. This line appears below price during an uptrend. As long as price closes above this line, the bullish bias is intact. Red Line (Solid): Represents the SafeZone Short Stop. This line appears above price during a downtrend. A close above this line signals a potential short exit or reversal.
● Trend Signals Green Triangle (Below Bar): Marks the "Bull Start." This occurs when the price crosses above the Trend Filter EMA and the trend logic flips to bullish. Red Triangle (Above Bar): Marks the "Bear Start." Indicates the start of a downtrend sequence.
● Exhaustion Warnings Yellow Labels (⚠️): These appear when price has extended significantly away from the stop line (based on the ATR Exhaustion Multiplier). This is not an immediate sell signal but a warning that the trend may be overextended and a pullback is probable.
● MTF Consensus Cloud Background Color: If enabled, the chart background changes color to reflect the Higher Timeframe (HTF) trend. Green Background: Current trend matches HTF Uptrend. Red Background: Current trend matches HTF Downtrend. Gray Background: Trends are mismatched (Consolidation/Conflict).
● Quantitative Dashboard A table located in the top-right corner displays real-time statistics: Trend: Current state (BULLISH/BEARISH). Age: Number of bars since the trend began. Stop Price: Exact price level of the trailing stop. Risk %: The percentage distance from the current Close to the Stop. If this exceeds 3%, the text turns red to highlight elevated risk. Active Mult: The current multiplier being used (Dynamic or Fixed). ADX State: Shows if the trend is Strong, Weak, or Normal.
📖 How to Use
1. Entry Timing Wait for a Trend Switch signal (Triangle). For a long entry (Green Triangle), ensure the price is above the Trend Baseline (EMA). Ideally, look for confluence with the MTF Cloud (Green Background).
2. Position Management Once in a trade, use the Trailing Stop Line as your hard exit or invalidation point. Do not manually move the stop away from price; the script automatically "ratchets" the stop tighter as the trend progresses.
3. Taking Profits Use the "Exhaustion Warnings" (⚠️) as opportunities to scale out of positions. When price moves parabolically away from the stop line, the probability of a snap-back increases.
4. Managing Chop If the dashboard shows "ADX State: WEAK," expect the stop line to remain wider. This allows the asset "room to breathe" without stopping you out on random volatility.
⚙️ Inputs and Settings
The script is highly customizable to fit different asset classes (Crypto, Forex, Stocks).
● Trend Definitions Trend Filter (EMA Length): Determines the baseline trend bias (Default: 22). Price must be above this EMA to initiate a long calculation.
● Noise Calculation Noise Lookback Period: The number of bars used to calculate average penetration (Default: 10). Base Safety Coefficient: The standard multiplier applied to the noise average (Default: 2.5). Higher values = wider stops. Use Volume Weighting: Enables the volume-adjustment logic. Use 3-Day Smoothing: Recommended keeping this TRUE to avoid stop-hunts.
● Dynamic Multiplier (ADX) Enable Dynamic ADX: Toggles the adaptive multiplier. Strong/Weak Thresholds: The ADX levels that trigger aggressive or conservative multipliers.
● Multi-Timeframe Consensus Higher Timeframe: Select the TF for the cloud background (e.g., Daily or Weekly).
● Exhaustion Warning ATR Multiplier: Defines how far price must be from the stop to trigger a warning (Default: 3.0).
🔍 Deconstruction of the Underlying Scientific and Academic Framework
The "Smart SafeZone" indicator is grounded in the statistical analysis of market noise versus signal.
● Theory of Noise Penetration Conventional stops often use Standard Deviation (Bollinger Bands) or Average True Range (Keltner Channels/Chandelier Stops). While effective, these measures assume volatility is symmetrical. This script adopts the view that directional volatility matters more. In an uptrend, upside volatility is "good" signal, while downside volatility is "noise." By explicitly calculating the average downside penetration (Low - Low), the script isolates the specific counter-trend force acting on the asset. ● Volume-Weighted Price Analysis (VWPA) The inclusion of volume weighting draws upon Dow Theory principles, which state that volume must confirm the trend. Math: Penetration × (Volume / AverageVolume) This formula asserts that a price drop on low volume is statistically less significant than a drop on high volume. By dampening the impact of low-volume moves, the stop becomes more resistant to liquidity vacuums and algorithmic stop-hunts.
● Trend Efficiency (ADX) The integration of J. Welles Wilder’s ADX (Average Directional Index) adds a dimension of Trend Efficiency. High ADX values indicate a highly efficient trend with little retracement. Mathematically, this justifies a lower standard deviation (or noise multiplier) for the stop, as the probability of a deep retracement without a trend change is lower in high-momentum environments.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicator

Apex Adaptive TrailApex Adaptive Trail: Adaptive Volatility Trend System
This custom trend-following indicator improves on standard SuperTrend implementations by addressing two key weaknesses: excessive whipsaws during high volatility and false signals in ranging markets.
Core Logic:
- Synthetic Heikin Ashi values are calculated internally (without changing chart candles) to provide smoother source data for trend detection.
- ATR-based trailing stop with adaptive multiplier: dynamically adjusts between 0.8x and 1.5x the base factor based on current volatility (ATR / 50-period SMA of ATR). Widens in volatile conditions, tightens in quiet markets.
- Weighted Confluence Score (0-100%): Combines four independent filters, each contributing 25%:
• Price position relative to 21-period EMA (trend alignment)
• ADX > 20 (momentum strength)
• Choppiness Index < 60 (trending vs ranging detection)
• Alignment with Daily EMA(50) trend direction
Signals are only generated when price crosses the adaptive trail AND the confluence score exceeds 75% (standard) or 90% (MAX 🔥 ultra-strong). This combination significantly reduces low-quality entries compared to traditional SuperTrend crossovers.
Key Features:
- Dynamic confidence cloud (opacity based on score)
- Real-time dashboard showing volatility state, active filters, trend bias, and estimated historical win rate
- Optional dynamic/fixed profit targets
- Fully customizable filters and adaptive behavior
Usage: Best on 15m to 4H timeframes for trend-following strategies (Crypto, Forex, Indices). Enter on APEX signals, use trail as stop-loss, TP lines for partial exits.
This script integrates established concepts into a unique adaptive framework with volatility-responsive risk management and multi-filter validation.
Disclaimer: For educational and analysis purposes only. Past performance is not indicative of future results. Always use proper risk management.
"This script combines established indicators (ATR trailing, ADX, Choppiness Index, EMA, MTF) into a unique adaptive system with dynamic volatility adjustment and weighted confluence scoring – features not found together in standard SuperTrend variations."
Indicator

Adaptive ML Trailing Stop [BOSWaves]Adaptive ML Trailing Stop – Regime-Aware Risk Control with KAMA Adaptation and Pattern-Based Intelligence
Overview
Adaptive ML Trailing Stop is a regime-sensitive trailing stop and risk control system that adjusts stop placement dynamically as market behavior shifts, using efficiency-based smoothing and pattern-informed biasing.
Instead of operating with fixed ATR offsets or rigid trailing rules, stop distance, responsiveness, and directional treatment are continuously recalculated using market efficiency, volatility conditions, and historical pattern resemblance.
This creates a live trailing structure that responds immediately to regime change - contracting during orderly directional movement, relaxing during rotational conditions, and applying probabilistic refinement when pattern confidence is present.
Price is therefore assessed relative to adaptive, condition-aware trailing boundaries rather than static stop levels.
Conceptual Framework
Adaptive ML Trailing Stop is founded on the idea that effective risk control depends on regime context rather than price location alone.
Conventional trailing mechanisms apply constant volatility multipliers, which often results in trend suppression or delayed exits. This framework replaces static logic with adaptive behavior shaped by efficiency state and observed historical outcomes.
Three core principles guide the design:
Stop distance should adjust in proportion to market efficiency.
Smoothing behavior must respond to regime changes.
Trailing logic benefits from probabilistic context instead of fixed rules.
This shifts trailing stops from rigid exit tools into adaptive, regime-responsive risk boundaries.
Theoretical Foundation
The indicator combines adaptive averaging techniques, volatility-based distance modeling, and similarity-weighted pattern analysis.
Kaufman’s Adaptive Moving Average (KAMA) is used to quantify directional efficiency, allowing smoothing intensity and stop behavior to scale with trend quality. Average True Range (ATR) defines the volatility reference, while a K-Nearest Neighbors (KNN) process evaluates historical price patterns to introduce directional weighting when appropriate.
Three internal systems operate in tandem:
KAMA Efficiency Engine : Evaluates directional efficiency to distinguish structured trends from range conditions and modulate smoothing and stop behavior.
Adaptive ATR Stop Engine : Expands or contracts ATR-derived stop distance based on efficiency, tightening during strong trends and widening in low-efficiency environments.
KNN Pattern Influence Layer : Applies distance-weighted historical pattern outcomes to subtly influence stop placement on both sides.
This design allows stop behavior to evolve with market context rather than reacting mechanically to price changes.
How It Works
Adaptive ML Trailing Stop evaluates price through a sequence of adaptive processes:
Efficiency-Based Regime Identification : KAMA efficiency determines whether conditions favor trend continuation or rotational movement, influencing stop sensitivity.
Volatility-Responsive Scaling : ATR-based stop distance adjusts automatically as efficiency rises or falls.
Pattern-Weighted Adjustment : KNN compares recent price sequences to historical analogs, applying confidence-based bias to stop positioning.
Adaptive Stop Smoothing : Long and short stop levels are smoothed using KAMA logic to maintain structural stability while remaining responsive.
Directional Trailing Enforcement : Stops advance only in the direction of the prevailing regime, preserving invalidation structure.
Gradient Distance Visualization : Gradient fills reflect the relative distance between price and the active stop.
Controlled Interaction Markers : Diamond markers highlight meaningful stop interactions, filtered through cooldown logic to reduce clustering.
Together, these elements form a continuously adapting trailing stop system rather than a fixed exit mechanism.
Interpretation
Adaptive ML Trailing Stop should be interpreted as a dynamic risk envelope:
Long Stop (Green) : Acts as the downside invalidation level during bullish regimes, tightening as efficiency improves.
Short Stop (Red) : Serves as the upside invalidation level during bearish regimes, adjusting width based on efficiency and volatility.
Trend State Changes : Regime flips occur only after confirmed stop breaches, filtering temporary price spikes.
Gradient Depth : Deeper gradient penetration indicates increased extension from the stop rather than imminent reversal.
Pattern Influence : KNN weighting affects stop behavior only when historical agreement is strong and remains neutral otherwise.
Distance, efficiency, and context outweigh isolated price interactions.
Signal Logic & Visual Cues
Adaptive ML Trailing Stop presents two primary visual signals:
Trend Transition Circles : Display when price crosses the opposing trailing stop, confirming a regime change rather than anticipating one.
Stop Interaction Diamonds : Indicate controlled contact with the active stop, subject to cooldown filtering to avoid excessive signals.
Alert generation is limited to confirmed trend transitions to maintain clarity.
Strategy Integration
Adaptive ML Trailing Stop fits within trend-following and risk-managed trading approaches:
Dynamic Risk Framing : Use adaptive stops as evolving invalidation levels instead of fixed exits.
Directional Alignment : Base execution on confirmed regime state rather than speculative reversals.
Efficiency-Based Tolerance : Allow greater price fluctuation during inefficient movement while enforcing tighter control during clean trends.
Pattern-Guided Refinement : Let KNN influence adjust sensitivity without overriding core structure.
Multi-Timeframe Context : Apply higher-timeframe efficiency states to inform lower-timeframe stop responsiveness.
Technical Implementation Details
Core Engine : KAMA-based efficiency measurement with adaptive smoothing
Volatility Model : ATR-derived stop distance scaled by regime
Machine Learning Layer : Distance-weighted KNN with confidence modulation
Visualization : Directional trailing stops with layered gradient fills
Signal Logic : Regime-based transitions and controlled interaction markers
Performance Profile : Optimized for real-time chart execution
Optimal Application Parameters
Timeframe Guidance:
1 - 5 min : Tight adaptive trailing for short-term momentum control
15 - 60 min : Structured intraday trend supervision
4H - Daily : Higher-timeframe regime monitoring
Suggested Baseline Configuration:
KAMA Length : 20
Fast/Slow Periods : 15 / 50
ATR Period : 21
Base ATR Multiplier : 2.5
Adaptive Strength : 1.0
KNN Neighbors : 7
KNN Influence : 0.2
These suggested parameters should be used as a baseline; their effectiveness depends on the asset volatility, liquidity, and preferred entry frequency, so fine-tuning is expected for optimal performance.
Parameter Calibration Notes
Use the following adjustments to refine behavior without altering the core logic:
Excessive chop or overreaction : Increase KAMA Length, Slow Period, and ATR Period to reinforce regime filtering.
Stops feel overly permissive : Reduce the Base ATR Multiplier to tighten invalidation boundaries.
Frequent false regime shifts : Increase KNN Neighbors to demand stronger historical agreement.
Delayed adaptation : Decrease KAMA Length and Fast Period to improve responsiveness during regime change.
Adjustments should be incremental and evaluated over multiple market cycles rather than isolated sessions.
Performance Characteristics
High Effectiveness:
Markets exhibiting sustained directional efficiency
Instruments with recurring structural behavior
Trend-oriented, risk-managed strategies
Reduced Effectiveness:
Highly erratic or event-driven price action
Illiquid markets with unreliable volatility readings
Integration Guidelines
Confluence : Combine with BOSWaves structure or trend indicators
Discipline : Follow adaptive stop behavior rather than forcing exits
Risk Framing : Treat stops as adaptive boundaries, not forecasts
Regime Awareness : Always interpret stop behavior within efficiency context
Disclaimer
Adaptive ML Trailing Stop is a professional-grade adaptive risk and regime management tool. It does not forecast price movement and does not guarantee profitability. Results depend on market conditions, parameter selection, and disciplined execution. BOSWaves recommends deploying this indicator within a broader analytical framework that incorporates structure, volatility, and contextual risk management. Indicator

Indicator
