Adaptive SuperTrend PRO [EXCAVO]

Adaptive SuperTrend PRO [EXCAVO]
Volatility-Adaptive Trend Band with HTF Bias, Guard Mode, and Re-entry Zones
The Adaptive SuperTrend PRO is a trend-following overlay that continuously adjusts
its band multiplier based on the current ATR's percentile rank, keeping the effective
band distance proportional across different volatility regimes. Built on a SuperTrend
core, it adds four layers not found in standard versions: a higher timeframe bias
display, a guard mode for pullback protection, re-entry zone detection, and a momentum
gate.
Standard SuperTrend implementations use a fixed ATR multiplier that must be manually
tuned for each instrument and timeframe. Adaptive variants exist, but most adjust the
multiplier using a single metric in isolation. This implementation combines
percentile-rank multiplier scaling with a separate guard mode recovery mechanism - two
systems that operate on different conditions and reinforce each other rather than
overlapping.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ HOW TO USE
Step 1 → Add the indicator. A colored band appears on the chart immediately.
Blue = bullish trend, red = bearish. Gradient fill between price and band.
Step 2 → Follow trend direction changes. A triangle marker (blue up / red down)
appears on the bar when the trend switches. The band color changes with it.
Step 3 → Check the HTF Bias row in the dashboard. When the local trend disagrees
with the higher timeframe, the band turns semi-transparent and the
dashboard shows an orange "BULL ≠" or "BEAR ≠" warning. Treat these
sections are marked as conflicting.
Step 4 → Watch for re-entry zones. When Guard Mode activates (price pulls back
against the trend), an orange background highlights the chart. When
price approaches the band again within that pullback, orange triangle
markers signal a potential re-entry. Dashboard shows "Guard: Active ◆ Re-entry".
Step 5 → Use the HTF band reference line. The stepped line shows where the
higher timeframe band is positioned - useful for identifying major
support/resistance that the local trend is trading around.
Step 6 → Set alerts for unattended monitoring. Use "Bullish + HTF Aligned" or
"Bearish + HTF Aligned" for HTF-confirmed detections. Use "Re-entry Zone"
for pullback monitoring.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ HOW IT CALCULATES
◆ Volatility-Scaled Multiplier
The indicator computes ATR over a configurable period, then ranks it against
its own history using percentile ranking over a lookback window:
rank = percentrank(ATR, lookback) / 100
effective_mult = max(0.5, base_mult - strength × (rank - 0.5) × 2.0)
When current ATR is in the 90th percentile, the multiplier contracts. When
ATR is in the 10th percentile, the multiplier expands. The band is then
calculated as HL2 ± effective_mult × ATR.
◆ Guard Mode with Exponential Recovery
Guard mode activates when price moves against the current trend by more than
a configurable ATR threshold. The loss from the flip price is measured:
loss = flip_price - close (uptrend) or close - flip_price (downtrend)
When loss exceeds threshold × ATR, the band calculation switches to:
recovery_band = alpha × close + (1 - alpha) × previous_band
With accelerated recovery, alpha scales with pullback depth:
effective_alpha = min(alpha × (1 + excess / ATR), 1.0)
◆ HTF Bias Display
The higher timeframe trend is fetched via request.security() and displayed
as a visual modifier. When local and HTF trends disagree, the band becomes
semi-transparent and the dashboard shows a conflict warning. HTF does not
gate or filter local detections.
◆ Re-entry Zone Detection
During guard mode, when price approaches the band within a configurable
distance (default 0.5 × ATR), the indicator highlights the zone. This
identifies moments where price returns toward the trend band during an
active pullback.
◆ Momentum Gate
An optional RSI filter controls when the trend state is allowed to flip.
Bullish flip requires RSI > 50. Bearish flip requires RSI < 50.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ WHAT MAKES IT DIFFERENT
◆ Adaptive Multiplier
The band distance is not fixed. The multiplier is scaled inversely to the current ATR's
percentile rank over a configurable lookback period. When volatility is high (ATR near
its lookback peak), the multiplier contracts - since ATR itself is already elevated,
preventing the band from widening excessively and causing late signals. When volatility
is low (ATR near its lookback floor), the multiplier expands to compensate for the small
ATR and prevent the band from becoming too tight. The result is a normalized effective
band distance across different market regimes. Adaptation Strength controls the
intensity of this scaling (0 = fixed multiplier, 1 = maximum response).
◆ HTF Bias as Visual Modifier
The higher timeframe trend acts as a visual layer, not a logic gate. Local trend flips
happen freely based on local price action. When the local trend disagrees with the
selected HTF, the band and fill become semi-transparent and the dashboard highlights
the conflict in orange. This design avoids the common problem where a weekly-aligned
HTF filter permanently blocks a 4-hour chart from responding to a clear downtrend.
◆ Guard Mode with Accelerated Recovery
When price pulls back past a threshold distance (default 1.0 ATR) from the flip price,
the band switches to recovery mode. In recovery mode, the band tracks price using an
exponential alpha rather than the standard ATR-based formula. With Accelerated Recovery
enabled, the alpha increases proportionally to how deep the pullback goes - deeper
pullbacks mean faster band tracking, limiting exposure on trend-continuation failures.
◆ Re-entry Zone Detection
During Guard Mode, the indicator monitors when price approaches the band within a
configurable distance (default 0.5 ATR). When this condition is met, orange background
highlights and triangle markers appear, identifying potential continuation entries
within an active pullback. These are not new trend detections — they indicate price returning
toward the band during an existing trend.
◆ Momentum Gate
An optional RSI filter can require momentum confirmation before registering a trend flip.
A bullish flip requires RSI below 50 on the flip bar (momentum shift, not overbought
continuation). A bearish flip requires RSI above 50. This reduces whipsaw signals in
choppy, sideways conditions. Disabled by default.
◆ Non-Repainting by Default
All signals fire on confirmed bars only (bar close). The Allow Repainting setting can
be enabled for real-time alerts and live HTF updates, with the trade-off that signals
may shift before bar close. When disabled, HTF trend updates on the indicator reflect
the last confirmed HTF bar close.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ DASHBOARD
Real-time panel (top right by default) with all key metrics:
Legend table (bottom left) explains every visual element on the chart. Toggle separately
in Dashboard settings.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ SETTINGS
SuperTrend
Volatility Scaling
Guard Mode
Multi-Timeframe
Momentum Gate
Visualization
Dashboard
Alert Settings
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ ALERTS
JSON mode adds structured payloads to trend change, guard, and re-entry alerts:
action, direction, htf, ticker, price, atr_rank, timeframe, indicator fields.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This indicator is published as invite-only. The protected source contains
the percentile-rank multiplier scaling engine, the guard mode recovery
state machine with accelerated alpha, the re-entry zone detection logic,
and the HTF bias visual modifier. These components represent original
methodology. The description above provides full transparency on what
the indicator calculates and how.
Best regards,
EXCAVO
Volatility-Adaptive Trend Band with HTF Bias, Guard Mode, and Re-entry Zones
The Adaptive SuperTrend PRO is a trend-following overlay that continuously adjusts
its band multiplier based on the current ATR's percentile rank, keeping the effective
band distance proportional across different volatility regimes. Built on a SuperTrend
core, it adds four layers not found in standard versions: a higher timeframe bias
display, a guard mode for pullback protection, re-entry zone detection, and a momentum
gate.
Standard SuperTrend implementations use a fixed ATR multiplier that must be manually
tuned for each instrument and timeframe. Adaptive variants exist, but most adjust the
multiplier using a single metric in isolation. This implementation combines
percentile-rank multiplier scaling with a separate guard mode recovery mechanism - two
systems that operate on different conditions and reinforce each other rather than
overlapping.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ HOW TO USE
Step 1 → Add the indicator. A colored band appears on the chart immediately.
Blue = bullish trend, red = bearish. Gradient fill between price and band.
Step 2 → Follow trend direction changes. A triangle marker (blue up / red down)
appears on the bar when the trend switches. The band color changes with it.
Step 3 → Check the HTF Bias row in the dashboard. When the local trend disagrees
with the higher timeframe, the band turns semi-transparent and the
dashboard shows an orange "BULL ≠" or "BEAR ≠" warning. Treat these
sections are marked as conflicting.
Step 4 → Watch for re-entry zones. When Guard Mode activates (price pulls back
against the trend), an orange background highlights the chart. When
price approaches the band again within that pullback, orange triangle
markers signal a potential re-entry. Dashboard shows "Guard: Active ◆ Re-entry".
Step 5 → Use the HTF band reference line. The stepped line shows where the
higher timeframe band is positioned - useful for identifying major
support/resistance that the local trend is trading around.
Step 6 → Set alerts for unattended monitoring. Use "Bullish + HTF Aligned" or
"Bearish + HTF Aligned" for HTF-confirmed detections. Use "Re-entry Zone"
for pullback monitoring.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ HOW IT CALCULATES
◆ Volatility-Scaled Multiplier
The indicator computes ATR over a configurable period, then ranks it against
its own history using percentile ranking over a lookback window:
rank = percentrank(ATR, lookback) / 100
effective_mult = max(0.5, base_mult - strength × (rank - 0.5) × 2.0)
When current ATR is in the 90th percentile, the multiplier contracts. When
ATR is in the 10th percentile, the multiplier expands. The band is then
calculated as HL2 ± effective_mult × ATR.
◆ Guard Mode with Exponential Recovery
Guard mode activates when price moves against the current trend by more than
a configurable ATR threshold. The loss from the flip price is measured:
loss = flip_price - close (uptrend) or close - flip_price (downtrend)
When loss exceeds threshold × ATR, the band calculation switches to:
recovery_band = alpha × close + (1 - alpha) × previous_band
With accelerated recovery, alpha scales with pullback depth:
effective_alpha = min(alpha × (1 + excess / ATR), 1.0)
◆ HTF Bias Display
The higher timeframe trend is fetched via request.security() and displayed
as a visual modifier. When local and HTF trends disagree, the band becomes
semi-transparent and the dashboard shows a conflict warning. HTF does not
gate or filter local detections.
◆ Re-entry Zone Detection
During guard mode, when price approaches the band within a configurable
distance (default 0.5 × ATR), the indicator highlights the zone. This
identifies moments where price returns toward the trend band during an
active pullback.
◆ Momentum Gate
An optional RSI filter controls when the trend state is allowed to flip.
Bullish flip requires RSI > 50. Bearish flip requires RSI < 50.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ WHAT MAKES IT DIFFERENT
◆ Adaptive Multiplier
The band distance is not fixed. The multiplier is scaled inversely to the current ATR's
percentile rank over a configurable lookback period. When volatility is high (ATR near
its lookback peak), the multiplier contracts - since ATR itself is already elevated,
preventing the band from widening excessively and causing late signals. When volatility
is low (ATR near its lookback floor), the multiplier expands to compensate for the small
ATR and prevent the band from becoming too tight. The result is a normalized effective
band distance across different market regimes. Adaptation Strength controls the
intensity of this scaling (0 = fixed multiplier, 1 = maximum response).
◆ HTF Bias as Visual Modifier
The higher timeframe trend acts as a visual layer, not a logic gate. Local trend flips
happen freely based on local price action. When the local trend disagrees with the
selected HTF, the band and fill become semi-transparent and the dashboard highlights
the conflict in orange. This design avoids the common problem where a weekly-aligned
HTF filter permanently blocks a 4-hour chart from responding to a clear downtrend.
◆ Guard Mode with Accelerated Recovery
When price pulls back past a threshold distance (default 1.0 ATR) from the flip price,
the band switches to recovery mode. In recovery mode, the band tracks price using an
exponential alpha rather than the standard ATR-based formula. With Accelerated Recovery
enabled, the alpha increases proportionally to how deep the pullback goes - deeper
pullbacks mean faster band tracking, limiting exposure on trend-continuation failures.
◆ Re-entry Zone Detection
During Guard Mode, the indicator monitors when price approaches the band within a
configurable distance (default 0.5 ATR). When this condition is met, orange background
highlights and triangle markers appear, identifying potential continuation entries
within an active pullback. These are not new trend detections — they indicate price returning
toward the band during an existing trend.
◆ Momentum Gate
An optional RSI filter can require momentum confirmation before registering a trend flip.
A bullish flip requires RSI below 50 on the flip bar (momentum shift, not overbought
continuation). A bearish flip requires RSI above 50. This reduces whipsaw signals in
choppy, sideways conditions. Disabled by default.
◆ Non-Repainting by Default
All signals fire on confirmed bars only (bar close). The Allow Repainting setting can
be enabled for real-time alerts and live HTF updates, with the trade-off that signals
may shift before bar close. When disabled, HTF trend updates on the indicator reflect
the last confirmed HTF bar close.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ DASHBOARD
Real-time panel (top right by default) with all key metrics:
- Trend - current trend direction (BULL / BEAR) with bar count since last flip
- HTF Bias - higher timeframe trend direction; orange with "≠" when local trend disagrees
- Band - current smoothed band price level (format.mintick precision)
- Guard - Off / Active / Active ◆ Re-entry depending on pullback state
- ATR Rank - current ATR percentile (0-100%); orange above 70% indicates high volatility
- Multiplier - current adaptive multiplier value in ATR units
Legend table (bottom left) explains every visual element on the chart. Toggle separately
in Dashboard settings.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ SETTINGS
SuperTrend
- ATR Length - 10 (bars for ATR calculation; shorter = more reactive)
- Base Multiplier - 2.5 (band distance in ATR units before adaptive scaling)
Volatility Scaling
- Enable Adaptive Multiplier - ON (adjust multiplier based on current vs historical volatility)
- Volatility Lookback - 50 bars (ATR percentile rank window)
- Adaptation Strength - 0.4 (0 = no adaptation, 1 = maximum response to volatility)
Guard Mode
- Recovery Alpha (%) - 8.0 (band tracking speed when guard activates; higher = faster)
- Recovery Threshold (xATR) - 1.0 (pullback depth to trigger guard, in ATR units)
- Accelerated Recovery - ON (deeper pullbacks increase band tracking speed)
- Show Re-entry Zones - ON (highlight bars where price approaches band during guard)
- Re-entry Distance (xATR) - 0.5 (proximity to band required for re-entry highlight)
Multi-Timeframe
- Enable HTF Filter - ON (display HTF trend bias and visual alignment state)
- HTF Timeframe - W (higher timeframe for bias display)
- Show HTF Band - ON (draw HTF band level as a stepped reference line)
Momentum Gate
- Enable Momentum Filter - OFF (require RSI confirmation before trend flips)
- RSI Length - 14 (period for RSI momentum gate)
Visualization
- Bullish Color - blue (band and fill color during uptrend)
- Bearish Color - red (band and fill color during downtrend)
- Signal Color - orange (guard mode and re-entry zone color)
- Show Gradient Fill - ON (shaded fill between price and band)
- Show Zone Labels - ON (BULL / BEAR text at center of each trend zone)
- Band Smoothness - 3 (EMA smoothing applied to band visual only, not logic)
- Color Candles - OFF (color candle bodies with trend color)
Dashboard
- Show Dashboard - ON
- Dashboard Position - Top Right (Top Right / Top Left / Bottom Right / Bottom Left)
- Show Legend - ON
Alert Settings
- Allow Repainting - OFF (confirmed bars only; ON enables real-time HTF updates)
- JSON Alerts - OFF (structured JSON payloads for webhook/bot integration)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ ALERTS
- Bullish Trend - trend flips to bullish (confirmed bar)
- Bearish Trend - trend flips to bearish (confirmed bar)
- Any Trend Change - either direction flip
- Guard Activated - price pulls back beyond threshold, guard mode begins
- Re-entry Zone - price approaches band during active guard mode
- Bullish + HTF Aligned - bullish flip where local trend matches HTF direction
- Bearish + HTF Aligned - bearish flip where local trend matches HTF direction
JSON mode adds structured payloads to trend change, guard, and re-entry alerts:
action, direction, htf, ticker, price, atr_rank, timeframe, indicator fields.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This indicator is published as invite-only. The protected source contains
the percentile-rank multiplier scaling engine, the guard mode recovery
state machine with accelerated alpha, the re-entry zone detection logic,
and the HTF bias visual modifier. These components represent original
methodology. The description above provides full transparency on what
the indicator calculates and how.
Best regards,
EXCAVO
Disclaimer
Trading involves significant risk. This indicator is a technical analysis tool
and does not constitute financial advice, investment recommendations, or a
guarantee of future results. Past indicator behavior does not guarantee future
performance. Always use proper risk management and your own judgment.
Tersedia di Paid Space
Indikator ini hanya tersedia untuk pelanggan EXCAVO PRO: Indicators + My Positions . Bergabunglah untuk mengakses skrip ini dan skrip lainnya dari EXCAVO.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Tersedia di Paid Space
Indikator ini hanya tersedia untuk pelanggan EXCAVO PRO: Indicators + My Positions . Bergabunglah untuk mengakses skrip ini dan skrip lainnya dari EXCAVO.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.