All indicators

Supertrend with Percent Difference from Close

Jul 14, 2021

Static chart image
Support and ResistanceSignalsTrailing-StopVolatility

The Supertrend with Percent Difference from Close indicator enhances the classic Supertrend tool by providing a real-time visual percentage calculation between the current closing price and the indicator line to assist in risk management and trend exhaustion analysis.

Usage

The Supertrend with Percent Difference from Close indicator is primarily used to identify trend direction and potential support/resistance levels. When the price is above the Supertrend line (plotted in green), the market is considered to be in an uptrend. When the price is below the line (plotted in red), it is in a downtrend.

Risk Management

A primary use case for this script is managing stop-loss levels. By viewing the real-time percentage difference label, traders can instantly determine if the distance to the Supertrend (acting as a trailing stop) fits within their maximum risk tolerance (e.g., ensuring a stop loss does not exceed 8% of the entry price).

Identifying Overextensions

Traders can use the percentage difference to identify when a move has become overextended. If the percentage gap between the price and the Supertrend becomes unusually high compared to historical norms, it may signal that a price or time correction is imminent, allowing traders to "sell into strength" rather than waiting for the trend to flip.

Details

The indicator utilizes the standard Supertrend calculation, which relies on the Average True Range (ATR) and a multiplier (Factor) to define trend boundaries.

The unique addition to this script is the percDiff calculation: (close - supertrendValue) * 100 / close. This formula determines how far away the current market price is from the trend line relative to the current price. The resulting value is displayed via a dynamic label on the most recent bar, positioned at the Supertrend level for easy reference.

Settings

Inputs

  • ATR Length: The lookback period used for the Average True Range calculation, which determines the volatility component of the indicator.
  • Factor: The multiplier applied to the ATR. A higher factor makes the indicator less sensitive to price fluctuations, while a lower factor makes it more sensitive.

FAQ

How do I use the percentage label for stop losses?

The label shows exactly how much the price would need to drop (in an uptrend) or rise (in a downtrend) to hit the Supertrend level. If your strategy allows for a maximum 5% risk, and the label shows 7%, the current risk/reward ratio may be unfavorable for a new entry.

What do the alerts signify?

The script includes built-in alerts that trigger when the Supertrend direction changes. This occurs when the price crosses and closes beyond the Supertrend line, signaling a potential trend reversal.

How can I access Supertrend with Percent Difference from Close?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.