OPEN-SOURCE SCRIPT

[ A L P H A X ] ANCHOR Delta Volume Adaptive Entry Engine

9 017
AlphaX ANCHOR — Liquidity-Anchored Trailing Stop System with Delta Volume Profile, Adaptive Band Scaling, HVN Confluence & 6-Layer Entry Engine

AlphaX ANCHOR is a professional-grade trend-following and entry precision system built around a proprietary four-band liquidity-anchored trailing stop engine that adapts to volatility in real time. Where conventional trailing stops use a fixed ATR distance and flip on any close beyond it, ANCHOR builds a structured four-layer band system that breathes with market conditions — tightening automatically during low-volatility squeeze phases and expanding during expansion phases — while simultaneously computing a delta-weighted volume profile anchored to the current trend segment. The result is a system that does three things simultaneously: tells you the trend direction with structural confidence, shows you exactly where the institutional volume is concentrated within the current move, and fires precision entries only when price returns to the outer anchor band within a qualifying 6-layer confluence environment. Designed for swing traders, position traders, and trend-following scalpers across crypto, forex, gold, and indices on any timeframe.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The Anchor Trail Engine — How It Works

The core of AlphaX ANCHOR is the four-band liquidity-anchored trailing stop system — a structured set of concentric ATR bands that trail price in the trend direction, each band serving a distinct role in the trade management framework.

Band architecture:
  • Band 1 (Inner) — the closest band to price. Set at the base multiplier × ATR distance (default: 6.5×). Acts as the tightest stop reference — for aggressive traders who want minimal drawdown and are willing to accept more noise exits
  • Band 2 (Mid-Inner) — base + 1.0× ATR additional offset. The intermediate reference zone
  • Band 3 (Mid-Outer) — base + 2.0× ATR additional offset. Structural breathing room for normal pullbacks
  • Band 4 (Anchor — Outer) — base + 3.0× ATR additional offset. The primary trend invalidation level. A close beyond this band flips the trend. This is the band the confluence engine watches for retest entries


Trailing mechanics:
In a bull trend, all four bands trail price upward — ratcheting higher with every bar that closes higher, never moving down. The trail is one-directional: in a bull trend, bands can only move up; in a bear trend, bands can only move down. This ratchet behavior prevents the bands from widening on pullbacks — once a level is established, price must return all the way to Band 4 before a trend flip is triggered. This single property is what makes ANCHOR bands structurally superior to simple ATR trailing stops: they do not exit on noise, only on genuine structural breakdowns.

Trend flip logic:
A trend flip occurs when the source price closes beyond Band 4 — the outer anchor level. On the flip bar, all four bands immediately reset to the opposite side of price at their respective ATR distances. A ▲ ANCHOR BULL or BEAR ▼ ANCHOR label marks every flip on the chart, giving you clear visual confirmation of every structural trend change.

Heatmap visualization:
When the Trailing Stop Heatmap is enabled, the space between all four bands is filled with gradient color layers — progressively more opaque from Band 1 to Band 4. This creates an immediate visual depth map of the trailing stop structure: the closer price is to Band 4, the deeper into the "danger zone" the pullback has penetrated. At a glance, you can see whether a pullback is shallow (barely in the inner fill) or deep (approaching the outer anchor line) without reading a single number.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🌊 Adaptive Band Scaling — Breathing With Volatility

Standard ATR trailing stops maintain a fixed multiplier regardless of whether the market is in a squeeze or an expansion phase. ANCHOR solves this with an adaptive scaling system that continuously adjusts the effective band multiplier based on current volatility context.

How it works:
The current ATR value is percentile-ranked over the last 100 bars using a percentrank function, producing a real-time volatility percentile reading. Additionally, the system monitors whether Bollinger Bands are compressed inside Keltner Channels — the squeeze condition.

Three scaling states:
  • Squeeze active (BB inside KC) — multiplier scales down to the Adaptive Min Scale (default: 0.85×). Bands tighten. During a squeeze, price movement is compressed and the natural pullback range is narrower — tighter bands correctly reflect this reduced volatility and avoid giving back gains unnecessarily when the market is coiling
  • High volatility (ATR in top 75th percentile) — multiplier scales up to the Adaptive Max Scale (default: 1.15×). Bands widen. During expansion phases, price swings are larger and a wider band correctly avoids being stopped out by normal volatility noise
  • Normal conditions — multiplier stays at 1.0× the base setting. No adjustment needed


Dashboard readout:
The current adaptive scale is displayed live on the dashboard as a multiplier value (e.g., 0.85x SQZ or 1.15x) in real time, so you always know whether the system is in tight, normal, or wide band mode.

Why adaptive scaling matters: A fixed 6.5× ATR trailing stop is too wide during a squeeze and too tight during a volatility spike. Adaptive scaling means ANCHOR is always correctly sized for the current market environment — without any manual adjustment from you.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📊 Delta-Weighted Volume Profile — Anchored to the Trend Segment

The volume profile in AlphaX ANCHOR is not a standard fixed-range profile. It is a trend-segment-anchored profile — recomputed from the exact bar where the current trend began (the last Band 4 flip) to the current bar. Every time the trend flips, the profile resets and starts building fresh from the new trend origin.

What this means in practice: The profile always shows you the volume distribution of the current institutional delivery move — not an arbitrary date range, not the last N bars, but specifically the price levels where volume has concentrated since the institutional trend began. This is the most relevant possible volume profile for understanding the current trade's context.

Delta weighting:
When Delta-Weighted Volume is enabled (default: on), each bar's contribution to the volume profile is adjusted by the estimated directional bias of that candle:
  • In a bull trend — the bull volume estimate (close position within the high-low range × total volume) is used. Bullish candles contribute more weight to their price levels than bearish candles
  • In a bear trend — the bear volume estimate is used. Bearish candles carry more weight


This delta weighting creates a profile that reflects not just where volume occurred, but where directionally committed volume occurred — the levels where buyers (in a bull trend) or sellers (in a bear trend) were most active. These are the genuine institutional accumulation and distribution zones, not just high-activity noise zones.

Profile structure:
The profile is divided into a configurable number of rows (default: 30), each representing an equal price bin across the trend segment's high-low range. The width of each bar in the rendered profile is proportional to the volume in that bin relative to the maximum bin volume — the widest bar is always the highest-volume level.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📍 POC, Value Area & HVN Detection

Point of Control (POC):
The single price bin with the highest volume in the current trend segment. This is the price level where the most delta-weighted volume has traded since the trend began — the most liquid price in the current institutional move. Plotted as a solid purple line extending from the trend start to the right edge of the profile. The POC price is displayed live on the dashboard and is available as a take-profit target mode.

Value Area High (VAH) and Value Area Low (VAL):
The price range containing a configurable percentage of total segment volume (default: 70%). The value area represents the zone where the market spent 70% of its time and volume — the institutional fair value range for the current trend segment. VAH is plotted as a dashed yellow-green line; VAL as a dashed red line. These levels act as natural support and resistance within the trend — price frequently respects VAH and VAL on pullbacks before continuing in the trend direction.

High Volume Nodes (HVNs):
Local volume peaks within the profile — bins where volume is higher than both the bin immediately below and the bin immediately above. These are the institutional congregation zones</b> — price levels where significant two-sided activity occurred. HVNs frequently act as magnets: price is attracted to them, and once reached, tends to spend time at them before continuing. Identified algorithmically across all bins, HVN levels are plotted as horizontal lines extending from the trend start, styled and colored by the configured settings. The highest-volume HVN receives a bold line and a price label.

HVN confluence scoring:
The confluence engine awards 1 point when either the current close or the outer Band 4 level is within a tolerance of ±0.35× ATR of any HVN level. An entry that fires at the anchor band while simultaneously sitting at an HVN level means you are buying or selling at a level where the most institutional volume has transacted — a genuinely high-conviction entry location.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Trend Equilibrium — Premium/Discount Positioning

The Trend Equilibrium line is the midpoint between the highest high and the lowest low since the current trend began (the trendHigh and trendLow of the segment). Plotted as a purple dotted line directly on the chart.

This level serves as the dynamic premium/discount divider for the current trend segment:
  • Below equilibrium = discount — price is in the lower half of the trend segment range. For bull trends, this is the institutional accumulation zone — the preferred entry location for long positions
  • Above equilibrium = premium — price is in the upper half of the range. For bear trends, this is the institutional distribution zone — the preferred entry location for short positions


The Require PD Zone setting enforces that long signals only fire when price is in discount and short signals only fire when price is in premium. This one filter alone eliminates a substantial class of low-quality entries — those that occur when price has already extended far from the segment midpoint and the risk/reward is structurally poor.

Unlike a fixed-range PD calculation, this equilibrium adapts dynamically to the current trend segment — it is always the midpoint of this trend's</i> range, making it the most contextually accurate premium/discount reference available.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🧠 The 6-Layer Confluence Engine

Entry signals fire only when price touches the outer Band 4 anchor level within a qualifying 6-layer confluence environment. Each layer votes independently. The default minimum is 4 of 6.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Layer 1 — Anchor Trend Direction

Awards 1 point when the ANCHOR system's current trend direction agrees with the signal. Bull signals require trend == 1; bear signals require trend == -1. This is also a hard positional requirement — the anchor touch condition itself requires a bull trend for longs (price touching Band 4 from above) and a bear trend for shorts (price touching Band 4 from below). The trend direction is therefore inherently confirmed by the signal trigger condition.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Layer 2 — HTF Bias

Awards 1 point when the higher timeframe EMA structure (default: 60-minute, 21/55 EMAs) agrees with the signal direction. The HTF condition for ANCHOR is stricter than in other AlphaX systems: the HTF fast EMA must be above the slow EMA and</b> the HTF close must be above the HTF fast EMA for a bull vote — requiring both EMA alignment and price confirmation on the higher timeframe simultaneously.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Layer 3 — ADX Trend Strength

Awards 1 point when ADX meets the minimum threshold (default: 18). Confirms the market is in a genuine trending phase where Band 4 retests are likely to produce continuation moves rather than range reversals.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Layer 4 — Volume Delta

Awards 1 point when the estimated volume delta (bull volume EMA minus bear volume EMA) agrees with the signal direction. Confirms that the institutional order flow pressure at the anchor touch is directionally consistent with the trend. A Band 4 touch with opposing volume delta is a warning sign — institutions may be distributing at the level, not accumulating.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Layer 5 — Premium/Discount Zone

Awards 1 point when price is in the correct zone relative to the trend equilibrium level — discount for longs, premium for shorts. A Band 4 touch in the discount zone means you are entering at the outer structural boundary of the trend and</i> the lower half of the segment range — the optimal dual positioning that maximizes risk/reward.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Layer 6 — HVN Confluence

Awards 1 point when the current close or the Band 4 level is within ATR tolerance of any detected High Volume Node from the segment profile. This is the layer that bridges the trailing stop system and the volume profile — when a Band 4 retest coincides with an HVN, price is returning to the outer structural boundary precisely where the most institutional volume has traded. The convergence of structural (Band 4) and volumetric (HVN) confluence at the same price level is the highest-quality entry condition ANCHOR can detect.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🏷 Signal Firing Logic

An ANCHOR signal fires when all of the following are simultaneously true:
  • Price has touched Band 4 from the correct side — low within Band 4 tolerance for longs (bull trend), high within Band 4 tolerance for shorts (bear trend)
  • The close is back on the correct side of Band 4 — close above Band 4 for longs, close below for shorts (confirming the touch was a retest, not a breakdown)
  • Confluence score meets or exceeds the configured minimum (default: 4 of 6)
  • Session filter confirms active hours (when enabled)
  • Signal cooldown has elapsed since the last signal (default: 8 bars)
  • Show Entry Signals is enabled


Live confluence display:
A small label near the current Band 4 level on the last bar shows the live bull and bear scores in the format B 5/6 · S 2/6 — updating in real time so you can monitor the confluence state without looking at the dashboard.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🎯 Exit Guidance System

ANCHOR provides two live guidance levels plotted as dotted circles on the chart when a signal fires — not hard mechanical exits, but institutionally informed price targets for use in your own exit planning.

SL Guide:
The stop loss guide is anchored to a configurable band (default: Band 4 — the outer anchor). The SL band can be set to any of the four bands depending on your risk tolerance. Band 4 represents the structural invalidation level — the trend has flipped if price closes beyond it. Band 1 is the tightest option for aggressive stop placement.

TP Guide (three modes):
  • POC Target (default) — the take-profit guide points to the current segment POC. This is the most structurally meaningful target: in a bull trend, a Band 4 retest entry with a POC target means you are entering at the lowest point of the trend's volume structure and targeting the price where the most institutional activity occurred. The POC frequently acts as a magnet — price is drawn back to it after pullbacks
  • Opposite Band — the TP guide points to the trendHigh (bull) or trendLow (bear) of the current segment — the opposite extreme of the trend range. Maximum trend extension target
  • ATR Multiple — a fixed ATR distance from the entry close (default: 2.5×). Simple and consistent across all instruments and timeframes


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📊 Live Dashboard

The real-time dashboard displays the complete internal state across four sections, updated on every bar.

TREND
  • Anchor Trend — current ANCHOR system trend direction: ▲ BULLISH or ▼ BEARISH. This is the primary trend state — the direction all long entries must align with
  • Adaptive — current adaptive scale multiplier (e.g., 0.85x SQZ, 1.00x, or 1.15x) with squeeze state flag. Tells you whether bands are currently tighter or wider than the base setting
  • PD Zone — current premium/discount position relative to the trend equilibrium: ◧ DISCOUNT, ◧ PREMIUM, or — EQ


FILTERS
  • HTF Bias — higher timeframe EMA alignment: ▲ BULL, ▼ BEAR, or — FLAT
  • ADX — live ADX value with ✓ or ✗ pass/fail
  • Vol Delta — current volume delta direction: ▲ BULL, ▼ BEAR, or —
  • Session — ✓ ACTIVE or ✗ OFF


VOLUME
  • POC — current Point of Control price level. Updated in real time as the profile builds
  • VAH / VAL — Value Area High and Value Area Low levels for the current trend segment
  • HVN Count — number of High Volume Nodes currently detected in the segment profile


CONFLUENCE
  • Bull Score — live 0–6 score. Background highlights yellow-green when threshold is met
  • Bear Score — live 0–6 score. Background highlights red when threshold is met
  • Anchor Band — the current Band 4 price level in real time — the exact price where the next retest entry would occur


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📈 Chart Visual System

  • Band 4 (Anchor — thick solid line) — the outer trailing stop and primary structural level. Yellow-green in bull trend, red in bear trend. The most important line on the chart
  • Band 3 (semi-transparent) — mid-outer reference, 2× ATR inside Band 4
  • Band 2 (more transparent) — mid-inner reference, 1× ATR inside Band 4
  • Band 1 (most transparent) — inner reference, base ATR distance from price
  • Heatmap fills — gradient color fills between all four bands. Deepening opacity toward Band 4 creates a visual depth map of trailing stop risk
  • Trend Equilibrium Line (purple dots) — the dynamic midpoint of the current trend segment's high-low range
  • ▲ ANCHOR BULL / BEAR ▼ ANCHOR label — appears on every trend flip at the Band 4 flip price, marking each structural direction change
  • ▲ Triangle (below bar) — long entry signal at Band 4 retest with confluence confirmed
  • ▼ Triangle (above bar) — short entry signal at Band 4 retest with confluence confirmed
  • Live confluence label — B x/6 · S x/6 score label near the current Band 4 level on the last bar, updating in real time
  • Volume profile bars — delta-weighted horizontal bars rendered to the right of the current price, color-matched to trend direction, proportional to bin volume
  • POC line (purple solid) — the highest-volume level in the current trend segment
  • VAH line (yellow-green dashed) — Value Area High boundary
  • VAL line (red dashed) — Value Area Low boundary
  • HVN lines — horizontal lines at every local volume peak. The dominant HVN (highest volume) receives a bold line and price label
  • SL Guide (red dotted circles) — stop loss reference level at the configured anchor band
  • TP Guide (yellow-green dotted circles) — take-profit reference pointing to POC, opposite band extreme, or ATR target


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🚀 How to Trade with AlphaX ANCHOR — Step by Step

Step 1 — Establish Trend Context
  • Check the dashboard: what is the Anchor Trend? This is your trading direction — only take longs in ▲ BULLISH, only take shorts in ▼ BEARISH
  • Check HTF Bias — does the higher timeframe agree? A bull Anchor Trend with bull HTF Bias is the ideal setup condition
  • Check the Adaptive row — is the system in squeeze mode (0.85x SQZ)? If so, bands are tighter and a Band 4 touch is more likely. Expansion mode (1.15x) means wider bands and deeper pullbacks to reach Band 4
  • Note the POC and VAH/VAL levels on the dashboard and the chart. These are your key target and support/resistance levels within the current trend


Step 2 — Watch for Band 4 Approach
  • Monitor the heatmap — as price pulls back from the trend high, it moves progressively through the Band 1, 2, 3 fills. By the time price is deep in the Band 3 fill and approaching the solid Band 4 line, a retest touch is imminent
  • Check the live confluence label near Band 4. Is the bull score at or near the threshold? If so, a signal may fire on the next bar
  • Check the PD Zone row — is price in discount for a long entry? A Band 4 touch in discount zone is the optimal entry scenario


Step 3 — Enter on the ANCHOR Triangle
  • A ▲ triangle confirms the Band 4 touch with qualifying confluence. Enter on the close or next bar open
  • Note whether an HVN level is near the entry price — an HVN + Band 4 confluence entry is the highest-quality ANCHOR setup
  • The SL Guide dotted line shows your stop reference. The TP Guide shows the POC, opposite extreme, or ATR target depending on your mode setting


Step 4 — Manage with the Band Structure
  • As the trade moves in your favor, watch the bands ratchet upward (bull) with price — your trailing stop is automatically rising
  • The POC line is your primary profit target in POC Target mode. As price approaches the POC, consider scaling out
  • The VAH level (bull trend) acts as the next resistance after POC — if price clears VAH with momentum, the trade has potential to reach the trendHigh
  • If price pulls back into the Band 3 or Band 4 zone again without a trend flip, this is a secondary entry opportunity — the same confluence check applies


Step 5 — Trend Flip Exit
  • A close beyond Band 4 triggers a trend flip — the BEAR ▼ ANCHOR label appears, the bands invert, and the volume profile resets for the new trend segment
  • Exit the prior trend position on the flip bar or the following open
  • Wait for the new trend to establish and a Band 4 retest to develop in the new direction before re-entering


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Identifying Low-Quality Conditions — When Not to Trade

Stand aside when:
  • Trend flips are occurring rapidly — multiple ▲ / ▼ ANCHOR flip labels in quick succession indicate a choppy, oscillating market where the Band 4 trailing stop is being crossed repeatedly. The volume profile will be very short (few bars since last flip) and the POC will be meaningless. Wait for a trend to establish and sustain for at least 10–15 bars before looking for Band 4 retest entries
  • HTF Bias opposes the anchor trend — a bull ANCHOR trend with bear HTF Bias means the current timeframe is moving against the higher timeframe flow. Band 4 retest entries in this environment carry significantly reduced success rates
  • ADX ✗ on the dashboard — the market is not trending. ANCHOR is a trend-following system by design — Band 4 touches in ranging markets frequently result in immediate trend flips rather than continuations
  • HVN Count shows 0 — the volume profile has not yet built enough data to identify volume nodes. This typically occurs immediately after a fresh trend flip. Wait for the trend to develop more bar history before relying on HVN confluence
  • Adaptive shows 1.15x (expansion) and price is approaching Band 4 rapidly — high-volatility expansion phases can produce fast, aggressive moves to Band 4 and beyond. Reduce position size in expansion mode entries
  • Price is in premium for a bull entry or discount for a bear entry — the PD Zone filter will block these automatically when enabled, but if disabled, be aware that entries at the wrong side of equilibrium carry structurally poor risk/reward


The ideal ANCHOR setup condition:
  • Anchor Trend established for 15+ bars — sufficient history for meaningful volume profile
  • HTF Bias aligned with trend direction
  • ADX ✓ confirming a trending market
  • Adaptive at 1.0x or 0.85x (normal or squeeze — not expansion)
  • Price in discount (bull) or premium (bear)
  • Band 4 touch coincides with a visible HVN level
  • Confluence score at 5/6 or 6/6


When all these conditions align simultaneously, an ANCHOR entry is the closest to a textbook institutional continuation setup the system can produce.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Key Features
  • ⚓ Four-band liquidity-anchored trailing stop — Band 1 through Band 4, each ATR offset apart, ratcheting in trend direction with a one-directional lock preventing widening on pullbacks
  • 🌊 Adaptive band scaling — automatically tightens during squeeze phases and widens during high-volatility expansion. Scale multiplier displayed live on dashboard
  • 🔥 Trailing stop heatmap — gradient opacity fills between all four bands creating a real-time visual depth map of pullback risk from shallow to deep
  • 📊 Delta-weighted volume profile — anchored to the current trend segment from the last Band 4 flip, using directional volume weighting for institutional accuracy
  • 📍 POC detection — highest-volume level in the current trend segment plotted live and available as a TP target mode
  • 📐 Value Area High/Low — 70% volume concentration zone for the current trend segment, plotted as dynamic support/resistance levels
  • 🔮 HVN detection — algorithmic local volume peak identification across all profile bins. Lines extend from the trend origin through the profile
  • ⚖ Trend equilibrium — dynamic PD zone midpoint anchored to the current trend segment high and low, updating in real time as the segment expands
  • 📡 HTF bias filter — dual-EMA + price confirmation from a configurable higher timeframe, stricter condition than standard EMA crossover
  • 🧠 6-layer confluence gate — Anchor Trend, HTF Bias, ADX, Volume Delta, PD Zone, and HVN Confluence all scored independently on every bar
  • 📊 Live confluence label on chart — B x/6 · S x/6 displayed near Band 4 in real time without requiring dashboard attention
  • 🎯 Three TP target modes — POC Target (institutional magnet), Opposite Band (maximum trend extension), or ATR Multiple (fixed distance)
  • ⚙ Configurable SL anchor band — choose Band 1 through Band 4 for stop placement based on your risk preference and trading style
  • 🏷 Trend flip labels — ▲ ANCHOR BULL and BEAR ▼ ANCHOR labels mark every structural trend change on the chart
  • 📊 18-row live dashboard — Trend, Filters, Volume, and Confluence sections updated in real time
  • 🔔 6 alert conditions — bull/bear trend flips, long/short entries, and HVN + anchor confluence touches
  • 🎨 Fully cohesive dual-tone color system — yellow-green for all bullish elements, red for all bearish, orange for squeeze, purple for VWAP/equilibrium/POC
  • ⚙ Fully configurable — ATR length, base multiplier, adaptive scaling range, volume profile rows and width, value area percentage, HTF timeframe and EMA periods, ADX threshold, PD zone requirement, TP mode, SL band, and all colors are independently adjustable


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Settings Reference

Anchor Trail Engine
  • ATR Length — lookback for the ATR calculation used in all band offsets (default: 14)
  • Source — price source for trailing stop calculations (default: close)
  • Band Offset (Base) — ATR multiplier for Band 1, the innermost band. Bands 2–4 add +1, +2, +3 automatically (default: 6.5)
  • Adaptive Band Scaling — toggles the volatility-adaptive multiplier adjustment
  • Adaptive Min Scale — multiplier floor applied during squeeze conditions (default: 0.85)
  • Adaptive Max Scale — multiplier ceiling applied during high-volatility expansion (default: 1.15)


Volume Profile
  • Show Volume Profile — toggle the rendered profile bars to the right of price
  • Profile Rows — number of price bins in the volume profile (default: 30)
  • Profile Width (Bars) — maximum horizontal width of the profile in bars (default: 40)
  • Delta-Weighted Volume — when on, weights each bar's contribution by directional candle bias
  • Show HVN Levels — toggle horizontal High Volume Node lines
  • HVN Line Style — Dotted / Solid / Dashed
  • HVN Line Width — thickness of HVN lines (default: 1)
  • Show Value Area (POC/VAH/VAL) — toggle POC, VAH, and VAL line plots
  • Value Area % — percentage of total volume used to define the value area boundaries (default: 70%)
  • Show Trend Equilibrium — toggle the dynamic segment midpoint line


Confluence & Entries
  • HTF Trend Filter — toggle the higher timeframe EMA bias requirement
  • HTF Timeframe — the higher timeframe for EMA calculations (default: 60-minute)
  • HTF Fast / Slow EMA — EMA periods on the higher timeframe (defaults: 21 / 55)
  • ADX Trend Filter — toggle the ADX minimum requirement
  • ADX Length — ADX calculation lookback (default: 14)
  • ADX Minimum — threshold below which signals are suppressed (default: 18)
  • Volume Delta Filter — toggle the volume delta directional requirement
  • Volume MA Length — EMA smoothing length for volume delta calculation (default: 14)
  • Require PD Zone — when on, longs require discount positioning, shorts require premium
  • Session Filter — toggle active hours restriction (default: off — ANCHOR is designed for all-session use on most instruments)
  • Active Session — configurable session window
  • Min Layers (of 6) — minimum confluence score to fire a signal (default: 4)
  • Signal Cooldown — minimum bars between consecutive signals (default: 8)
  • Show Entry Signals — toggle signal triangles on or off
  • Show Confluence Label — toggle the live B/S score label near Band 4


Exit Guidance
  • Show SL / TP Guides — toggle the guide level dotted circle plots
  • SL Anchor Band — which of the four bands to use as the stop loss reference (default: Band 4)
  • TP Target Mode — POC Target / Opposite Band / ATR Multiple
  • TP ATR Mult — ATR distance for the ATR Multiple TP mode (default: 2.5)


Display
  • Trailing Stop Heatmap — toggle the gradient opacity fills between bands
  • Trend Flip Labels — toggle the ▲ ANCHOR BULL / BEAR ▼ ANCHOR labels
  • Show Dashboard — toggle the full dashboard panel
  • Dashboard Position — Top Left / Top Right / Bottom Left / Bottom Right


Colors
  • Bull / Bull Bright — yellow-green family for all bullish bands, fills, and labels
  • Bear / Bear Bright — red family for all bearish elements
  • Squeeze — orange for squeeze state indicators
  • Equilibrium — purple for the trend equilibrium line
  • POC Line — purple for the Point of Control
  • VAH / VAL Lines — yellow-green and red for value area boundaries
  • SL Guide / TP Guide — stop and target guide line colors
  • Bull / Bear Label Text — text color for confluence and flip labels
  • Dash Text / Dash BG / Dash Header / Dash Section / Dash Frame — full dashboard color control


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🔔 Alert Conditions (6 total)

Trend Alerts
  • Anchor Bull Flip — trend has anchored bullish. Band 4 closed above, all bands reset upward. Watch outer band for pullback entry development
  • Anchor Bear Flip — trend has anchored bearish. Band 4 closed below, all bands reset downward


Entry Alerts
  • Anchor Long Entry — Band 4 touched from above with confluence confirmed. Long signal fired
  • Anchor Short Entry — Band 4 touched from below with confluence confirmed. Short signal fired


HVN Confluence Alerts
  • HVN + Anchor Long Touch — price is touching the anchor band at or near a High Volume Node support zone. Pre-signal awareness alert
  • HVN + Anchor Short Touch — price is touching the anchor band at or near a High Volume Node resistance zone


All alert messages are formatted as const strings for clean webhook and notification platform integration.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🎯 Recommended Settings by Instrument & Timeframe

The default configuration is optimized for XAUUSD, major forex pairs, crypto, and indices on M5–H1. ANCHOR is uniquely versatile — the volume profile adapts to any trend length and the adaptive scaling handles any volatility regime:
  • Band Offset at 6.5× — wide enough to avoid noise exits on intraday timeframes while keeping the trail structurally relevant
  • HTF at 60-minute — provides meaningful context for M5–M15 intraday trading
  • Delta-Weighted Volume on — directional weighting produces the most institutionally relevant profile on all liquid instruments
  • Value Area at 70% — the standard institutional value area definition used by professional volume profile traders
  • Session filter off by default — ANCHOR is designed for continuous multi-session trading on most instruments


For other instruments or timeframes, adjust:
  • M1–M3 scalping — reduce Band Offset to 4.5–5.5, reduce ATR Length to 10, increase Profile Rows to 20 for faster profile builds
  • H4 / Daily swing trading — increase Band Offset to 8.0–10.0, set HTF to Weekly, reduce Profile Rows to 15–20 for cleaner node identification, increase TP ATR Mult to 4.0–5.0
  • Crypto (BTC, ETH) — increase Adaptive Max Scale to 1.25 to accommodate wider expansion swings, increase Band Offset to 7.5–8.5
  • Low-volatility forex pairs — reduce Band Offset to 5.5–6.0, reduce Adaptive Min Scale to 0.80 for tighter squeeze-phase bands
  • Tighter signal quality — raise Min Layers to 5/6, enable PD Zone requirement, raise ADX minimum to 22
  • More frequent signals — lower Min Layers to 3, disable HTF filter, disable PD Zone requirement


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

👥 Who This Is For
  • 📈 Trend followers and swing traders — the four-band trailing stop with heatmap visualization is built specifically for riding extended directional moves with structural confidence, not second-guessing every pullback
  • 📊 Volume profile traders — the delta-weighted, trend-anchored profile provides the most contextually relevant volume analysis available for any given trend segment
  • 🥇 Gold (XAUUSD) and forex traders — default settings are tuned for these instruments. The adaptive band scaling handles XAUUSD's distinctive alternation between low-volatility coiling and high-velocity expansion
  • 🎯 Pullback entry traders — ANCHOR is specifically designed to fire at the outer structural boundary of the trend (Band 4) rather than on breakouts or initial moves. Every entry is a pullback-to-structure trade at the institutional trailing stop level
  • 📡 Multi-timeframe traders — the HTF bias filter and trend equilibrium system create a natural multi-timeframe framework within a single indicator
  • 🧠 Traders who want volume context with every entry — the live POC, VAH/VAL, and HVN levels provide immediate institutional volume context for every trade without requiring a separate volume profile tool
  • 🔥 Visual traders — the heatmap, gradient fills, trend flip labels, and volume profile create one of the richest single-indicator chart environments in the AlphaX suite. Everything needed for a complete trend trade is visible on the chart simultaneously


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📝 Notes
  • All signals are confirmed on bar close — the indicator is non-repainting by design. Band positions and trend state finalize on confirmed bars only
  • The volume profile is recomputed on every bar using the full trend segment history. On very long trend segments (hundreds of bars), this computation is resource-intensive. The max_bars_back is set to 5000 to accommodate extended trend segments. If you notice performance degradation on very low timeframes with long chart history, reduce Profile Rows or reduce the chart's visible bar count
  • The volume profile is rendered only on the last bar and redrawn on every real-time update. Historical bars show the band structure but not the profile rendering — the profile always reflects the current trend segment state
  • When a trend flip occurs, the volume profile resets completely. The first few bars after a flip will show a very short profile with minimal data — meaningful HVN confluence typically requires 15–20+ bars of trend history to develop
  • The adaptive scale is based on ATR percentrank over 100 bars. On instruments or timeframes with less than 100 bars of history, the percentrank may not be fully calibrated. This is a warm-up effect and resolves naturally as history accumulates
  • The session filter is off by default because ANCHOR is designed as a multi-session trend system. Unlike scalping systems that are most effective during active hours, ANCHOR band retests can occur at any time during a developing trend. Enable the session filter only if you specifically want to restrict entries to active trading hours on your instrument
  • The Trade Status section tracks position direction from signal to exit within the chart session — it does not connect to your broker or brokerage 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 the most powerful entries are not at the breakout — they are at the moment price returns to the structural anchor where institutions are waiting.

Penafian

Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.