Indicator

Trender [IQ]IQ Trender - TradingIQ
🔹 OVERVIEW
IQ Trender is a non-repainting trend rail built around one simple visual language:
Flat = range. Ramp = trend. Brightness = conviction.
Most trend tools try to follow every movement in price. In sideways conditions, that can leave you reading a line that bends, twitches, and changes direction inside the same noise you were trying to filter.
IQ Trender is designed to behave differently. While the market remains inside its adaptive hold zone, the rail stays deliberately flat. When the underlying trend evidence becomes strong enough, it commits to a rising or falling leg and moves in one direction until that condition genuinely changes.
The result is a clean distinction between three market states:
Holding - the rail is flat and the market is being treated as a range or consolidation.
Rising - the rail has committed to an upward leg.
Falling - the rail has committed to a downward leg.
Direction is shown by color. Conviction is shown by color intensity and glow. The Trender Radar explains the current state numerically, while the Ghost Forecast extends the rail's present trajectory into a fading uncertainty cone.
This is a trend-reading and visualization tool, not a signal service. It does not issue buy or sell calls, and it makes no claim of profitability or predictive certainty.
🔹 THE ONE-LINE MENTAL MODEL
The fastest way to read IQ Trender is to ignore the mathematics at first and watch the shape of the rail:
A flat rail means the model is holding through noise.
An upward ramp means the model has committed to a rising leg.
A downward ramp means the model has committed to a falling leg.
A stronger glow means the estimated trend is showing greater statistical conviction.
This is the same sequence demonstrated in the walkthrough: a directional leg can flatten during a pause, pullback, or consolidation, then recommit if the broader move resumes. The bearish interpretation is the mirror image - falling leg, flat hold, then a renewed falling leg if downside evidence returns.
The flat section is important. It is not a prediction that a breakout is about to happen. It is the indicator saying that current movement has not earned a directional commitment.
🔸 HOW THE ENGINE WORKS
IQ Trender combines three separate jobs: estimating the trend beneath price, deciding whether that trend is statistically meaningful, and drawing a rail that cannot wiggle backward within a committed leg.
Track the underlying trend
A robust local-linear Kalman filter estimates the level and slope beneath the candles. Unlike a conventional moving average that applies a fixed weighting pattern, this is a state-estimation model: it updates its estimate from the difference between expected and observed price.
Large isolated deviations are reduced with a robust update, so a single wick cannot directly yank the rail to a new location. The model also adapts its measurement-noise estimate as conditions change.
⬞
Measure the uncertainty
The filter calculates an innovation deviation - a live estimate of how much movement is normal relative to its current model. IQ Trender uses that value to size the hold band.
When conditions are noisy, the tolerance can widen. When conditions are calmer, it can tighten. This lets the same mental model adapt across different symbols, price levels, and timeframes without using one fixed distance everywhere.
⬞
Test for commitment and change
The estimated slope is compared with its own uncertainty to produce conviction. Hysteresis uses separate thresholds for entering and leaving a committed trend, helping prevent repeated state changes near one boundary.
A two-sided cumulative change test also monitors standardized price surprises. That evidence helps the rail distinguish a genuine opposing change from ordinary counter-movement when a leg is already active.
⬞
Draw the rail
The visible rail is a separate, slew-limited ratchet guided by the Kalman center. Once an upward leg begins, the rail can only move upward until a valid reversal or hold condition is reached. Once a downward leg begins, it can only move downward.
That monotone-within-leg behavior is what creates IQ Trender's signature geometry: flat holds connected by clean directional ramps instead of a line that bends around every candle.
🔹 THE ADAPTIVE HOLD BAND
The shaded band is the rail's live range corridor.
While the rail is holding, the band opens around it to show the volatility-adjusted area in which price can move without forcing a directional leg. When the rail commits to a trend, the displayed band eases shut onto the rail because the model has left its holding state. When the rail becomes flat again, the band gradually reopens.
The band should be read as a model tolerance, not as conventional support and resistance. Price moving within it means the model can continue to hold. Movement beyond it contributes evidence for a new leg, but it is not, by itself, a guaranteed breakout or trade entry.
🔸 COLOR, GLOW & CONVICTION
IQ Trender communicates direction and commitment through one coordinated visual system:
Rising color - active upward leg.
Falling color - active downward leg.
Holding color - neutral, flat state.
Glow intensity - visual emphasis derived from the current conviction reading.
Conviction measures how strongly the estimated slope differs from zero relative to the model's uncertainty. It is a statistical strength reading, not the probability that a trade will win.
The palette is generated in the Oklab perceptual color space. Hue, lightness, and vibrancy can be adjusted as a coordinated system, while out-of-gamut colors are compressed toward neutral instead of clipping harshly.
Accessibility controls include deuteranopia, protanopia, and tritanopia modes, plus automatic contrast correction against the chart background. A selectable contrast target helps keep the rail and directional Radar accents legible across light and dark themes.
🔹 TRENDER RADAR
The Trender Radar is the live scorecard in the corner of the chart. It reports:
State - HOLDING, RISING, or FALLING.
Conviction - normalized trend commitment from 0-100%.
Slope - the rail's current rate of change per bar.
Hold Band - the current full width of the adaptive range corridor.
Behavior - the active Speed and Pursuit combination.
With Log Geometry enabled, slope is displayed as a percentage per bar and band width is expressed as a percentage of the rail. With linear geometry, both are shown in price units.
The Radar can be moved to any chart corner or disabled entirely.
🔸 GHOST FORECAST
The Ghost Forecast is a translucent forward projection of the rail's current slope.
Its centerline extends the rail's recent trajectory. The surrounding cone widens with distance to communicate increasing uncertainty, then fades away toward the horizon. Two growth modes are available:
√h - tighter near the live bar, then gradually widening like a random-walk spread.
Linear - uncertainty expands at a constant rate.
The forecast is rebuilt only at the live edge and never painted into historical bars. It can also be displayed while the rail is holding, where its centerline remains flat.
This feature is a trajectory read, not a price target. It answers, Where is the rail currently heading if its present slope persists? It does not answer, Where will price trade?
🔹 FLIP MARKERS & ALERTS
Optional markers identify confirmed changes in rail state:
▲ - committed to a rising leg.
▼ - committed to a falling leg.
◇ - flattened back into a hold, when hold markers are enabled.
Markers are created only on confirmed bars. Once printed, they do not move.
Matching alert conditions are included for:
Trender committed to a rising trend.
Trender committed to a falling trend.
Trender flattened into a hold.
These alerts report state changes in the model. They are not automated trade recommendations and should be interpreted in the context of the symbol, timeframe, market structure, and the user's own risk process.
🔸 SPEED - THE OVERALL TEMPO
Speed changes the rail's pursuit rate and the width of its hold zone together:
Glacier - calm, structural behavior for slower or higher-timeframe reading.
Slow - patient swing behavior with a wider hold zone.
Balanced - the recommended reference setting, balancing hold and tracking.
Fast - more reactive behavior for shorter intraday movement.
Scalp - the tightest and quickest micro follower.
Slower settings generally require more displacement and move the rail more gradually. Faster settings use a tighter band and pursue price more aggressively. A faster preset is not automatically better: responsiveness and noise rejection are opposing trade-offs.
🔸 PURSUIT - HOW A COMMITTED LEG MOVES
Pursuit changes the shape of an active leg without changing the underlying trend evidence:
Steady - a constant-speed ramp established when the leg begins.
Eased - pursuit speed scales with conviction and feathers toward the estimated center.
Snap - the most decisive pursuit, with a higher movement rate and faster conviction scaling.
On slower Speed presets, Snap can appear more step-like. Steady produces the cleanest constant ramps, while Eased creates a softer approach.
🔹 HOW TO READ IQ TRENDER
Start with state
Flat rail means the model is holding. Rising or falling rail means it has committed directionally. This gives the chart an immediate range-versus-trend read before any number is considered.
⬞
Weigh the leg
Use conviction, glow, and slope together. A bright rail with firm slope represents stronger model commitment. Fading conviction says the trend estimate is becoming less distinct from noise; it does not guarantee an immediate reversal.
⬞
Watch the sequence
One useful continuation framework is:
Rising rail.
Flat hold during consolidation or pullback.
New rising marker and renewed upward rail.
The bearish sequence is the inverse. This is a way to organize market context, not a complete entry system.
⬞
Keep the forecast in its proper role
Use the Ghost Forecast to visualize current trajectory and uncertainty. Do not treat the cone edge or centerline as a promised future level.
⬞
Confirm with your own process
IQ Trender can be combined with price structure, volume, liquidity, momentum, or a trader's existing risk framework. No single state, marker, or Radar value should replace position sizing and independent confirmation.
🔸 INPUTS
Behavior
Speed
Pursuit
Source & Geometry
Price Source
Use Log Geometry
Close with Log Geometry enabled is the recommended general-purpose setup for ordinary positive price series. Log mode keeps slope and band behavior proportional across different price levels.
Rail, Band & Glow
Hold Band on/off
Band transparency
Rail Glow on/off
Glow intensity
Glow spread
Rail line width
Colors
Rising, Falling, and Holding anchors
Global hue rotation
Lightness adjustment
Vibrancy adjustment
Conviction Color response
Accessibility
Color-Blind Mode
Auto Contrast
Contrast Ratio
State Readout
Show Trender Radar
Radar location
Forecast
Ghost Forecast on/off
Horizon in bars
√h or Linear cone growth
Show While Holding
Markers
Flip Markers on/off
Optional hold markers
Marker size
🔹 NON-REPAINTING BEHAVIOR
IQ Trender is calculated causally with no future-bar lookahead.
Confirmed historical rail values and confirmed flip markers remain where they were calculated. The current, still-open bar can update as new price arrives, as any live indicator can. The Ghost Forecast is intentionally rebuilt at the live edge because it represents the rail's current slope and uncertainty; it does not rewrite historical bars.
What was confirmed in history stays confirmed. What is still live remains live.
🔸 LIMITATIONS & HONEST NOTES
IQ Trender is an indicator, not a validated trading strategy. It makes no performance, win-rate, profit, or edge claim.
Kalman filtering is still a causal estimation process. It reduces noise but cannot remove lag, uncertainty, or false transitions.
Faster settings react sooner but can respond to more noise. Slower settings filter more movement but can confirm later.
A Holding state identifies insufficient directional commitment in this model; it does not guarantee that price will remain inside a range or that a breakout is imminent.
Conviction measures the strength of the estimated slope relative to uncertainty. It is not a probability of future direction or trade success.
The Ghost Forecast extrapolates the rail, not price. It is a visual scenario if the current trajectory persists, not a target or prediction.
Alerts and markers identify model state transitions only. They should not be treated as standalone entries or exits.
Results depend on symbol behavior, timeframe, data quality, and the selected Speed/Pursuit combination.
IQ Trender is built to make one difficult market question easier to see:
Is the market still ranging, or has a trend actually committed?
One rail. Three states. No hindsight redraws.
Indicator

Automated Liquidity & Key Levels Matrix PROAutomated Liquidity & Key Levels Matrix PRO
Automated Liquidity & Key Levels Matrix PRO is an advanced, multi functional technical analysis script designed for quantitative traders and technical analysts. It automatically isolates high probability support and resistance zones, tracks real time market structure breakouts with split line clarity, highlights high volume expansion candles, and provides an attractive glowing trend wave layer.
Key Features Overview
1. Ultra Attractive Glowing Trend Wave
Includes a smooth dynamic trend wave with adjustable halo glow effects, line width, and colors to easily visualize dynamic trend direction.
2. Clean Split Line Market Structure Signals
Features refined Break of Structure and Change of Character signals. The structure line splits cleanly around the centered label, leaving a gap so the text stands out clearly without line overlap.
3. Text Free Clean Major Swing Badges
Isolates major macro swing high and low extremes using text free, solid color directional badges to keep chart visuals clean and minimal.
4. Dynamic Support and Resistance Zones
Automatically maps key supply and demand ranges across price action. To keep your chart clean and easy to read, broken or mitigated zones automatically disappear as soon as price breaks through them.
5. Volume Weighted Smart Candlestick Heatmap
Combines dynamic structural trend direction with volume expansion detection. High volume expansion bars render in distinct neon pink highlights for instant volatility identification.
6. Comprehensive Customization Panel
Includes independent controls for line thickness, text colors, line colors, font sizes, wave parameters, and zone fill opacity.
How to Use
Step 1: Trend Identification
Observe the Glowing Trend Wave and Volume Weighted Smart Candlestick theme to gauge underlying trend direction.
Step 2: Monitor Dynamic Key Zones
Look for price interactions around active, unmitigated support and resistance zones.
Step 3: Analyze Clean Structure Signals
Watch for Break of Structure and Change of Character signals displayed with split lines and centered labels.
Settings Overview
Glowing Wave Settings
- Show Glowing Wave Layer: Toggle display of the dynamic trend wave.
- Wave Period & Line Thickness: Adjust wave sensitivity and visual halo glow.
Market Structure Settings
- Show Breakout Signals: Toggle structural lines and labels.
- Independent Colors & Sizes: Customize BOS/CHoCH line colors, text colors, and font sizes separately.
Support and Resistance Settings
- Show Dynamic Support & Resistance: Toggle zone rectangles.
- Zone Fill Transparency: Customize fill opacity from 0 to 100.
Major Swing Settings
- Show Clean Major Swing Badges: Toggle text free ITH/ITL pivot badges.
Disclaimer
This script is built strictly for educational, analytical, and charting enhancement purposes. It does not provide financial advice, trade recommendations, or guaranteed results. Always practice proper risk management. Indicator

Institutional SMC & Order Flow Matrix PROInstitutional SMC & Order Flow Matrix PRO
Institutional SMC & Order Flow Matrix PRO is a clean, modern, and highly versatile technical charting tool engineered for traders practicing Smart Money Concepts and Order Flow Trading. Built with a focus on visual clarity, it eliminates unnecessary chart clutter by utilizing auto mitigating execution zones, swing anchored market structure lines, and an intelligent trend heatmap.
Key Features Overview
1. Precision Anchored Market Structure
Tracks Break of Structure and Change of Character signals with extreme precision. Lines originate directly from actual swing high or low pivot prices, while structure text labels sit neatly in the center of lines to prevent candle overlap.
2. Smart Auto Mitigating Order Block Zones
Automatically maps active institutional order blocks and imbalance execution zones. Mitigated zones automatically vanish from your chart once price fills the imbalance, keeping your workspace clean and professional.
3. Institutional Candle Heatmap
Features dynamic candlestick coloring driven by macro structural pivots. Bullish trend phases render in clean vibrant green, bearish phases in deep red, and high momentum displacement candles highlight in glowing gold.
4. Major Intermediate Term High and Low Badges
Automatically detects macro structural extremes. Displays solid red Intermediate Term High badges at major resistance tops and green Intermediate Term Low badges at major support bottoms.
5. Complete Manual Customization Suite
Includes comprehensive user settings for every element. Customize line styles, line thickness, border widths, box transparency, text alignment, text colors, and font sizes.
How to Use
Step 1: Identify Macro Trend Bias
Observe the Institutional Candle Heatmap theme to quickly determine current directional order flow.
Step 2: Monitor Centered Structure Signals
Look for precise Break of Structure lines and Change of Character signals anchored directly from swing points.
Step 3: Spot Gold Displacement Candles
Identify gold highlighted expansion candles that create fresh institutional order blocks.
Step 4: Trade Active Execution Zones
Utilize unmitigated bullish and bearish order block zones for high probability entries.
Settings Overview
Market Structure Settings
- Show Market Structure: Toggle structural line displays.
- Line Style and Thickness: Choose between Solid, Dashed, or Dotted lines with adjustable width.
Order Block Zone Settings
- Show Active Order Blocks: Toggle order block rectangles.
- Zone Fill Transparency: Adjust fill opacity from 0 to 100.
- Zone Text Settings: Customize display text, text alignment, font size, and text color.
Major Pivot Settings
- Show Major ITH / ITL Badges: Toggle visibility of macro pivot badges.
- Sensitivity: Adjust pivot lookback sensitivity.
Candle Heatmap Settings
- Enable Trend Candle Heatmap: Toggle dynamic trend candles and gold displacement highlights.
Disclaimer
This indicator is built strictly for educational, analytical, and charting enhancement purposes. It does not provide financial advice, trade recommendations, or guaranteed results. Always apply proper risk management principles. Indicator

ICT London Liquidity & Structure Matrix PROICT London Liquidity & Structure Matrix PRO
ICT London Liquidity & Structure Matrix PRO is an ultra clean, professional charting tool built for traders practicing Smart Money Concepts and ICT methodologies. It isolates macro pivot points with clean blank badges, tracks Asian liquidity boundaries, highlights London Killzone sessions, and projects auto disappearing daily key levels.
Key Features Overview
1. Major High and Low Blank Badges
Marks key structural pivot extremes using clean, minimal solid badges without distracting text overlays. Major highs are marked with solid red badges, and major lows are marked with solid green badges for instant market direction identification.
2. Auto Mitigating Previous Day High and Low
Projects active daily boundaries across your chart. Previous Day High and Previous Day Low levels automatically clean up and vanish the moment price touches or mitigates them.
3. Clean Asian Session High and Low Boundaries
Tracks Asian range consolidation levels with subtle dashed lines and right aligned text labels, providing clear session liquidity targets.
4. Exclusive London Killzone Highlight
Keeps chart aesthetics clean by displaying a single, light background overlay strictly for the high volatility London Session window.
5. Dynamic Auto Mitigating Fair Value Gaps
Automatically identifies bullish and bearish price imbalances across all timeframes. Unmitigated imbalance boxes vanish as soon as price fills the gap.
How to Use
Step 1: Locate Structural Pivots
Identify major highs with red badges and major lows with green badges to assess macro trend bias and key liquidity pools.
Step 2: Monitor Asian Boundaries
Observe Asian High and Low lines created prior to the European open to anticipate potential liquidity sweeps.
Step 3: Execute During London Session
Focus on trade opportunities forming inside the highlighted London Killzone window upon retaps into active Fair Value Gaps.
Settings Overview
Pivot Badge Settings
- Show Major High / Low Blank Labels: Toggle visibility of pivot badges.
- Major Pivot Sensitivity Length: Adjust the pivot lookback period.
Previous Day High and Low Settings
- Show Active PDH / PDL: Toggle display of daily levels.
- Line Width and Style: Customize thickness and choosing between solid, dotted, or dashed lines.
Asian Session Settings
- Show Asian High & Low Levels: Toggle visibility of Asian boundary lines.
Session Highlight Settings
- Show London Killzone Highlight Only: Toggle background highlight for London trading hours.
Disclaimer
This script is built strictly for educational, analytical, and charting enhancement purposes. It does not provide financial advice, trade recommendations, or guaranteed results. Always apply proper risk management principles. Indicator

Smart Market Structure & Liquidity Engine [SMC]Smart Market Structure and Liquidity Engine
Overview and Core Philosophy
The Smart Market Structure and Liquidity Engine is a comprehensive, non-repainting technical analysis framework engineered for price action traders, ICT or SMC enthusiasts, and market structure analysts.
Instead of relying on lagging indicators or noisy indicators, this script combines Adaptive Volatility Filtering (ADX and DMI), Market Structure Shifts (BOS and CHoCH), and Previous Day Equilibrium Logic to give traders a crystal-clear view of market context, institutional bias, and premium versus discount pricing.
Key Features and Technical Mechanics
1. Adaptive Trend Wave and Dynamic Consolidation Engine
Uptrend Expansion (Neon Green): Indicates strong bullish directional bias and institutional buying pressure.
Downtrend Expansion (Hot Red): Indicates strong bearish directional bias and institutional selling pressure.
Smart Consolidation Filter (Slate Grey): Automatically detects sideways and low-momentum markets using native ADX logic. It shifts candles to neutral grey during choppy phases to prevent over-trading.
2. Structural Setup Trigger (Yellow Highlight Candle)
Replaces standard Buy and Sell verbal labels with clean visual highlights to comply with clean chart presentation standards.
Yellow Candle: Marks high-probability rejection candles that align with the active trend wave, highlighting immediate points of interest.
3. Dynamic Daily Levels and Equilibrium (PDH, EQ, PDL)
Previous Day High (PDH): Automatically draws upper daily liquidity levels.
Previous Day Low (PDL): Automatically draws lower daily liquidity levels.
50 Percent Equilibrium Line (EQ): Dynamically plots the 50 percent midpoint of the previous day range, helping traders easily distinguish between Premium (Overpriced) and Discount (Underpriced) zones.
4. Extended High-Probability Zones (Order Blocks)
Automatically plots order block zones upon key setup triggers.
Includes a Live Price Extension Feature, which extends the active zone forward so you can easily observe price reacting inside the box in real-time.
5. Non-Repainting Market Structure (BOS and CHoCH)
BOS (Break of Structure): Signals trend continuation.
CHoCH (Change of Character): Signals early structural reversal.
Built using safe, shift-corrected multi-timeframe security logic to ensure historical accuracy without repainting.
Full Settings and Customization Guide
Neon Wave Glow and Candle Settings
Wave Sensitivity Length: Adjusts how quickly the trend wave reacts to price changes (Default: 8).
Wave Range Multiplier: Controls the volatility band width (Default: 1.6).
Consolidation ADX Threshold: Set the ADX sensitivity cutoff (Lower values require tighter consolidation before turning grey).
Uptrend, Downtrend, Consolidation Colors: Fully customizable palette for chart visualization.
High-Probability Entry Signal (Yellow Candle)
Entry Trigger Sensitivity: Fine-tunes the structural lookback required for trigger highlights.
Entry Signal Color: Customize the setup highlight color.
Previous Day Levels and Equilibrium
Show Active PDH, EQ, PDL: Toggle visual daily liquidity lines on or off.
Line Styles and Colors: Independent style (Solid, Dashed, Dotted) and color settings for PDH, PDL, and 50 percent EQ lines.
Levels Text Size: Adjustable font sizes (Tiny, Small, Normal, Large) for desktop and mobile displays.
High-Probability Zone Customization
Extend Zone To Current Price: Enable to stretch the current active zone into live price action.
Zone Box Styling: Full control over Background Color, Border Color, Border Thickness, Box Opacity, and Label Text Alignment.
How to Use (Educational Framework)
1. Identify Directional Context: Check the color of the Dynamic Ribbon. (Green = Bullish Bias, Red = Bearish Bias, Grey = Ranging or Exercise Caution).
2. Evaluate Premium versus Discount: Compare current price with the 50 percent EQ Line. Long Setups carry higher probability when price is below EQ (Discount). Short Setups carry higher probability when price is above EQ (Premium).
3. Execution Alignment: Look for structural rejections (Yellow Setup Candle) tapping into active HP Zones near key PDH or PDL levels.
House Rules and Educational Disclaimer
No Repainting: All historical levels, zones, and structure lines are calculated on bar-close logic.
Educational Tool: This script is designed exclusively for market structure mapping and educational analysis. It does not provide financial advice or automated trading signals.
Indicator

Sigmoid Alpha Bands | NAL1. Overview
Sigmoid Alpha Bands | NAL is an adaptive trend and volatility framework built around a sigmoid-weighted EMA baseline and dynamically adjusted volatility bands.
Instead of smoothing price with a fixed alpha, the indicator modifies its responsiveness using a selected market feed. Momentum, volatility, volume, or price disparity can control how quickly the baseline adapts to changing conditions.
The surrounding bands can also respond asymmetrically to bullish and bearish return shocks. This allows the upper and lower boundaries to develop independently rather than remaining equally spaced around the baseline.
2. Calculation
The indicator begins by selecting the market variable used to control the baseline’s adaptive smoothing weight.
Momentum measures changes in RSI, volatility measures changes in ATR, volume measures changes in smoothed volume, and disparity measures changes in price relative to its EMA.
sigmoidFeed = switch sigFeed
"Momentum" => ta.change(ta.rsi(src, modLen), changeL)
"Volatility" => ta.change(ta.atr(modLen), changeL)
"Volume" => ta.change(ta.ema(volume, modLen), changeL)
"Disparity" => ta.change(src / ta.ema(src, modLen), changeL)
The selected feed is passed through a sigmoid function, converting it into a bounded adaptive weight.
That weight modifies the standard EMA alpha. When the sigmoid weight increases, the baseline can respond more quickly. When it decreases, the baseline becomes more stable.
sigmoidWeight = sigmoid_function(sigmoidFeed)
baseAlpha = 2.0 / (emaLen + 1.0)
adaptiveAlpha = f_clamp(baseAlpha * (0.5 + sigmoidWeight), 0.01, 1.0)
The final adaptive baseline is calculated recursively using the changing alpha.
sigmoid_ema = f_sigmoid_ema(src, sigmoidFeed, sigLen)
The indicator then calculates its base volatility using one of four methods: standard deviation, ATR, mean absolute deviation, or median absolute deviation.
volatilityRaw = switch volFeed
"SD" => ta.stdev(src, volLen)
"ATR" => ta.atr(volLen)
"MeanAD" => ta.dev(src, volLen)
"MedianAD" => f_median_ad(src, volLen)
This raw volatility value is also processed through a sigmoid-adaptive smoothing layer. The result becomes the symmetric volatility foundation used by the bands.
volatilityFeed = ta.change(volatilityRaw / nz(ta.ema(volatilityRaw, volLen), volatilityRaw), changeL)
volatility = f_sigmoid_ema(volatilityRaw, volatilityFeed, volLen)
When asymmetric bands are enabled, positive and negative log-return shocks are separated into bullish and bearish variance components.
bullShock = math.pow(math.max(ret, 0.0), 2.0)
bearShock = math.pow(math.max(-ret, 0.0), 2.0)
totalShock = bullShock + bearShock
Each shock component is adaptively smoothed and compared with total variance. This produces separate upper and lower volatility multipliers.
The multipliers are constrained around their longer-term average so the bands can adapt without becoming unstable.
upperVol = math.max(nz(symmetricVol, syminfo.mintick) * upperMultAdj, syminfo.mintick)
lowerVol = math.max(nz(symmetricVol, syminfo.mintick) * lowerMultAdj, syminfo.mintick)
The final bands are positioned around the sigmoid-adaptive baseline.
upperBand = sigmoid_ema + finalUpper * volMul
lowerBand = sigmoid_ema - finalLower * volMul
A bullish state is established when price closes above the upper band. A bearish state is established when price closes below the lower band. While price remains between the boundaries, the existing state is preserved.
if close > upperBand
NAL := 1
if close < lowerBand
NAL := -1
3. Key Features
Sigmoid-weighted adaptive EMA baseline.
Selectable momentum, volatility, volume, or disparity adaptation feed.
Multiple volatility calculation methods.
Optional asymmetric bullish and bearish volatility bands.
Independent modeling of positive and negative return shocks.
Controlled asymmetry through long-term multiplier normalization.
State-based candle coloring, layered volatility hulls, glow effects, and directional fills.
4. Use
Sigmoid Alpha Bands is designed to identify when price expands beyond an adaptively smoothed volatility structure.
A close above the upper boundary reflects bullish expansion beyond the current baseline and volatility regime. A close below the lower boundary reflects bearish expansion beneath that structure.
The asymmetric mode allows the indicator to recognize that bullish and bearish volatility do not always develop with equal intensity. As market pressure changes, each side of the channel can adjust independently while remaining anchored to the same adaptive baseline.
This indicator is designed as a specialized component within a complete strategy architecture. Its role is to isolate the interaction between adaptive trend, changing volatility, and directional return pressure. Its full value emerges through the way this information is integrated into a broader decision framework.
Indicator

Sigmoid RSI | NAL1. Overview
Sigmoid RSI | NAL is an adaptive momentum-regime indicator built from a transformed RSI engine, sigmoid weighting, and two independently adaptive smoothing layers.
Instead of using raw RSI values directly, the indicator recenters RSI around its midpoint and passes the result through a sigmoid transformation. This reshapes the oscillator into a smoother 0–100 momentum curve while preserving directional pressure around the central regime.
The final signal is refined through volatility-sensitive smoothing and an optional momentum-driven signal line, creating a more adaptive structure than a standard RSI with fixed smoothing.
2. Calculation
The indicator starts by calculating RSI from the selected source and centering it around 50. This converts the standard RSI range into a positive and negative momentum input around the neutral midpoint.
rsiRaw = ta.rsi(src, rsiLen)
rsiNorm = rsiRaw - 50.0
The centered RSI is then passed through a sigmoid function. The sigmoid transformation compresses extreme values and smoothly maps the momentum input back into a 0–100 range.
sigmoidRSIRaw = 100.0 * sigmoid_function(rsiNorm)
The indicator then builds two separate adaptive feeds.
The volatility feed measures changes in ATR, while the momentum feed measures changes in a separate RSI calculation.
momentumFeed = ta.change(ta.rsi(src, modLen), changeL)
volatilityFeed = ta.change(ta.atr(modLen), changeL)
These feeds are used inside a sigmoid-weighted EMA. The sigmoid output adjusts the smoothing alpha dynamically, allowing the moving average to respond differently as the input environment changes.
sigmoidWeight = sigmoid_function(sigmoidFeed)
adaptiveAlpha = f_clamp(baseAlpha * (0.5 + sigmoidWeight), 0.01, 1.0)
The main Sigmoid RSI is smoothed using the volatility feed. This makes its response sensitive to changes in the volatility environment.
sigmoidRSI = f_sigmoid_ema(sigmoidRSIRaw, volatilityFeed, rsiSmoothLen)
A second adaptive smoothing layer creates the signal line using the momentum feed. This gives the indicator an internal directional reference that reacts to changes in momentum rather than using a fixed moving average alone.
sigmoidRSISignal = f_sigmoid_ema(sigmoidRSI, momentumFeed, rsiSignalLen)
The bullish state requires the Sigmoid RSI to rise above the upper threshold. When confluence is enabled, it must also remain above its adaptive signal line.
The bearish state requires the Sigmoid RSI to fall below the lower threshold and, when enabled, remain below the signal line.
NAL := sigmoidRSI > longThres and (sigmoidRSI > sigmoidRSISignal or not boolCon) ? 1 : sigmoidRSI < shortThres and (sigmoidRSI < sigmoidRSISignal or not boolCon) ? -1 : NAL
When neither condition is active, the previous directional state is preserved.
3. Key Features
Sigmoid-transformed RSI momentum engine.
Adaptive volatility-sensitive RSI smoothing.
Momentum-driven adaptive signal line.
Dynamic smoothing alpha generated through sigmoid weighting.
Upper and lower threshold regime detection.
Optional signal-line confluence.
Glow plot, threshold fills, candle coloring, bar coloring, and transition labels.
4. Use
Sigmoid RSI is designed to identify when momentum transitions into a more established bullish or bearish regime.
A move above the upper threshold reflects bullish momentum expansion, while a move below the lower threshold reflects bearish momentum deterioration. The adaptive signal line adds another layer of internal structure by measuring whether the transformed RSI remains aligned with its momentum-driven smoothing path.
The indicator’s behavior is shaped by both volatility and momentum changes, allowing its response to shift with the underlying environment rather than remaining mechanically fixed.
Sigmoid RSI is designed as a specialized momentum component within a complete strategy architecture. Its real value lies in how its adaptive regime state is integrated into a broader decision process, where several layers of market behavior are evaluated together.
Indicator

Universal Signal Backtester [LuxAlgo]The Universal Signal Backtester indicator is a tool designed to simulate and analyze the performance of virtually any trading signal, ranging from moving average crossovers to external indicator triggers. By providing a professional-grade backtesting environment directly on the chart, it allows users to optimize entry logic, exit strategies, and cost management in real-time.
🔶 USAGE
The script operates by selecting a Source Mode to define how trades are initiated. Users can choose between built-in MA crosses, external source crossovers, or discrete signal triggers from other indicators. Once a signal is detected, the script simulates a trade using up to three Take Profit (TP) and three Stop Loss (SL) levels.
🔹 Trade Visualization
* Sign Posts: Upon entry, the script plots a "Sign Post" label below or above the bar. This label dynamically suggests which TP level is currently the most effective based on the selected metric (e.g., Hit Rate or Expected Profit).
* Active Exit Lines: Horizontal dashed lines extend from the entry point to visualize the selected TP and SL targets. These lines update in real-time and mark hits with a checkmark (✓) or an "X" (✗).
* MA Ribbon: When using predefined crosses, a gradient ribbon is displayed to visualize the trend strength and crossover points.
🔹 Signal Modes
* Predefined Crosses: Quickly test standard strategies like the 9/21 EMA, 12/26 EMA, or the Golden/Death Cross (50/200 SMA).
* External Sources (Crossovers): Select two external plots (e.g., RSI and a level, or two custom MAs) to test their crossover performance.
* External Signals (Triggers): Connect the script to discrete signals such as Plotshapes or Boolean conditions. This is ideal for testing "Buy" and "Sell" signals from specialized indicators.
🔶 DETAILS
🔹 Advanced Analytics Dashboard
The indicator features a robust dashboard providing institutional-level metrics:
* Core Metrics: Total trades, Win Rate, Profit Factor, Sharpe Ratio, and Recovery Factor.
* Equity Curve: A sparkline representation of the account growth over time.
* Hourly Histogram: A performance breakdown by the hour of the day, helping identify the most profitable trading sessions.
* Heatmaps: A "Days of the Week" or "Monthly" heatmap that colors cells based on profitability, allowing for the identification of seasonal or periodic performance patterns.
🔹 Cost Simulation
To ensure realistic results, the script includes a cost engine. Users can select from profiles like Forex, Crypto, or Stocks to automatically apply industry-standard spreads and commissions, or input manual values to match a specific broker's fee structure.
🔶 SETTINGS
🔹 Source Settings
Source Mode: Determines the logic for trade entries (Predefined, External Crossover, or External Trigger). Signal Logic: Defines how external triggers are interpreted (e.g., Value Changes, Crosses 0, or Not NA). Trade Direction: Filters signals to allow only Longs, only Shorts, or Both.
🔹 Filters
Use ATR Choppiness Filter: When enabled, the script ignores signals that occur during low-volatility "choppy" periods.
🔹 Target Settings
Distance Type: Sets the measurement unit for TP/SL levels (ATR, Ticks, or Points). Take Profit (1-3): Toggles and sets the distance for up to three partial take-profit levels. Stop Loss (1-3): Toggles and sets the distance for up to three stop-loss levels.
🔹 Costs
Simulate Spread & Commission: Enables the cost engine for more realistic PnL calculations. Cost Profile: Presets for Forex, Crypto, and Stocks, or "Manual" for custom inputs.
🔹 Dashboard & Visuals
Heatmap Period: Switches the dashboard heatmap between "Days of Week" and "Months". Suggested TP Metric: Chooses the criteria the "Sign Post" uses to suggest the best TP level. Gradient Candle Coloring: Colors candles based on the distance between the fast and slow sources. Indicator

Advanced Market Structure & Glowing Wave Proindicator description and usage guide
overview
advanced market structure and glowing wave pro is an all in one technical analysis script designed to help traders identify key market structures, major pivot reversal zones, dynamic trend momentum, and key daily levels on pine script v6.
this tool combines several essential trading concepts into a single clean visual experience, including smart money concepts market structure, dynamic momentum wave fills, high probability consolidation detection, daily high low tracking, and equilibrium levels.
key features explained
market structure tracking bos and choch
the script automatically detects pivot highs and lows to plot break of structure bos and change of character choch lines. green dashed lines represent bullish structure breaks, while red dashed lines represent bearish structure breaks. this helps traders analyze market direction without cluttering the chart.
major swing buy and sell signals
signals are calculated based on major structural pivots to reduce noise and avoid false breakouts. buy tags appear near key structural swing lows, and sell tags appear near key structural swing highs. these signals act as visual alerts for potential trend reversals or continuation setups.
glowing wave line with dynamic background fill
the wave line uses a hull moving average engine to plot smooth trend direction. the background space between the wave line and price close fills dynamically with a semi-transparent green or red glow, allowing you to instantly visualize trend strength and price expansion without obscuring your price candles.
dynamic consolidation and high probability zones
using average true range calculations, the indicator detects tight consolidation phases where price compresses. during these phases, candle colors shift to neutral grey tones and a high probability zone box highlights potential breakout ranges.
previous day high and low pdh pdl
key institutional levels like the previous day high and previous day low are automatically drawn on the chart. once price breaks through a daily level, the corresponding line auto disappears to keep your workspace clean.
0.50 fibonacci equilibrium line
a stylized mid point equilibrium line is plotted based on the recent range. this acts as a quick reference for premium and discount price zones.
customizable info dashboard
an elegant on screen panel displays current market structure status, market phase expansion or consolidation, active signal state, and pending session news times.
how to use this indicator
step 1 identifying overall trend direction
check the direction and color of the glowing wave line along with the info panel market structure reading. green indicates bullish momentum, while red indicates bearish momentum.
step 2 monitoring structure breaks
look for choch signals for early signs of a trend shift, or bos signals for trend continuation confirmation.
step 3 waiting for major swing signals
watch for major buy or sell tags printed near major swing highs and lows. ensure the signal aligns with the broader market context and your personal trading strategy.
step 4 tracking daily key levels
use the pdh and pdl lines as potential liquidity target areas or bounce zones during intra day sessions.
Things to avoid
do not treat buy and sell signals as automated financial advice or direct entry triggers. always use proper risk management.
do not trade signals blindly during high impact economic news events or inside tight consolidation ranges.
do not rely solely on one indicator. integrate this tool into a comprehensive trading system that includes risk management and independent analysis.
house rules compliance and risk disclaimer
disclaimer
this script is created strictly for educational, informational, and chart analysis purposes only. it does not constitute financial, investment, or trading advice. past performance indicated by visual cues or structural breaks on historical data does not guarantee future results. trading foreign exchange, commodities, stocks, and crypto assets carries a high level of risk, and you may lose more than your initial investment. always conduct your own research and consult a licensed financial advisor before making trading decisions.
author note
if you find this tool helpful for your technical analysis, feel free to like the script, leave your feedback in the comments, and follow for future updates and tools. Indicator

Indicator

Indicator

Pymander's Epiphany# Pymander’s Epiphany
Pymander’s Epiphany is a powerful range-to-expansion trading indicator built to help retail traders find, evaluate, and manage quality breakout opportunities.
Instead of printing an arrow whenever price crosses a level, Epiphany follows the full life cycle of a setup:
**Range formation → validation → breakout → confirmation → continuation**
The indicator features three range-detection modes, adjustable range preferences, early breakout warnings, confirmed signals, and a dedicated continuation engine for catching secondary entries after the initial move.
Every breakout receives a transparent strength score based on:
* Closing strength
* Candle-body dominance
* Range expansion
* Volume expansion
* Breakout distance
Signals are graded from C to A+, making it easy to separate ordinary price breaks from moves showing stronger conviction and participation.
Optional EMA and VWAP filters help confirm market direction and identify flat or conflicting conditions. For traders who prefer fewer, more selective signals, Elite Mode applies stricter structure, alignment, and signal-quality requirements.
Epiphany can also automatically display the entry, stop, and 1R target using several stop methods, including ATR, recent swing, opposite side of the range, and breakout candle.
The live dashboard shows the current range state, directional bias, range quality, strength score, signal grade, EMA/VWAP alignment, and continuation status. Detailed alerts can notify traders of early warnings, confirmed breakouts, continuations, and changing range conditions.
What makes Epiphany special is how all these features work together. It isn’t just another breakout indicator—it’s a complete decision-support system designed to give retail traders more structure, context, and confidence.
No indicator can predict every move, so always use proper risk management and test the settings for your preferred market and timeframe.
Best of luck, stay disciplined, and trade well!
— **Pymander**
Indicator

[ A L P H A X ] CADENCE - Elliott Wave + Fibonacci + StructureAlphaX CADENCE — Elliott Wave + Fibonacci + Market Structure Engine: Live W2/W4 Golden Zone Pullbacks, W3 Momentum Breakout, RSI Divergence Exit Warnings & Fibonacci Extension Targets
AlphaX CADENCE is a professional-grade Elliott Wave and Fibonacci confluence system built around the most powerful and time-tested framework in technical analysis — the five-wave impulse and three-wave corrective structure that governs institutional price delivery across all timeframes and all markets. Where most Elliott Wave indicators focus on labeling historical waves after the fact, CADENCE is engineered for live trade execution : it identifies the current wave phase in real time, marks the active golden Fibonacci pullback zone, and fires entry signals at the precise moment price enters the optimal entry window with market structure, higher timeframe bias, volume, and momentum confirmation all aligned. Four setup types — Wave 2 Golden Zone, Wave 4 Golden Zone, Wave 3 Momentum Breakout, and ABC Correction End — cover both pullback and breakout entries within the Elliott Wave framework. A dedicated RSI divergence exit warning system alerts you to potential Wave 5 exhaustion before the reversal strikes. Fibonacci extension targets (TP1 at Wave 1 high, TP2 at 1.618× extension) are computed automatically from the identified impulse leg. Designed for traders who want the rigor of Elliott Wave theory applied with quantitative precision, across crypto, forex, gold, and indices on any timeframe.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
〰 The Elliott Wave Framework — Why Institutional Price Moves in Waves
Elliott Wave theory is one of the oldest and most institutionally respected frameworks in technical analysis. Its core observation is that market prices do not move randomly — they move in structured, repeating patterns that reflect the collective psychology of all participants. The primary pattern is the five-wave impulse:
Impulse wave structure (bull):
Wave 0 → Wave 1: The initial impulse move — institutions begin accumulating, price moves sharply higher
Wave 1 → Wave 2: The first pullback — retail traders who missed the initial move sell back gains; Wave 2 never fully retraces Wave 1
Wave 2 → Wave 3: The most powerful wave — institutional participation accelerates, Wave 3 is typically the longest and strongest impulse
Wave 3 → Wave 4: A corrective pullback after Wave 3's extension, typically shallower than Wave 2; Wave 4 never enters Wave 1's territory in a valid impulse
Wave 4 → Wave 5: The final impulse leg, often accompanied by declining momentum and RSI divergence as the move exhausts
Why the golden zone matters: Waves 2 and 4 are the pullback waves — the retracement phases where price temporarily retreats before the next impulse. The Fibonacci golden zone (61.8%–38.2% retracement of the prior wave) is where these pullbacks most frequently terminate and reverse. Entering at the golden zone means entering with the lowest possible risk relative to the impulse target — the tight stop is at the wave invalidation level, and the target is the next wave's extension.
CADENCE is built to detect when the market is in a Wave 2 or Wave 4 pullback, when price has entered the golden zone, and when a qualified rejection candle confirms the reversal — producing entries at the statistically optimal Fibonacci reversal level within a confirmed Elliott Wave structure.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌊 The Wave Engine — Pivot-Based Leg Classification
CADENCE uses a real-time swing pivot detection system to classify the current Elliott Wave phase from confirmed price structure. On every bar, confirmed fractal pivot highs and lows are collected into a rolling swing array (configurable depth, default: 8 swings). The alternating sequence of highs and lows is then pattern-matched against Elliott Wave leg configurations.
3-swing classification (W2 phase):
When the three most recent confirmed swings form the pattern Low → High → Low (for bull impulse), CADENCE identifies:
W0 at the first low (impulse origin)
W1 at the high (impulse peak)
W2 in progress at the current low (the pullback)
If W1 is above W0 (valid impulse direction), the wave phase is classified as W2 PULL — the system is watching for the golden zone entry.
5-swing classification (W4 phase):
When five confirmed swings form Low → High → Low → High → Low (bull), CADENCE identifies all five wave points (W0 through W4). When W3 is above W1 (confirming the wave hierarchy) and W1 is above W0, the phase is classified as W4 PULL — the system is watching for the Wave 4 golden zone entry before the final Wave 5 push.
Wave phase display: The current wave phase is displayed prominently on the dashboard as W2 PULL, W4 PULL, CORR, or SCAN. This single row tells you exactly where CADENCE believes the market is in its current impulse cycle.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 Fibonacci Golden Zone — The Optimal Entry Window
The Fibonacci golden zone is the price range between the 38.2% and 61.8% retracement of the prior impulse wave. This zone, sometimes called the "golden pocket," represents the most common termination range for corrective waves within a healthy impulse structure.
Wave 2 golden zone calculation:
Zone top = W1 − (W1 − W0) × 38.2%
Zone bottom = W1 − (W1 − W0) × 61.8%
Three Fibonacci levels displayed: 38.2% (dotted), 50.0% (solid, the equilibrium), 61.8% (dotted)
Wave 4 golden zone calculation:
Computed from the W2 → W3 leg rather than the W0 → W1 leg, reflecting that Wave 4 corrects Wave 3 specifically:
Zone top = W3 − (W3 − W2) × 38.2%
Zone bottom = W3 − (W3 − W2) × 61.8%
Golden zone visualization:
A semi-transparent box spans the golden zone from the prior wave's start bar to 15 bars beyond the current bar. Yellow-green for bull zones, red for bear zones. The box extends forward in real time — you can see the target zone approaching as price pulls back toward it.
In-zone detection:
Price is considered inside the golden zone when the bar's low (bull) or high (bear) reaches within the zone boundaries AND the candle closes on the correct side of the zone. The close-inside condition ensures the touch is a genuine rejection from within the zone rather than a pass-through.
Live Fibonacci levels:
The 38.2%, 50%, and 61.8% retracement lines are plotted from the Wave 1 pivot bar to 15 bars beyond current, updating in real time as the wave structure develops. The 50% line is plotted as a brighter solid line — the golden pocket midpoint.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏷 Four Live Setup Types
CADENCE fires signals through four distinct entry setups, each targeting a specific phase of the Elliott Wave cycle. Each has different risk/reward characteristics and different position within the wave sequence.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
W2 Golden Zone — Wave 2 Pullback Entry
The most frequent high-conviction setup. Fires when price retraces into the 38.2%–61.8% golden zone of Wave 1 during an identified Wave 2 correction.
Full conditions for long:
Bull impulse identified (three-swing pattern W0→W1→W2)
Wave phase is W2 PULL
Market structure is bullish (or HTF is bullish as a fallback)
The bar's low has entered the golden zone (between 38.2% and 61.8% retracement)
The bar closes above the zone bottom — confirming rejection, not breakdown
Wave 2 (the pullback) is holding above Wave 0 (the impulse origin) — the Elliott Wave rule that W2 never fully retraces W1 is validated
The impulse leg (W1 − W0) is at least the minimum size (default: 1.0× ATR) — filtering micro-waves
A qualifying bull trigger candle (rejection wick above 48% of range or bullish engulfing) is present
Stop placement: Below the minimum of W2 and W0 (the prior impulse origin) plus the ATR buffer. If price violates Wave 0, the impulse structure is invalid by Elliott Wave rules.
Targets: TP1 at W1 (the prior wave high); TP2 at the close plus 1.618× the impulse leg distance.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
W4 Golden Zone — Wave 4 Pullback Entry
The higher-conviction pullback setup. Wave 4 occurs after Wave 3 — the strongest and longest wave — has completed. The W4 correction offers the final opportunity to enter before Wave 5.
Key differences from W2:
Requires confirmed market structure (structure == 1 for bull, not just HTF fallback) — Wave 4 entries demand structural confirmation
Golden zone is computed from the W2 → W3 leg (correcting Wave 3, not Wave 1)
Requires five confirmed swings (W0 through W4) — a more mature wave count
Why W4 is high-conviction: By the time a Wave 4 is identifiable, the impulse sequence has completed three waves with Wave 3 confirming above Wave 1. The institutional participants who accumulated during Wave 2 are in strong profit and will add to positions during Wave 4. The golden zone for Wave 4 is the most actively defended pullback level in the entire five-wave sequence.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
W3 Momentum Breakout — Wave 3 Entry
The highest-momentum setup. Fires when price breaks above the Wave 1 high (bull) or below the Wave 1 low (bear) during a Wave 2 or Wave 4 pullback phase — the moment Wave 3 begins.
Long conditions:
Wave phase is W2 PULL or W4 PULL (the correction is completing)
Price closes above the last identified swing high (the Wave 1 level) in a single bar
The prior bar was at or below the breakout level
Market structure is bullish
Impulse leg size meets the minimum threshold
The W3 breakout philosophy: The Wave 3 breakout is the moment institutional participation accelerates explosively — the "Wall of Worry" is cleared and the crowd that was short begins covering. Entering at this exact bar captures the beginning of the fastest and largest wave of the impulse. The risk is paying a higher price than the golden zone pullback entries, but the momentum confirmation is unambiguous.
Target for W3 entries: TP1 is at entry + the full impulse leg distance (projecting a Wave 3 equal to Wave 1); TP2 is at the 1.618× extension.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ABC Correction End — Three-Wave Reversal Entry
The counter-trend corrective setup. Disabled by default — the lower-conviction alternate wave scenario. Fires when a three-wave ABC correction retraces to the 61.8% level of the prior impulse with a rejection candle.
ABC conditions (bull):
Three-swing pattern confirms an ABC correction structure (Low → High → Low within a bull structure)
Price reaches the 61.8% retracement of the A leg from the B peak
Close recovers back above the 61.8% level
Bull trigger candle confirms
Why ABC is off by default: ABC entries are counter-corrective — they attempt to catch the end of a pullback at a single Fibonacci level without the full five-wave context. They work well when the prior impulse was clean and the ABC is proportional, but carry higher failure rates in choppy or range-bound conditions. Enable this setup only after studying its behavior on your specific instrument and timeframe.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ W5 RSI Divergence Exit Warning System
One of CADENCE's most valuable risk management features is the dedicated Wave 5 exhaustion detection system. When price is making new highs in a bull structure but the RSI is simultaneously making lower highs — a classic bearish divergence — the system plots small orange circles above the relevant bars as exit warnings.
How the divergence is detected:
Using confirmed pivot highs and lows from both price and RSI, CADENCE identifies:
Bearish divergence (bull W5 exhaustion): Price's pivot high exceeds the prior pivot high, but RSI's corresponding pivot is below its prior reading — price strength is not confirmed by momentum
Bullish divergence (bear W5 exhaustion): Price's pivot low is below the prior low, but RSI's reading is above its prior — selling momentum is fading at lower prices
Why W5 divergence is the most important Elliott Wave exit signal: Wave 5 is structurally the most exhausted wave — it occurs after four prior waves have already moved in the impulse direction, and is frequently accompanied by declining institutional participation. RSI divergence at Wave 5 is the most reliable early warning of the corrective ABC wave that follows. The small orange circles appear at the divergence bars — not blocking entry signals (divergence can persist for multiple bars) but providing continuous awareness that the impulse is aging.
These exit warnings fire separate alert conditions — CADENCE W5 Exit Bear and W5 Exit Bull — allowing you to set targeted notifications that prompt profit-taking on active wave trades.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧠 The 10-Layer Confluence Engine
Every setup is scored through a 10-layer confluence system. The default minimum is 4 of 10, producing a relatively permissive signal environment. Raising the minimum to 6–7 restricts signals to the highest-conviction wave setups only.
Layer 1 — Market Structure (1 point):
The current market structure state (bull or bear from the BOS/CHoCH engine) aligns with the signal direction. A W2 Golden Long in a bullish structure scores this point. A W2 Golden Long against a bearish structure does not.
Layer 2 — Fibonacci Zone (1 point):
Price is inside the applicable golden zone (W2 zone for W2 entries, W4 zone for W4 entries). For W3 and ABC entries, this layer is always credited since those setups do not require Fibonacci zone confirmation.
Layer 3 — Trigger Candle (1 point):
A qualifying bull or bear trigger candle is present — either a rejection pin bar (lower wick above 48% of range for bull) or a bullish engulfing. For W3 momentum entries, this layer is always credited since the breakout bar itself is the trigger.
Layer 4 — HTF Bias (1 point):
The higher timeframe EMA structure agrees with the signal direction. Can be set as a hard block (requireHtf = on) or as a soft scoring layer (default: off). When HTF is disabled, this layer awards 1 neutral point.
Layer 5 — Volume Expansion (1 point):
Current bar volume exceeds the volume moving average by the configured multiplier (default: 1.1×). Confirms institutional participation on the entry bar.
Layer 6 — Non-Chop Market (1 point):
Choppiness Index is below the configured threshold. Also enforced as a hard gate — extreme chop blocks all signals regardless of wave count quality.
Layer 7 — RSI Zone (1 point, optional):
RSI is in the appropriate zone for the signal direction — above the minimum for longs (default: 38), below the maximum for shorts (default: 62). Off by default — when enabled, adds a momentum context filter.
Layer 8 — EMA Trend Filter (1 point, optional):
Price is on the correct side of the configurable EMA. Off by default — when enabled, adds a trend alignment filter.
Layer 9 — RSI Momentum (1 point, optional):
RSI is actively rising (bull) or falling (bear) on the current bar — momentum is accelerating in the signal direction. Off by default.
Layer 10 — Base Credit (1 point):
A flat credit awarded to all qualifying setups — the minimum point that acknowledges the setup type itself has passed its structural requirements. This ensures that even with optional filters disabled, the maximum achievable score is 10.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Fibonacci Extension Targets — Automatic TP Calculation
Every CADENCE signal produces two automatically computed take profit levels based on the identified impulse wave measurement.
TP1 — Wave 1 High / Wave Projection:
For W2 and W4 golden zone entries, TP1 is set at the prior Wave 1 level — the high that preceded the current pullback. This is the minimum structural target: the expectation that Wave 3 or Wave 5 will at least reclaim Wave 1's high. For W3 momentum entries, TP1 is set at entry plus the full impulse leg distance (Wave 3 = Wave 1 in length).
TP2 — 1.618× Extension:
The primary Fibonacci extension target, computed as `entry + impulse_leg × 1.618`. The 1.618 extension (the Golden Ratio) is the most common Wave 3 termination level and a standard Wave 5 target when Wave 3 is extended. This level is configurable (default: 1.618, range: 1.0–2.618).
Visual output: TP1 is plotted as a lime-green dotted line. TP2 is plotted as a bright yellow-green dashed line at width 2. Both extend forward by the configured guide bars (default: 35). The stop loss is plotted as a red dotted line below the wave invalidation level plus ATR buffer.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Live Dashboard
The 9-row real-time dashboard displays the complete wave analysis state.
Wave Phase — W2 PULL, W4 PULL, CORR, or SCAN. The current position within the Elliott Wave cycle. Purple color
Structure — BULL MS (bullish market structure), BEAR MS (bearish), or RANGE (no clear structural direction)
Setup — the current or most recent setup name: W2 GOLDEN, W4 GOLDEN, W3 BREAK, ABC END, ARM LONG (golden zone approached but not yet triggered), ARM SHORT, or —. Color-coded by directional bias
Layers — the current confluence score out of 10. Yellow-green when at or above the minimum threshold
Chop — live Choppiness Index value. Yellow-green when clear, red when above the stand-aside threshold
TP1 — the current or most recent TP1 level. Shows — between signals
TP2 — the current or most recent TP2 level
HTF — the higher timeframe EMA bias: UP, DOWN, or MIX
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 Chart Visual System
Live Wave Path Lines — lines connecting the most recent confirmed swing pivots, color-coded yellow-green for bull impulse and red for bear impulse. Shows the current wave sequence structure directly on the price chart
Golden Zone Box — semi-transparent box spanning the 38.2%–61.8% Fibonacci retracement zone from the prior wave. Yellow-green for bull, red for bear. Extends 15 bars forward and updates in real time as the wave structure evolves
Fibonacci Levels — three horizontal dotted/solid lines at 38.2%, 50%, and 61.8% retracement from the Wave 1 pivot bar. The 50% level is the brightest solid line — the golden pocket center
▲ Triangle (below bar, bright yellow-green) — bull entry signal. W2 Golden, W4 Golden, W3 Breakout, or ABC End
▼ Triangle (above bar, bright red) — bear entry signal
● Orange Circle (above bar) — W5 bearish RSI divergence exit warning
● Orange Circle (below bar) — W5 bullish RSI divergence exit warning
Entry Line (bull/bear color dashed) — entry close level extending guideExtend bars forward
Stop Loss Line (red dotted) — structural stop below wave invalidation level plus ATR buffer
TP1 Line (lime dotted) — first target at Wave 1 high or equal-leg projection
TP2 Line (bright yellow-green dashed, width 2) — 1.618× Fibonacci extension target
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 How to Trade with AlphaX CADENCE — Step by Step
Step 1 — Read the Wave Phase
Check the Wave Phase row on the dashboard. W2 PULL or W4 PULL means the system has identified a valid pullback phase — a setup may be approaching
Confirm Structure — BULL MS for long setups, BEAR MS for short. If Structure shows RANGE, the wave context is weaker
Check the golden zone box on the chart. Is it near current price? Is price approaching from above (bull W2 pullback)?
Step 2 — Watch the Golden Zone Approach
When Setup shows ARM LONG, price is approaching the golden zone. Watch for a rejection candle forming inside or at the zone boundary
Check Layers — if it is approaching the minimum threshold, a signal is likely imminent. Check HTF to confirm the macro direction
The Fibonacci levels on the chart show the exact 38.2%, 50%, and 61.8% prices — monitor for price rejection specifically at the 61.8% level (the deepest golden zone entry) for the highest-conviction golden pocket entry
Step 3 — Enter on the Triangle Signal
A ▲ triangle below the bar confirms all wave, Fibonacci, structural, and confluence conditions are met simultaneously. The setup name shows on the dashboard (W2 GOLDEN, W4 GOLDEN, W3 BREAK, ABC END)
The SL line is at the structural wave invalidation level — if price closes below Wave 0 (W2 entries) or below Wave 2 (W4 entries), the Elliott Wave count is invalid. This is a structural stop, not arbitrary ATR
TP1 is at the prior Wave 1 high — the minimum expectation for the next impulse wave
TP2 is at the 1.618× Fibonacci extension — the classical Wave 3 or Wave 5 termination level
Step 4 — Monitor for W5 Exit Warnings
As price advances toward TP2, watch for the orange W5 exit warning circles appearing above (bear divergence) or below (bull divergence) price bars
When orange circles begin appearing regularly as price approaches TP2, consider taking full profit rather than holding for further extension
A W5 divergence warning combined with price near TP2 is the strongest exit signal the system produces
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Identifying Low-Quality Conditions — When Not to Trade
Stand aside when:
Wave Phase shows SCAN or CORR — the system has not yet identified a clear impulse structure with sufficient pivot history. SCAN means fewer than 3 qualified swings are stored; CORR means the three-swing pattern does not satisfy the impulse directional rules. Do not force entries without clear wave context
Chop Index is red on the dashboard — the hard chop gate is active. Elliott Wave patterns are fundamentally trend-following structures and lose their predictive power in extreme chop. All signals are blocked
Structure shows RANGE — no clear bullish or bearish market structure is established. W2 and W4 golden zone entries without structural support are lower quality. Consider waiting for a CHoCH or BOS to establish directional structure before entering
Layers score is at minimum (4/10) with all optional filters disabled — the bare-minimum score means only the most basic conditions are met. In this environment, require a higher layer count (increase minimum to 5–6) or wait for more confluence factors to align
W5 exit warnings are already appearing when entering — if orange circles are appearing before a new entry signal fires, RSI divergence is already present. This suggests the wave is potentially in a late W5 stage rather than a healthy W2 or W4. Do not enter a new position when existing divergence warnings are active
Golden zone is very narrow (W4 zone nearly coincides with stop) — when the 38.2% and 61.8% levels are very close together (small Wave 3 leg), the golden zone provides minimal entry edge. The risk/reward is poor when the zone height is less than 0.5× ATR
The ideal CADENCE setup:
Wave Phase W4 PULL with confirmed 5-swing structure
Market structure BULL MS or BEAR MS — clear directional bias
Price at or near the 61.8% golden zone boundary — the deepest valid pullback
HTF aligned with impulse direction
Volume expanding on the rejection bar
Layers at 7–8 out of 10
No W5 divergence warnings on the current sequence
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Key Features
〰 Real-time Elliott Wave classification — 3-swing (W2 phase) and 5-swing (W4 phase) pattern matching from confirmed fractal pivots, updated on every bar
📐 Adaptive Fibonacci golden zone — 38.2%–61.8% retracement zone computed from the current wave's impulse leg, rendered as a live box and three labeled levels updating in real time
📦 Live wave path visualization — lines connecting the most recent confirmed swing pivots, color-coded by impulse direction, showing the current wave sequence structure
🏷 Four setup types — W2 Golden Zone, W4 Golden Zone, W3 Momentum Breakout, and ABC Correction End (optional) — covering both pullback and breakout entries within the wave framework
📈 Fibonacci extension targets — TP1 at the Wave 1 high (minimum wave projection), TP2 at the configurable Fibonacci extension (default: 1.618×) automatically computed from the identified impulse leg
⚠ W5 RSI Divergence Exit Warning — pivot-based RSI divergence detection produces orange warning circles as price approaches potential Wave 5 exhaustion, with dedicated alert conditions
🧠 10-layer confluence engine — Market Structure, Fibonacci Zone, Trigger Candle, HTF Bias, Volume, Non-Chop, RSI Zone, EMA Filter, RSI Momentum, and Base Credit scored independently
🛡 Wave-anchored structural stop — SL placed below the Elliott Wave invalidation point (Wave 0 for W2 entries, Wave 2 for W4 entries) plus ATR buffer — not an arbitrary distance
📊 Live dashboard — Wave Phase, Structure, Setup, Layers, Chop, TP1, TP2, and HTF updated on every bar
📡 JSON alerts on FIRED — structured alert payload with weapon, side, setup name, entry, SL, TP1, TP2 for webhook integration
🔔 4 alert conditions — CADENCE Long, CADENCE Short, W5 Exit Bear Warning, W5 Exit Bull Warning
⚙ Fully configurable — pivot length, minimum leg size, Fibonacci zone levels, extension target, RSI divergence settings, all four setup enables, confluence minimum, HTF parameters, all optional filters, chop gate, SL buffer, guide bars, wave path and golden box display, dashboard size, and all colors are independently adjustable
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Settings Reference
Wave Engine
Swing Pivot Length — fractal sensitivity for pivot detection (default: 5)
ATR Length — ATR calculation lookback (default: 14)
Min Leg Size (xATR) — minimum impulse leg height in ATR multiples for wave classification (default: 1.0)
Swings Stored — rolling swing array depth (default: 8)
Fibonacci Zones
Pullback Zone Low (Fib) — lower Fibonacci level of the golden zone (default: 0.382)
Pullback Zone High (Fib) — upper Fibonacci level (default: 0.618)
TP2 Extension — Fibonacci extension level for the full measured move target (default: 1.618)
Show Active Fib Levels — toggle the 38.2%, 50%, and 61.8% horizontal lines
Market Structure
BOS: Close Only — when on, structure breaks require a close beyond the swing level (default: on)
Live Setups
W2 / W4 Golden Pullback — toggle both golden zone entry setup types
W3 Momentum Breakout — toggle the Wave 3 breakout entry
ABC Correction End — toggle the corrective three-wave reversal entry (default: off)
W5 RSI Divergence Exit Warn — toggle the exit warning system
RSI Length — RSI calculation period (default: 14)
Divergence Lookback — bars for pivot-based RSI divergence detection (default: 14)
Confluence
Min Layers (of 10) — minimum score to fire a signal (default: 4)
Hard HTF Alignment — when on, counter-HTF signals are blocked (default: off)
HTF Trend Bias / HTF Timeframe / HTF Fast / HTF Slow EMA — higher timeframe parameters
Volume Confirm / Volume vs Avg / Volume Avg — volume expansion layer parameters
RSI Momentum Filter — optional RSI direction filter (default: off)
RSI Min (Long) / RSI Max (Short) — RSI zone thresholds when filter is enabled
EMA Trend Filter / EMA Length — optional EMA directional filter (default: off)
Block Extreme Chop / Choppiness Length / Chop Block Above — chop gate parameters
Signal Cooldown (bars) — minimum bars between signals (default: 8)
Entry / Exit Guides
Show SL + TP1 + TP2 — toggle the guide lines
SL Buffer (xATR) — ATR buffer beyond the wave invalidation point (default: 0.25)
Guide Extend (bars) — how many bars forward the guide lines project (default: 35)
Display
Show Live Wave Path — toggle the swing-to-swing connecting lines
Show Golden Zone Box — toggle the Fibonacci retracement zone box
Show Entry Markers — toggle signal triangles
Show Dashboard — toggle the full dashboard
Dashboard Text Size — Standard / Small
Dashboard Position — Top Left / Top Right / Bottom Left / Bottom Right
Colors
Bull / Wave Up — yellow-green for bullish waves, signals, and zones
Bear / Wave Down — red for bearish elements
Fib / Wave Accent — purple for Fibonacci levels, wave path, and neutral zone elements
W3 / Exit Accent — orange for W3 breakout accents and W5 exit warning markers
Stop Line / TP1 Line / TP2 Line — individual guide line colors
Dash Text / Dash BG / Dash Header / Dash Section / Dash Frame — full dashboard color control
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 Alert Conditions (4 total + JSON)
Entry Alerts
CADENCE Long — all wave, Fibonacci, structure, and confluence conditions confirmed. JSON payload delivered with setup, entry, SL, TP1, TP2
CADENCE Short — all conditions confirmed for a short wave setup. JSON payload delivered
Exit Warning Alerts
CADENCE W5 Exit Bear — bearish RSI divergence detected at a price pivot high in a bull structure. Wave 5 exhaustion may be approaching
CADENCE W5 Exit Bull — bullish RSI divergence detected at a price pivot low in a bear structure
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Recommended Settings by Instrument & Timeframe
The default configuration is optimized for XAUUSD, major forex pairs, and crypto on M15–H4 :
Pivot Length at 5 — captures meaningful structural swings without excessive sensitivity on intraday timeframes
Min Leg Size at 1.0× ATR — filters micro-waves while capturing the significant legs that represent genuine Elliott impulses
Fibonacci zone from 38.2% to 61.8% — the classic golden zone that encompasses the highest-probability pullback termination range
HTF at 60-minute as a soft scoring layer — adds confluence when aligned without hard-blocking the counter-HTF wave setups that occasionally occur at institutional correction boundaries
ABC Correction End off by default — the corrective pattern carries more interpretation risk and is better enabled only when the user has studied Elliott corrective structures
For other instruments or timeframes, adjust:
M1–M5 scalping — reduce Pivot Length to 3, reduce Min Leg Size to 0.5, increase Cooldown to 5–6 bars, reduce Guide Extend to 15–20
H4–Daily swing trading — increase Pivot Length to 8–10, increase Min Leg Size to 1.5–2.0, increase TP2 Extension to 2.0–2.618, increase Min Layers to 5–6
Crypto (BTC, ETH) — increase Min Leg Size to 1.5 for the larger swing amplitudes, increase Fibonacci zone to 0.382–0.786 for the deeper corrections common in crypto waves
Higher confidence signals only — raise Min Layers to 6–7, enable Hard HTF Alignment, enable EMA Trend Filter and RSI Momentum Filter, disable ABC Correction End
More signals — lower Min Layers to 3, enable ABC Correction End, disable Volume Confirm, reduce Min Leg Size to 0.5
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👥 Who This Is For
〰 Elliott Wave traders — CADENCE is the definitive quantitative implementation of the Elliott Wave trading framework for the AlphaX suite. Every component — swing identification, wave phase classification, golden zone computation, wave invalidation stop, Fibonacci extension target — is automated and applied consistently
📐 Fibonacci traders who want wave context — the Fibonacci zone in CADENCE is not a standalone level but a wave-specific retracement within a confirmed impulse structure. This context dramatically improves the reliability of Fibonacci entries compared to drawing retracement levels manually without wave classification
🎯 Pullback traders — the W2 and W4 golden zone setups are fundamentally the most optimal pullback entry in all of technical analysis — buying the deepest valid retracement within a confirmed trend impulse, with a stop at the structural invalidation point
⚡ Momentum traders — the W3 Momentum Breakout entry targets the beginning of the fastest and largest wave of the impulse sequence, providing explosive breakout entries within a wave-confirmed context
🧠 Systematic traders who want quantified wave analysis — the 10-layer scoring system and deterministic pivot-based classification replace the subjectivity of traditional Elliott Wave labeling with objective, repeatable criteria
📈 Traders who struggle with knowing when to exit trending trades — the W5 RSI divergence exit warning system provides early, systematic notification of impulse exhaustion — the most common and costly mistake in Elliott Wave trading is riding Wave 5 too long
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 Notes
All signals are confirmed on bar close — the indicator is non-repainting by design. Pivot detection, wave classification, Fibonacci zone computation, and confluence scoring all finalize on confirmed bars only
Elliott Wave classification requires a minimum of 3–5 confirmed swings in the rolling array. On charts with fewer than 200 bars of history, the wave phase may show SCAN until sufficient pivot history accumulates
The wave path lines and golden zone box are redrawn on the last bar only for chart performance. Historical signal triangles and exit warnings are preserved on their original bars
The minimum leg size filter (default: 1.0× ATR) ensures that only waves with meaningful price movement are classified. Very small swings below the ATR threshold are ignored by the wave engine, preventing micro-structure noise from producing false wave counts
The W5 divergence detection uses pivot-based RSI comparison with a configurable lookback. The detection is based on confirmed pivots and is non-repainting, but the divergence signal appears at the confirmation bar (pivLen bars after the actual pivot), not at the pivot bar itself
When both W2 and W4 conditions are simultaneously met (a rare occurrence in transition periods), W4 takes priority in the signal selection because W4 entries occur in more mature, structurally confirmed wave counts
The indicator does not automatically label historical waves — it focuses on the live wave phase and active entry setups. For historical wave labeling, combine with a standalone Elliott Wave labeling tool
The indicator does not track open positions or P&L and does not connect to any broker or account
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ 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 understand that markets move in waves — and who want a system precise enough to position them at the exact Fibonacci level where the next wave begins. Indicator

[ A L P H A X ] BASTION - Support & Resistance PatternsAlphaX BASTION — Support & Resistance Lattice Engine: Touch-Clustered Zone Detection, HTF Level Blending, Four Interaction Playbooks & Level-to-Level Target System
AlphaX BASTION is a professional-grade support and resistance system built around the concept of a lattice — a dynamic, self-updating grid of strength-scored price zones that are continuously constructed from fractal pivot clusters, blended with higher timeframe levels, decayed over time as they lose relevance, and scored by touch frequency and institutional significance. Unlike static horizontal line indicators or basic pivot systems, BASTION treats every support and resistance level as a living structure with a birth date, a touch history, an HTF weight, and a decay clock. Where most S/R systems simply identify levels and leave the trader to decide what to do, BASTION goes one step further: it monitors every active level for four specific micro-pattern interactions — DEFEND, SWEEP, RETEST, and COIL — and fires precision entry signals when those interactions occur at qualified levels with sufficient confluence. The target for every signal is not an arbitrary ATR multiple or measured move — it is the next Bastion level in the signal direction, the natural institutional delivery destination from one defended wall to the next. Designed for traders across crypto, forex, gold, and indices on any timeframe.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏰 The Lattice — A Self-Building Defended Price Map
The word "lattice" captures the core concept precisely: BASTION constructs an interconnected grid of defended price levels that represents the current institutional support and resistance landscape. This lattice is not drawn manually, not imported from a fixed timeframe, and not redrawn from scratch on every bar. It is built incrementally — growing as new pivots form, strengthened as levels are retested, and pruned as levels age beyond their relevance window.
How the lattice is constructed:
On every bar, BASTION detects confirmed fractal pivot highs and lows (using a configurable pivot length, default: 5 bars each side). Each new pivot is fed into the lattice's merge algorithm:
If the new pivot is within the merge tolerance (default: 0.22× ATR) of an existing level, it merges with that level — the level's midpoint shifts to the weighted average of all contributing pivots, the touch count increments, the zone boundaries expand if necessary, and the last touch timestamp updates
If the new pivot is farther than the merge tolerance from any existing level, a new level is created with the pivot as its midpoint, zone height of ±0.18× ATR above and below, touch count of 1, and the current bar as its birth bar
When the number of levels per side exceeds the configured maximum (default: 4), the oldest level is dropped from the end of the array
Level decay:
Levels that have not been touched in more than the configured decay period (default: 250 bars) are pruned automatically. This ensures the lattice reflects current institutional market memory rather than accumulating ancient, irrelevant levels that clutter the chart and produce false signals.
Why touch clustering produces better levels than standard S/R: A single pivot high at a price is a weak level — it represents one instance of sellers overwhelming buyers. The same price area touched three times across different sessions represents a genuine institutional order cluster — the level where significant participants have repeatedly defended their position. BASTION's weighted averaging and touch counting system identifies these genuine defended levels and distinguishes them from noise pivots.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📡 HTF Level Blending — Multi-Timeframe Institutional Walls
Every Bastion level is either a current timeframe pivot cluster or a higher timeframe structural level . When Show HTF Swing Levels is enabled (default: on), BASTION pulls pivot highs and lows from the configured HTF (default: H4) and feeds them into the same merge algorithm as current timeframe pivots.
HTF levels receive a special weight in the strength calculation: +2 additional strength points beyond their touch count. This reflects the institutional significance differential — a resistance level formed on H4 represents a zone where a much larger institutional participant defended their position, and carries proportionally more weight than a current timeframe pivot at the same price.
HTF levels are visually distinguished: HTF-sourced zones are rendered with a slightly different purple color (slateblue rather than the standard purple), and HTF-contributing midlines use a thicker dashed line (width 2 vs 1 for standard levels). This allows you to immediately identify which levels have higher timeframe structural backing.
How HTF blending works in practice: When an H4 resistance level is at 2490.00 and a current timeframe resistance forms at 2491.50 — within the merge tolerance — they merge into a single strengthened level. The merged level receives the touch count of both the HTF pivot and any current timeframe retests, plus the HTF weight bonus, making it one of the strongest levels in the lattice. This is the precise behavior of real institutional support and resistance: the H4 level acts as the anchor, and intraday touches confirm it.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💪 Level Strength Scoring
Every level in the lattice has a dynamically computed strength score used to qualify signals and sort level priority.
Strength components:
Touch count — the primary strength component. Each time a new pivot merges into the level, touch count increments. A level with 4 touches is significantly stronger than one with 1
HTF bonus (+2) — levels that have HTF pivot contributions receive 2 additional strength points, reflecting their higher institutional significance
Recency bonus (+1) — levels born within the last 80 bars receive 1 additional point. Fresh levels that were recently created and immediately retested carry more immediate institutional relevance than older levels with the same touch count
Minimum strength gate: Signals are blocked from firing at levels with strength below the configured minimum (default: 2 touches). This single filter eliminates the single most common false signal in S/R trading — entering at an untested level that has not proven itself as a genuine defended zone.
Strength display on dashboard: The nearest support and resistance levels are displayed on the dashboard with their strength scores in brackets — e.g., "2450.50 " means the level at 2450.50 has a strength score of 4. At a glance, you know which levels are most defended.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎮 The Four Interaction Playbooks
The lattice provides the structural map. The playbook engine defines what to do when price arrives at a lattice level. Four specific micro-pattern interactions are monitored continuously — each representing a different way price can interact with a defended wall and a different entry scenario.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DEFEND — Wick Rejection at Level
The most common and cleanest S/R interaction. A wick rejection candle forms when price tests the level and is immediately repelled — buyers overwhelm sellers at support, or sellers overwhelm buyers at resistance, within a single candle.
Long conditions (support DEFEND):
The current bar's low is within the proxAtr distance of the nearest support level
The lower wick exceeds the configured minimum (default: 52% of bar range) — a dominant rejection wick
The close is in the upper quarter of the bar (above bodyBot + 25% of range)
The close is above the zone bottom — price rejected from inside the zone
The DEFEND signal tells you: The support level absorbed the selling pressure on this bar with a clear institutional response. The wick is the signature of buyers stepping in aggressively at the defended zone. This is the most textbook S/R signal available and the highest-frequency of the four playbooks.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SWEEP — Liquidity Grab + Reclaim
The institutional stop-hunt interaction. Price breaches the zone boundary to trigger stop orders, then immediately reverses and closes back inside the zone.
Long conditions (support SWEEP):
The current bar's low extends below the zone bottom by more than the minimum sweep depth (default: 0.12× ATR) — stop orders below support have been triggered
The bar closes above the zone midline — the reclaim is decisive, not just touching the boundary
The bar closes bullish (close above open) — institutional buying drove the recovery
Why SWEEP is the highest-conviction signal: A liquidity sweep at a lattice level combines two layers of institutional evidence. The level itself has been defended multiple times (touch count) and has institutional order significance. The sweep event confirms that institutions actively used the liquidity pool below the level to fill their buy positions — the same sweep-and-reclaim dynamic that underlies MAGNET, but now occurring specifically at a pre-qualified lattice level with known strength.
The SWEEP playbook carries a confluence bonus (+1 layer point) because of this elevated institutional evidence.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
RETEST — Break Then Hold (S/R Flip)
The classic support-becomes-resistance and resistance-becomes-support interaction. Price previously broke through the level from the other side, and is now returning to test the flipped level.
Long conditions (support RETEST):
Within the lookback window (default: 12 bars), the close was below the zone bottom — a genuine prior breakdown
The current bar's low is within the zone and the close is above the zone midline — the retest from above is holding
The current bar closes bullish
The RETEST signal captures: The moment when a broken resistance becomes confirmed new support. When a level that previously acted as resistance is broken, retail traders who were long above the level are stopped out or become sellers. When price returns to test the level from above — and the close holds above the midline — the same institutional level that attracted sellers is now attracting buyers who missed the initial breakout. This is the "second chance" entry that offers excellent risk/reward relative to the original breakout candle.
The RETEST playbook also carries a confluence bonus (+1 layer point).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
COIL — Compression into Level
The pre-breakout compression interaction. Price has been ranging with narrow ATR bars approaching the level — a coiling squeeze that frequently precedes an explosive directional move.
Long conditions (support COIL):
The last N bars (default: 4) each have an ATR of less than 0.75× the overall ATR — the market is compressing with below-average volatility
The close is within the proxAtr distance of the support level — the compression is occurring directly at the lattice level
The close is above the zone midline — the compression is occurring on the correct side of the level
The COIL signal captures: The energy-building phase at a defended level. When price approaches a lattice level with declining volatility over multiple bars, it indicates the institutional response to that level is suppressing price movement — buyers and sellers are in equilibrium at the level, but the institutional bias (toward defending it as support or resistance) creates a coiled spring. The first decisive bar after the coil frequently produces a large directional move.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Level-to-Level Target System — The Bastion's Unique Approach
Every other entry system in the AlphaX suite uses ATR multiples, Fibonacci measured moves, or pattern heights to compute take profit targets. BASTION uses none of these. The target for every BASTION signal is the next Bastion level in the direction of the trade.
For a long signal at support: The target is the nearest resistance level above the entry price in the current lattice. This is the next defended wall — the level where sellers are expected to step in and potentially cap the move.
For a short signal at resistance: The target is the nearest support level below the entry price — the next defended wall where buyers are expected to step in.
Why level-to-level targeting is superior to measured moves for S/R trading: The market does not move from support to an arbitrary ATR multiple above. It moves from support to resistance — from one institutional wall to the next. Using the actual lattice level as the target ensures the trade is exited at the next genuine institutional interaction point rather than at an arbitrary mathematical distance. This aligns the trade's exit with the same institutional framework that generated the entry.
NEXT WALL TGT on dashboard and chart: The target level is displayed on the dashboard as NEXT WALL TGT and plotted as a yellow-green dashed line on the chart labeled "NEXT WALL." When no opposing lattice level is currently qualified (the target would be beyond the available lattice), the system shows — rather than fabricating a target.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧠 The 7-Layer Confluence Engine
Every playbook signal is evaluated through a 7-layer scoring system. Signals below the minimum layer count (default: 4) are suppressed.
Layer 1 — Level Strength (1 point):
The interacted level meets the minimum strength threshold (touch count + HTF bonus + recency bonus ≥ minimum). Levels that do not meet this floor cannot produce signals regardless of playbook quality.
Layer 2 — HTF Trend Bias (1 point):
The higher timeframe EMA structure (default: 60-minute, 21/55 EMA) agrees with the signal direction. Bull signals require HTF bull, bear signals require HTF bear. When HTF bias is disabled, this layer is neutral (0 points). Note that the HTF bias is also enforced as a hard condition in the signal firing logic — signals opposing the HTF are blocked entirely when useHtfBias is on.
Layer 3 — Volume Expansion (1 point):
Current bar volume exceeds the volume moving average by the configured multiplier (default: 1.08×). Confirms institutional participation on the interaction bar.
Layer 4 — Non-Chop Market (1 point):
Choppiness Index is below the configured threshold (default: 62). Also enforced as a hard gate — extreme chop blocks all signals. S/R interactions during extreme chop frequently produce false breakouts and fake rejections.
Layer 5 — Playbook Bonus (1 point):
SWEEP and RETEST playbooks receive 1 additional point reflecting their elevated institutional evidence. DEFEND and COIL do not receive this bonus — they are valid but carry less structural confirmation than a sweep reclaim or S/R flip.
Layer 6 — Bar Range Quality (1 point):
The current bar's range is at least 0.35× ATR — the interaction bar has sufficient price action to produce a genuine signal. Doji and near-doji bars in critical zones do not score this point.
Layer 7 — Session Active (1 point):
The current bar is within the configured active session window when the session filter is enabled. When the filter is off, this layer always contributes its point.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Live Dashboard
The 14-row real-time dashboard displays the complete state of the lattice and the current signal context.
LATTICE
Nearest Sup — the price of the nearest support level below current price, with its strength score in brackets (e.g., "2450.50 "). Yellow-green color
Nearest Res — the price of the nearest resistance level above current price with strength score. Red color
Zone Count — the total number of active support and resistance levels in the lattice (e.g., "3 sup · 4 res"). Provides awareness of how populated the current lattice is
PLAYBOOK
State — the current playbook state: the active playbook name (DEFEND, SWEEP, RETEST, COIL) when a signal just fired; WATCH WALLS during the inter-signal period
Bias — ▲ LONG or ▼ SHORT when a signal fired; NEAR RES, NEAR SUP, or MID-RANGE based on current price position relative to the lattice when idle
Next Wall Tgt — the price of the next opposing lattice level — the level-to-level target for the current trade
FILTERS
HTF Bias — ▲ BULL, ▼ BEAR, or — FLAT
Chop — live Choppiness Index value. Orange when above the stand-aside threshold
Volume — EXPAND (above threshold) or QUIET
Playbooks On — abbreviations of all currently enabled playbooks (DEF SWP RET COIL) for quick reference
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 Chart Visual System
Resistance Zone Boxes (purple / slateblue) — semi-transparent boxes spanning each resistance level from its birth bar to 15 bars beyond current. Standard purple for current timeframe levels, slateblue for HTF-blended levels
Resistance Midlines (purple dashed) — the exact midpoint of each resistance zone. Width 1 for standard, width 2 for HTF levels
Support Zone Boxes (yellow-green) — semi-transparent yellow-green boxes for all active support levels
Support Midlines (yellow-green dashed) — support zone midpoints. Width 2 for HTF levels
⬡ Diamond (below bar, bright yellow-green) — BASTION long signal. Playbook fired at a support level with qualifying confluence
⬡ Diamond (above bar, bright red) — BASTION short signal
Playbook Label — appears above or below the signal diamond showing "BASTION LONG/SHORT" + playbook name + level price
SL Guide (red dotted) — stop loss below the zone bottom plus ATR buffer (long) or above zone top plus ATR buffer (short), extending 30 bars forward with "SL" label
NEXT WALL Guide (yellow-green dashed) — the level-to-level target extending 30 bars forward with "NEXT WALL" label
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 How to Trade with AlphaX BASTION — Step by Step
Step 1 — Read the Lattice
Check the NEAREST SUP and NEAREST RES rows on the dashboard. Note the strength scores in brackets. Levels with strength 4+ are the most defended — prioritize interactions at these levels
Look at the Zone Count row — a lattice with 3–4 levels on each side represents a well-populated market map. A sparse lattice (1–2 levels per side) means fewer reference points and potentially lower signal quality
Check whether the nearest support or resistance has HTF origin — the slateblue color on the chart or the higher strength score indicates institutional level significance
Step 2 — Monitor Price Approaching a Level
When the dashboard Bias row shows NEAR RES or NEAR SUP, price is approaching a lattice level within the proximity threshold. Watch for a playbook interaction to develop
Identify which playbook is most likely: Is price approaching with narrow bars (COIL)? Did price recently spike below (SWEEP potential)? Has the level previously been broken (RETEST setup)? Is price arriving with a clear wick forming (DEFEND setup)?
Check HTF Bias and Chop on the dashboard — both must be favorable before a signal can fire
Step 3 — Enter on the Diamond Signal
A ⬡ diamond below the bar confirms a qualifying long interaction. The playbook label shows which of the four setups fired and at which exact level
The SL guide shows the stop level — placed below the zone bottom plus ATR buffer (long) or above zone top plus buffer (short). This is the structural invalidation point: if price closes through the zone boundary in the wrong direction, the level has failed to defend
The NEXT WALL guide shows the target level — the next opposing lattice wall
SWEEP and RETEST signals carry the highest confluence (extra playbook layer point) — size these entries at full allocation. DEFEND and COIL at standard allocation
Step 4 — Manage to the Next Wall
The trade targets the NEXT WALL level shown on the chart. As price approaches that level, watch for rejection signals in the opposing direction — if BASTION fires a signal at the target level against your trade, this is a natural exit point
Monitor the lattice continuously — new levels may form during the trade that become relevant intermediate targets or stop adjustment points
If the lattice map shifts significantly (a level is pruned by decay or a strong new level forms), reassess the trade's target
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Identifying Low-Quality Conditions — When Not to Trade
Stand aside when:
Chop Index is orange on the dashboard — the hard gate is active. No signals fire in extreme chop. S/R levels lose their predictive power when the market is oscillating — every touch becomes ambiguous
Zone Count shows 1–2 levels per side — a sparse lattice means the system has insufficient structural reference. The market may be trending strongly through all levels or may be too early in the session to have built meaningful clusters. Wait for the lattice to populate
Nearest level strength is 1 — the minimum strength gate will block signals at untested levels, but if the nearest levels all show , the lattice is populated with fresh, unproven levels. Increase the minimum level strength in settings to require at least 2–3 touches
HTF Bias shows FLAT — no higher timeframe directional conviction. Counter-trend S/R interactions in a flat HTF environment fail at a higher rate because neither institutional buyers nor sellers have committed to a directional view
NEXT WALL TGT shows — — no opposing qualified level exists in the lattice above (for longs) or below (for shorts). Without a level-to-level target, the trade lacks a natural exit framework. Consider skipping signals when no next wall target is available
Playbook is COIL at a level with strength 2 — a coil at a weak, lightly-tested level carries the lowest probability of the signal matrix. COIL at high-strength (4+) levels with HTF backing is a quality setup; COIL at minimum-strength levels is marginal
The ideal BASTION setup:
Support or resistance level with strength 4+ (multiple touches, ideally HTF-blended)
HTF Bias aligned with the trade direction
SWEEP or RETEST playbook (highest confluence bonus)
Volume expanding on the interaction bar
Chop Index well below threshold
Clear NEXT WALL target on the opposing side of the lattice
Signal layers at 6–7 out of 7
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Key Features
🏰 Dynamic S/R lattice — self-building, self-pruning grid of touch-clustered support and resistance zones. New pivots merge into existing levels, incrementing touch counts and adjusting zone boundaries automatically
📡 HTF level blending — H4 (or any configurable HTF) pivot levels fed into the same lattice with a strength bonus, producing a multi-timeframe S/R map in a single indicator
💪 Level strength scoring — touch count + HTF bonus + recency bonus produces a composite strength score for every level. Minimum strength gate blocks signals at untested levels
⏱ Level decay — zones older than the configurable decay period are automatically pruned, keeping the lattice relevant to current institutional market memory
🎮 Four interaction playbooks — DEFEND (wick rejection), SWEEP (liquidity grab + reclaim), RETEST (S/R flip), COIL (compression) — each detecting a different institutional level interaction scenario
🎯 Level-to-level target system — take profit targets the next opposing lattice wall rather than an arbitrary ATR multiple or measured move. The most institutionally grounded target method available
🛡 Zone-anchored stop loss — stop placed beyond the zone boundary plus configurable ATR buffer, at the structural invalidation point for each interaction type
🧠 7-layer confluence engine — Level Strength, HTF Trend Bias, Volume, Non-Chop, Playbook Bonus, Bar Range Quality, Session Active
📊 Live lattice dashboard — Nearest Support/Resistance with strength scores, Zone Count, active Playbook, Bias, Next Wall Target, and all filter states
🎨 Phase-coded zone visualization — resistance zones in purple/slateblue, support zones in yellow-green. HTF levels distinguished by color shade and line width
🔔 2 alert conditions + runtime alerts — Bastion Long and Bastion Short with level price and target in the alert message
⚙ Fully configurable — pivot length, zone merge and half-height tolerances, max levels per side, level decay, HTF timeframe for levels, all four playbook enables, proximity, wick minimum, sweep depth, retest lookback, coil bars, minimum level strength, confluence minimum, HTF bias timeframe and EMAs, volume filter, chop gate, session, cooldown, SL buffer, and all colors are independently adjustable
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Settings Reference
S/R Lattice
Swing Pivot Length — fractal sensitivity for pivot detection (default: 5)
Zone Merge (xATR) — ATR distance within which new pivots merge into existing levels (default: 0.22)
Zone Half-Height (xATR) — ATR distance above and below each level midpoint defining the zone boundaries (default: 0.18)
Max Levels per Side — maximum active resistance and support levels maintained simultaneously (default: 4 each)
Level Decay (bars) — bars since last touch after which a level is pruned from the lattice (default: 250)
ATR Length — ATR calculation lookback (default: 14)
Show S/R Zones — toggle lattice boxes and midlines
Blend HTF Swing Levels — toggle higher timeframe level incorporation
HTF for Levels — the higher timeframe from which pivot levels are imported (default: H4)
HTF Pivot Length — pivot length for HTF level detection (default: 5)
Interaction Playbooks
DEFEND — Wick Rejection at Level — toggle the rejection wick playbook
SWEEP — Liquidity Grab + Reclaim — toggle the sweep and reclaim playbook
RETEST — Break then Hold — toggle the S/R flip retest playbook
COIL — Compression into Level — toggle the narrow-bar compression playbook
Max Distance to Level (xATR) — ATR distance from level within which an interaction is considered proximate (default: 0.35)
Min Rejection Wick % — minimum wick fraction of bar range for DEFEND (default: 0.52)
Min Sweep Depth (xATR) — minimum extension below/above zone boundary for SWEEP (default: 0.12)
RETEST Lookback (bars) — bars to scan for the prior breakout in RETEST detection (default: 12)
COIL Min Narrow Bars — consecutive narrow-ATR bars required for COIL (default: 4)
Min Level Strength (touches) — minimum composite strength for a level to generate signals (default: 2)
Confluence
Min Layers (of 7) — minimum confluence score to fire a signal (default: 4)
HTF Trend Bias / HTF Bias TF / HTF Fast / Slow EMA — trend bias filter parameters
Volume Expansion / Volume vs Avg / Volume Avg Length — volume layer parameters
Block Extreme Chop / Choppiness Length / Chop Block Above — chop gate parameters
Session Filter / Active Session — trading hours restriction
Signal Cooldown (bars) — minimum bars between signals (default: 6)
Level-to-Level Guidance
Show SL + Next Level Target — toggle the stop and target guide lines
SL Beyond Sweep/Zone (xATR) — ATR buffer beyond the zone boundary for stop placement (default: 0.35)
Show Playbook Label — toggle the signal label showing playbook name and level price
Display
Show Entry Markers — toggle the ⬡ diamond signal shapes
Show Dashboard — toggle the full dashboard
Dashboard Position — Top Left / Top Right / Bottom Left / Bottom Right
Colors
Bull / Support — yellow-green for support zones and bullish signal elements
Bear / Resistance — red for resistance zones and bearish signal elements
S/R Lattice — purple for standard lattice zones and midlines
HTF Level — slateblue for HTF-blended level zones and midlines
Sweep Accent — orange for SWEEP playbook accents and chop warnings
Stop Guide / Next Level Target — stop and target line colors
Dash Text / Dash BG / Dash Header / Dash Section / Dash Frame — full dashboard color control
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 Alert Conditions (2 total + runtime)
Entry Alerts
Bastion Long — qualifying long interaction fired at a support level. Alert message includes playbook name, level price, and next wall target
Bastion Short — qualifying short interaction fired at a resistance level
Runtime alerts (via the alert() function) fire simultaneously with the chart signals, also containing the playbook, level price, and target in the message for immediate actionability.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Recommended Settings by Instrument & Timeframe
The default configuration is optimized for XAUUSD, major forex pairs, and crypto on M5–H1 :
Pivot Length at 5 — balanced sensitivity for intraday lattice construction
Zone Merge at 0.22× ATR — appropriate for gold's tick structure; tighter than typical forex parameters
Level Decay at 250 bars — approximately 20 hours on M5; sufficient to maintain intraday relevance without accumulating ancient levels
HTF for Levels at H4 — the most widely respected swing timeframe for gold and forex institutional structure
Minimum Level Strength at 2 — requires at least two confirmed touches before a level can generate signals
For other instruments or timeframes, adjust:
M1–M3 scalping — reduce Pivot Length to 3, reduce Zone Merge to 0.15, reduce Level Decay to 100–150 bars, reduce Cooldown to 3, reduce COIL Min Narrow Bars to 2–3
H4–Daily swing trading — increase Pivot Length to 8–10, increase Zone Merge to 0.35, increase Level Decay to 500+, set HTF for Levels to Weekly, increase Min Level Strength to 3
Crypto (BTC, ETH) — increase Zone Merge to 0.28–0.35 for wider tick structure, increase Min Sweep Depth to 0.18, increase Level Decay to 300
Indices (NAS100, US30) — use session filter for cash market hours, increase Zone Merge to 0.25, increase Min Level Strength to 3 for index structure
More signals — lower Min Layers to 3, reduce Min Level Strength to 1, increase Max Distance to Level to 0.50
Highest-quality only — raise Min Layers to 5–6, increase Min Level Strength to 3+, enable only SWEEP and RETEST playbooks
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👥 Who This Is For
🏰 Support and resistance traders — BASTION is the most complete and systematic S/R implementation in the AlphaX suite. Every aspect of the S/R trading approach — level identification, strength scoring, interaction detection, stop placement, target identification — is automated and quantified
📡 Multi-timeframe S/R traders — the HTF level blending system automatically incorporates H4 (or any configurable timeframe) swing levels into the same lattice, producing a multi-timeframe S/R map without requiring manual level drawing across timeframes
💧 Liquidity sweep traders — the SWEEP playbook at lattice levels is the highest-conviction signal type in BASTION, combining the stop-hunt reversal concept from MAGNET with the pre-qualified, strength-scored level framework of the lattice
🎯 Traders who want structurally meaningful targets — the level-to-level target system is the most institutionally grounded TP approach available — targeting the next defended wall rather than an arbitrary distance
🧠 Systematic traders who want quantified S/R — touch counts, strength scores, decay parameters, and confluence layers replace entirely subjective level identification with objective, repeatable criteria
📈 Traders across all asset classes — the ATR-normalized zone parameters adapt naturally to gold, forex, crypto, and indices without manual recalibration between instruments
⚠ Traders who draw too many or too few S/R levels manually — BASTION manages level count automatically through the Max Levels per Side setting and the decay system — always showing the most current and most relevant levels without chart clutter
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 Notes
All signals are confirmed on bar close — the indicator is non-repainting by design. Lattice construction, level strength, playbook detection, and confluence scoring all finalize on confirmed bars only
The lattice is built incrementally from the first bar of chart history. On initial chart loads, the lattice will be sparse for the first 50–100 bars as pivots begin to form and levels begin to cluster. Signal quality improves as the lattice populates
The level decay mechanism (default: 250 bars) means that on very active instruments with frequent pivots, the lattice refreshes relatively quickly. On slower instruments or higher timeframes, levels persist longer. Adjust the decay period to match your instrument's typical S/R memory window
HTF level blending uses Pine Script's request.security — HTF pivots are confirmed on the HTF's own bar close schedule, not the current timeframe. This is non-repainting and consistent with all standard security requests
When multiple playbooks fire at the same level on the same bar, the signal with the highest layer count is selected. The dashboard's playbook abbreviations show which playbooks are currently enabled
Maximum 500 lines, 500 labels, and 60 boxes are rendered. The lattice visualization uses boxes and lines for each level, the signal uses a label, and the guide uses lines and labels. On very active charts with maximum level counts, older elements may be removed by PulseWire rendering limits
The indicator does not track open positions or P&L; and does not connect to any broker or account
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ 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 understand that price does not move in a vacuum — it moves between walls, and the key to reading the market is knowing where those walls are, how strong they are, and exactly what price does when it arrives at them. Indicator

Zero-Lag GARCH Bands | NAL1. Overview
Zero-Lag GARCH Bands | NAL is an adaptive volatility band indicator built from a Zero-Lag EMA baseline and an optimized GARCH-style volatility engine.
The indicator does not use a standard fixed-width channel. Instead, it estimates market variance through a recursive GARCH framework, smooths that volatility with a Zero-Lag EMA, and uses the result to create dynamic upper and lower bands around price structure.
The purpose of the indicator is to identify when price escapes a volatility-adjusted regime boundary, while allowing the band width to adapt to the underlying variance environment.
2. Calculation
The indicator starts by estimating volatility from lagged log returns. These returns are squared to create a variance component, which becomes the foundation of the GARCH model.
GARCH_LogReturn = math.log(close / close )
GARCH_SquaredLogReturn = math.pow(GARCH_LogReturn, 2.0)
GARCH_RealizedVariance = ta.sma(GARCH_SquaredLogReturn, GARCH_Lookback)
The script then searches through possible coefficient weights to find a beta/lambda value that better fits recent realized variance behavior. A second optimization loop is used to estimate gamma, which controls the long-run variance contribution.
These optimized coefficients are combined into a GARCH-style variance model using three components: long-run variance, recent shock variance, and lagged variance.
GARCH_Variance =
GARCH_Gamma * GARCH_LongRunVariance +
GARCH_Alpha * GARCH_SquaredLogReturn +
GARCH_Beta * GARCH_LaggedVariance
After the variance estimate is created, it is smoothed using a Zero-Lag EMA. This gives the volatility engine a faster response while still reducing noise.
GARCH_ProjectedVariance = f_zlema(GARCH_Variance, GARCH_SmoothLen)
GARCH_Volatility = math.sqrt(math.max(GARCH_ProjectedVariance, 0.0))
The baseline is also built with a Zero-Lag EMA, applied after a light EMA pre-smoothing step. This creates the central reference line for the band structure.
The final bands are created by scaling the Zero-Lag GARCH volatility against the selected source and band pressure setting. Higher band pressure creates a tighter band, while lower pressure allows the band structure to expand.
upperBand = baseline + (baseline_src / band_pressure) * GARCH_VolatilityMultiplier
lowerBand = baseline - (baseline_src / band_pressure) * GARCH_VolatilityMultiplier
A bullish state triggers when price closes above the upper band. A bearish state triggers when price closes below the lower band. When price remains inside the bands, the previous regime is held.
3. Key Features
Zero-Lag EMA baseline for reduced-lag price structure.
Optimized GARCH-style volatility engine.
Adaptive variance model using shock, lagged, and long-run components.
Zero-Lag smoothing applied to projected volatility.
Dynamic upper and lower volatility bands.
Band pressure control for adjusting channel tightness.
State-based candle coloring, band coloring, glow effect, and directional fills.
4. Use
Zero-Lag GARCH Bands is designed to identify when price begins escaping its volatility-adjusted structure. A close above the upper band reflects bullish expansion, while a close below the lower band reflects bearish expansion.
The GARCH engine gives the indicator a deeper volatility layer than a standard ATR or deviation channel. Instead of only measuring recent range, it models variance behavior and projects that into the band structure.
This indicator is best used as a specialized module within a complete strategy framework. Its role is to isolate volatility-adjusted regime expansion, where price is evaluated against a dynamic variance boundary rather than a static channel. The full value comes from how this volatility regime signal is integrated into a broader process for timing, structure, and execution.
Indicator

Apex Fusion AI| Smart Trend EngineApex Fusion AI | Smart Trend Engine
Apex Fusion AI combines multiple high-probability trading concepts into a single confluence engine designed to filter low-quality setups and highlight only the strongest opportunities.
Instead of relying on a single indicator, it analyzes trend, momentum, market structure, volatility, and volume confirmation simultaneously.
Features
• EMA Trend Filter
• SuperTrend Confirmation
• MACD Momentum Analysis
• Momentum Strength Filter
• Fractal Market Structure (BOS)
• Fibonacci Retracement Confluence
• ATR Dynamic Risk Management
• Smart Volume Confirmation
• Institutional POC Approximation
• Built-in A+ Quality Scoring System
Each signal is evaluated through a weighted scoring model, allowing traders to focus only on high-confluence setups while filtering out weaker market conditions.
Designed for swing trading, day trading, and scalping across Forex, Crypto, Indices, Commodities, and Gold.
Works on every timeframe, with particularly strong performance on the 1H chart where trend, momentum, and structure align more consistently.
This indicator is intended to assist decision-making and should be used alongside sound risk management and proper market analysis.
— Tomukas Trading Strategy

Gaussian RSI | NAL1. Overview
Gaussian RSI | NAL is a smoothed momentum-regime indicator built around an RSI engine filtered through a Gaussian weighting model. Instead of plotting raw RSI, the indicator applies Gaussian smoothing to reduce noise and create a cleaner momentum line.
The signal is then refined with an optional Gaussian confluence filter. This adds a second smoothing layer that acts as a directional confirmation structure, helping separate stronger momentum regimes from weaker internal fluctuations.
2. Calculation
The indicator starts by calculating RSI from the selected source. This creates the base momentum reading used by the rest of the model.
The RSI is then passed through a Gaussian filter. The Gaussian filter weights the lookback window using a bell-curve style distribution, creating a smoother momentum line while still preserving directional movement.
A second Gaussian filter can also be applied as a confluence line. This creates a slower reference layer for the Gaussian RSI, allowing the indicator to judge whether the current RSI structure is aligned with its own smoothed trend.
The bullish condition requires the Gaussian RSI to move above the upper threshold. When confluence is enabled, the Gaussian RSI must also be above the Gaussian confluence line.
The bearish condition requires the Gaussian RSI to move below the lower threshold. When confluence is enabled, the Gaussian RSI must also be below the Gaussian confluence line.
The final state holds its previous direction when neither condition is active. This creates a cleaner regime output instead of constantly flipping to neutral between threshold zones.
3. Key Features
Gaussian-smoothed RSI momentum engine.
Optional Gaussian confluence filter.
Upper and lower threshold-based regime detection.
State-based candle coloring and RSI coloring.
Glow-style RSI plot, regime fills, confluence line, and transition labels.
Designed to reduce raw RSI noise while preserving momentum structure.
4. Use
Gaussian RSI is designed to identify when momentum begins shifting into a stronger bullish or bearish regime. A move above the upper threshold reflects bullish momentum pressure, while a move below the lower threshold reflects bearish momentum pressure.
The confluence filter adds an additional layer of structure by requiring the Gaussian RSI to align with its own smoother reference line. This can help separate cleaner momentum expansions from weaker internal movement.
This indicator is best used as a specialized momentum module within a complete strategy framework. Its role is to isolate a refined RSI-based momentum layer, where the full value comes from how the signal is integrated into a broader process for regime, timing, and execution.
Indicator

Adpative Dual Cloud | NAL1. Overview
Adaptive Dual Cloud | NAL is a dual-baseline trend cloud built from two separate smoothing structures: a Kijun-style midpoint baseline and an ALMA baseline. Instead of relying on a single moving average or one volatility model, the indicator builds an adaptive cloud around both baselines and only confirms direction when price escapes the full combined structure.
The purpose of the indicator is to create a stricter trend envelope. The Kijun side captures broader structural balance, while the ALMA side adds a smoother adaptive layer. The final upper and lower cloud boundaries are selected from both systems, forcing price to clear the stronger side of the cloud before a bullish or bearish state is confirmed.
2. Calculation
The indicator starts by creating two independent baselines. The first baseline is a Kijun-style midpoint calculated from the highest and lowest values over the selected lookback. This represents a structural equilibrium zone.
kijun_sen = math.avg(ta.lowest(cloudLen1), ta.highest(cloudLen1))
The second baseline uses ALMA, giving the cloud a smoother weighted-average component with adjustable sigma and offset. This adds a more refined smoothing layer beside the Kijun structure.
alma_base = ta.alma(srcSeries, cloudLen2, cloud2Off, cloud2Sig)
The indicator then calculates volatility using a selectable deviation engine. The volatility source can be price, the residual between price and the cloud average, or the cloud structure itself. This allows the band width to be built from different layers of market behavior.
VolSrc = switch devSrc
"Price" => srcSeries
"Residuals" => srcSeries - math.avg(alma_base, kijun_sen)
"Cloud" => math.avg(alma_base, kijun_sen)
The volatility engine supports multiple deviation types, including standard deviation, mean absolute deviation, median absolute deviation, exponential deviation, ATR, linear regression deviation, Hull deviation, FRAMA deviation, Kauffman adaptive deviation, Gaussian deviation, and quantile deviation.
After volatility is calculated, adaptive upper and lower bands are created around both baselines.
upper_kijun = kijun_sen + vol * multi_u
lower_kijun = kijun_sen - vol * multi_l
upper_alma = alma_base + vol * multi_u
lower_alma = alma_base - vol * multi_l
The final cloud uses the highest upper boundary and the lowest lower boundary. This makes the signal more selective because price must break beyond the combined cloud, not just one individual baseline.
upper = math.max(upper_kijun, upper_alma)
lower = math.min(lower_kijun, lower_alma)
A bullish state triggers when price closes above the final upper cloud. A bearish state triggers when price closes below the final lower cloud. When price remains inside the cloud, the previous state is held.
3. Key Features
Dual-baseline cloud using Kijun structure and ALMA smoothing.
Adaptive upper and lower bands built from selectable volatility models.
Multiple deviation engines for different volatility interpretations.
Selectable volatility source: price, residuals, or cloud structure.
Final cloud requires price to clear the combined upper or lower boundary.
State-based candle coloring, cloud coloring, glow effect, and directional fills.
4. Use
Adaptive Dual Cloud is designed to identify when price escapes a combined structural and smoothed volatility envelope. A close above the upper cloud reflects bullish expansion beyond both baseline systems, while a close below the lower cloud reflects bearish expansion below the combined structure.
The indicator is intentionally stricter than a single-baseline channel. By combining a Kijun-style midpoint with an ALMA baseline, it creates a cloud that filters more of the internal noise before confirming a directional regime.
This indicator is best used as a specialized module within a complete strategy framework. Its role is to isolate a cloud-based volatility and structure layer, where price must prove strength or weakness against more than one adaptive baseline. The full value comes from how this regime signal is integrated into a broader process for timing, structure, and execution.
Indicator

Median Gaussian Trend | NAL1. Overview
Median Gaussian Trend | NAL is an adaptive trend-band indicator built from a median price baseline, Gaussian smoothing, and Gaussian-weighted volatility bands.
The indicator is designed to filter raw price movement into a smoother directional structure. Instead of using a simple moving average or standard deviation channel, it first compresses price through a median calculation, then applies Gaussian smoothing to create a cleaner baseline. Around that baseline, it builds adaptive upper and lower bands using Gaussian-weighted deviation.
The result is a robust, smooth trend regime tool that identifies when price breaks outside its filtered volatility structure.
2. Calculation
The indicator starts by calculating a median of the selected source. This helps reduce noise by focusing on the central value of recent price action instead of reacting directly to every candle.
That median value is then passed through a Gaussian filter. The Gaussian filter gives more structured weighting to the lookback window, producing a smoother baseline while still preserving directional movement.
The indicator then calculates a Gaussian-weighted deviation around the smoothed median baseline. This creates a custom volatility measurement that is more aligned with the filtered baseline rather than raw price alone.
The upper and lower bands are then built around the Gaussian-smoothed median. The script allows separate upper and lower multipliers, which lets the band structure be asymmetric if needed.
upper = median_base + sd_range * sd_mul
lower = median_base - sd_range * sd_mulb
A bullish state triggers when price closes above the upper band. A bearish state triggers when price closes below the lower band. When price remains inside the bands, the previous regime is held.
3. Key Features
Median-based price filtering.
Gaussian-smoothed baseline.
Gaussian-weighted volatility deviation.
Adaptive upper and lower trend bands.
Separate upper and lower band multipliers.
State-based candle coloring, band coloring, glow effect, and directional fills.
4. Use
Median Gaussian Trend is designed to identify when price escapes its smoothed median-volatility structure. A close above the upper band reflects bullish expansion, while a close below the lower band reflects bearish expansion.
The median component helps reduce noisy price behavior, while the Gaussian smoothing and deviation engine create a more refined trend envelope. This makes the indicator useful for reading directional structure without relying on a raw moving average channel.
This indicator is best used as a specialized module within a complete strategy framework. Its role is to isolate a filtered volatility-trend layer of price behavior, where the real value comes from how the signal is integrated into a broader process for regime, timing, and execution.
Indicator

G-Score | NAL1. Overview
G-Score | NAL is a volatility-adjusted Z-Score regime indicator built from two main components: a smoothed price Z-Score and an adaptive GARCH-based volatility Z-Score.
The indicator does not use fixed overbought or oversold levels. Instead, it builds dynamic thresholds from the current volatility structure of the market. Price is then measured against those volatility-derived boundaries to determine whether the market is entering a bullish or bearish statistical regime.
2. Calculation
The indicator starts by estimating volatility through a GARCH-style process. It calculates log returns from the selected source, converts those returns into squared variance, and then compares short-term variance behavior against a realized variance baseline.
GARCH_LogReturn = math.log(src / src )
GARCH_SquaredLogReturn = math.pow(GARCH_LogReturn, 2.0)
GARCH_RealizedVariance = ta.sma(GARCH_SquaredLogReturn, GARCH_Lookback)
The model then searches through possible beta and gamma coefficients to find weights that better fit the recent variance environment. These optimized coefficients are used to build a GARCH variance estimate from three components: long-run variance, recent shock variance, and lagged variance.
GARCH_Variance =
GARCH_Gamma * GARCH_LongRunVariance +
GARCH_Alpha * GARCH_SquaredLogReturn +
GARCH_Beta * GARCH_LaggedVariance
The final GARCH volatility value is created by taking the square root of the projected variance. This produces the volatility engine used later in the threshold system.
The indicator then calculates two separate Z-Scores. The first is a price Z-Score, measuring where price is relative to its own mean and deviation. The second is a volatility Z-Score, measuring where GARCH volatility is relative to its own historical distribution.
Both values are smoothed with a Jurik-style moving average to reduce noise while keeping the response relatively fast.
The volatility Z-Score is then mirrored into positive and negative boundaries. This creates dynamic upper and lower thresholds that expand and contract with the current volatility regime.
The final signal compares the smoothed price Z-Score against those adaptive volatility thresholds. A bullish state triggers when price strength expands above the upper volatility boundary. A bearish state triggers when price weakness falls below the lower volatility boundary. When price remains inside the volatility envelope, the previous regime is held.
3. Key Features
Adaptive GARCH-style volatility engine.
Price Z-Score measured against volatility-derived thresholds.
Dynamic upper and lower boundaries instead of fixed levels.
Jurik-style smoothing for both price and volatility components.
State-based candle coloring, background regime coloring, threshold fills, and transition labels.
Designed to capture statistical expansion when price moves outside its volatility-adjusted structure.
4. Use
G-Score is designed to identify when price begins separating from its normal statistical range after accounting for the current volatility environment. A move above the upper threshold reflects bullish statistical expansion, while a move below the lower threshold reflects bearish statistical expansion.
The strength of the indicator comes from the relationship between price displacement and volatility regime. Rather than treating every Z-Score reading the same, it lets volatility define the boundary that price must break.
This indicator is best used as a specialized module within a complete strategy framework. Its role is to isolate a specific statistical layer of market behavior, where price expansion is evaluated through the lens of adaptive volatility. The full value comes from how this regime signal is integrated into a broader process for timing, structure, and risk.
Indicator

Volatility Halo | NAL1. Overview
Volatility Halo | NAL is an adaptive volatility band indicator built from a Zero-Lag EMA baseline, ATR band structure, and a recursive GARCH-style volatility regime multiplier.
The indicator does not use fixed-width bands. Instead, it starts with ATR-based bands and then adjusts their width using a projected volatility regime model. This allows the bands to respond differently when market volatility is expanding, contracting, or stabilizing.
2. Calculation
The indicator starts by calculating a Zero-Lag EMA baseline from the selected source. This baseline acts as the central trend reference, helping reduce lag compared to a standard EMA while still keeping the structure smooth.
float baseline = f_zlema(src, baseline_len)
float ATR_Value = ta.atr(ATR_Len)
The ATR value is then multiplied by the user-defined ATR multiple. This forms the base volatility distance used for the upper and lower bands.
The more advanced part of the indicator is the recursive GARCH-style regime multiplier. It begins by calculating log returns and converting them into shock variance. A long-run variance estimate is then built from recent shock variance.
GARCH_LogReturn = close > 0.0 and close > 0.0 ? math.log(close / close ) : 0.0
GARCH_ShockVariance = math.pow(GARCH_LogReturn, 2.0)
GARCH_LongRunVariance = ta.ema(GARCH_ShockVariance, GARCH_LongRunLen)
The model recursively updates conditional variance using three components: recent shock variance, long-run variance, and previous conditional variance. When adaptive coefficients are enabled, the script searches for coefficient weights that better fit recent variance behavior.
GARCH_ConditionalVariance :=
GARCH_Gamma * GARCH_LongRunVariance +
GARCH_Alpha * GARCH_ShockVariance +
GARCH_Beta * GARCH_PreviousConditionalVariance
The conditional variance is then projected and converted into a volatility estimate. This volatility is compared against its own regime baseline to create a volatility regime multiplier. The multiplier is clamped between a minimum and maximum value, preventing the bands from becoming too narrow or too wide.
GARCH_Volatility = math.sqrt(math.max(GARCH_ProjectedVariance, 0.0))
GARCH_RegimeMultiplierRaw = GARCH_Volatility / GARCH_RegimeBase
GARCH_RegimeMultiplier = f_clamp(GARCH_RegimeMultiplierSmooth, GARCH_MinMult, GARCH_MaxMult)
The final band width is created by combining ATR with the GARCH regime multiplier. The upper and lower bands are placed around the Zero-Lag EMA baseline.
hybridBandWidth = ATR_Value * ATR_Mult * GARCH_RegimeMultiplier
upperBand = baseline + hybridBandWidth
lowerBand = baseline - hybridBandWidth
A bullish state triggers when price closes above the upper band. A bearish state triggers when price closes below the lower band. When price remains inside the bands, the previous state is held.
3. Key Features
Zero-Lag EMA baseline for reduced-lag trend structure.
ATR-based volatility bands.
Recursive GARCH-style conditional variance model.
Adaptive volatility regime multiplier.
Bands expand or contract based on projected volatility conditions.
State-based candle coloring, band coloring, glow effect, and regime fills.
4. Use
Volatility Halo is designed to identify moments where price begins escaping its volatility-adjusted structure. A close above the upper band reflects bullish expansion, while a close below the lower band reflects bearish expansion.
The adaptive volatility engine allows the bands to shift with the underlying market environment, making the signal more responsive to changes in pressure and regime.
This indicator is best used as a specialized module within a complete strategy framework. Its real strength appears when it is combined with a broader process for reading market behavior, timing, and risk. The full edge comes from how the signal is integrated, not from the signal existing in isolation.
Indicator

MR8 Trend Direction & Signal IndicatorThe MR8 is a dynamic trend-following indicator built on the McGinley Dynamic moving average — one of the most responsive and self-adjusting smoothing algorithms available. Unlike traditional EMAs that can lag or whipsaw in changing market conditions, the McGinley Dynamic automatically adapts its speed based on market velocity, resulting in cleaner, more reliable signals.
How It Works
MR8 plots two McGinley Dynamic lines — a faster Ribbon 8 and a slower Ribbon 9. When the faster line crosses above the slower line, the ribbon turns white, signaling bullish momentum and a potential long entry. When the faster line crosses below, the ribbon turns grey, signaling bearish momentum and a potential short entry. This crossover method filters out the noise and false flips that plague single-line slope-based indicators.
Built-In Stop Loss
MR8 includes an optional visual stop loss line calculated directly from the ribbon's current value — 2% above the line for shorts, 2% below for longs. Toggle it on in settings to see exactly where your risk level sits relative to the indicator itself, on any timeframe.
Alert Ready
MR8 includes two built-in alert conditions — one for long signals and one for short signals — with a webhook-compatible JSON message format. Connect directly to any automated trading bot or notification system with zero additional configuration.
Best Used On
BTC/USD and BTC/USDT
55 minute, 1 hour, and higher timeframes
Futures and spot markets
Settings
Ribbon 8 Length — controls the speed of the faster line (default 12)
Ribbon 9 Length — controls the speed of the slower line (default 21)
Stop Loss % — distance from the ribbon for the optional SL line (default 2%)
Show Stop Loss Line — toggle the SL visualization on or off Indicator
