SuperTrend Recovery [LuxAlgo]
The SuperTrend Recovery indicator provides a modified version of the classic SuperTrend algorithm that incorporates a dynamic "recovery" mechanism designed to adjust the trailing stop when price action moves significantly against the current trend
The SuperTrend Recovery indicator provides a modified version of the classic SuperTrend algorithm that incorporates a dynamic “recovery” mechanism designed to adjust the trailing stop when price action moves significantly against the current trend. This script aims to help traders manage volatile environments by tightening the trend band when the market experiences deep pullbacks without triggering a full trend reversal.
🔶 USAGE
The indicator can be used similarly to a standard SuperTrend to identify market direction and potential trailing stop-loss levels. However, the unique recovery logic allows for a more adaptive response to price deviations.
🔹 Trend Detection
- When the price is above the band, the indicator signals a BULL trend.
- When the price is below the band, the indicator signals a BEAR trend.
- Trend switches are marked with “BULL” or “BEAR” labels and a colored circle at the switch point.
🔹 Recovery Mechanism
In a standard SuperTrend, the band stays flat if price moves against the trend (but doesn’t break it). In the SuperTrend Recovery version, if the price drops significantly below the “Switch Price” (for a bull trend) or rises above it (for a bear trend), the band begins to move toward the price based on the Recovery Alpha. This allows the trailing stop to “catch up” during high-volatility pullbacks, potentially securing a faster exit if the recovery fails.
🔶 DETAILS
The core of this indicator lies in its two-stage calculation: the Base SuperTrend and the Recovery Logic.
🔹 Base Logic
The indicator calculates a base upper and lower band using the Average True Range (ATR) multiplied by a user-defined factor. Under normal conditions, the band follows the classic rules: it can only move up during a bull trend and only down during a bear trend.
🔹 Recovery Logic
When price enters a “loss” state relative to the price where the trend initially started (the Switch Price), the script checks if the deviation exceeds the Recovery Threshold.
If the threshold is met, the band is calculated as an exponential moving average (EMA) of the current price and the previous band value, weighted by the Recovery Alpha:
This creates a “tapering” effect where the band aggressively tightens toward the price during deep retracements, helping to mitigate drawdown by providing an earlier exit signal compared to the standard static band.
🔶 SETTINGS
🔹 Supertrend Settings
- ATR Length: The lookback period used to calculate market volatility.
- Base Multiplier: The factor applied to the ATR to determine the distance of the band from the price.
🔹 Recovery Logic
- Recovery Alpha (%): Determines how quickly the band adjusts toward the price when the recovery logic is active. Higher values make the band more reactive.
- Recovery Threshold (xATR): The distance (in ATR units) the price must deviate from the switch price before the recovery mechanism activates.
🔹 Visualization
- Show Gradient Fills: Toggles the background gradient between the price (source) and the SuperTrend band.
- Show Signal Labels: Toggles the “BULL” and “BEAR” labels at trend reversal points.
Related Products
100% This Pine Scriptâ„¢ code is subject
The Apex Trend & Liquidity Master is a hybrid trading system designed to align traders with the dominant market trend while identifying key structural price levels. Unlike simple moving average crossovers or standalone support/resistance tools, this script integrates a volatility-adaptive "Trend Cloud" with a "Smart Liquidity" engine.
80+ Pro TradingView Indicators Bundle – Trade Smarter with One Powerful System
An exclusive TradingView indicators package featuring 80+ professional tools designed for precise market analysis and smarter trading decisions. This all-in-one bundle covers trend detection, entry and exit signals, risk management, and advanced market confirmation—ideal for traders who want powerful insights in one premium package.
AI Signals Remastered
Signal Generation: Uses EMA clusters and a modified Supertrend (Keltner-based) to identify trends
Alpha Hunter System (MTF + Risk Manager) – Full Explanation
Alpha Hunter System is a comprehensive TradingView indicator designed to combine trend detection, multi-filter confirmation, and advanced risk management into a single trading system. It is suitable for Forex, Crypto, Indices, and Stocks, and works across multiple timeframes.
Arbitrage Detector [LuxAlgo] Download Free
The Arbitrage Detector unveils hidden spreads in the crypto and forex markets. It compares the same asset on the main crypto exchanges and forex brokers and displays both prices and volumes on a dashboard, as well as the maximum spread detected on a histogram divided by four user-selected percentiles.
Arbitrage Matrix [LuxAlgo]
The Arbitrage Matrix is a follow-up to our Arbitrage Detector that compares the spreads in price and volume between all the major crypto exchanges and forex brokers for any given asset.
