SuperTrend STRATEGY

Sep 10, 2020

Static chart image
Signals
Moving Averages
Volatility

The SuperTrend STRATEGY tool automates trend-following entries and exits by utilizing an Average True Range (ATR) based trailing stop to identify market direction and volatility shifts.

Usage

The Usage section describes how the script can be used, examples should be provided in this section. This section also focuses on how main settings affect the indicator interpretation and output.

The SuperTrend STRATEGY is designed to capture sustained price movements by flipping its bias based on price action relative to a calculated volatility band. When the price closes above the upper band, a long entry (Buy) is triggered, and the indicator plots below the price to act as a trailing stop. Conversely, when the price closes below the lower band, a short entry (Sell) is triggered, and the indicator plots above the price.

This tool is applicable across various asset classes including equities, futures, forex, and cryptocurrency. It is most effective in trending markets; however, users should be aware that performance may degrade during sideways or range-bound consolidation where frequent "whipsaws" can occur.

Details

The script calculates the SuperTrend line using the Average True Range (ATR) multiplied by a user-defined factor. This value is then added to or subtracted from the selected source price (defaulting to hl2).

A unique feature of this implementation is the ability to toggle between two ATR calculation methods:

  • RMA (Running Moving Average): The standard method used in the built-in ATR indicator, providing a smoothed volatility response.
  • SMA (Simple Moving Average): An alternative method that can offer a different sensitivity to price spikes.

The strategy includes a built-in backtesting window, allowing users to define specific "From" and "To" dates (Year, Month, Day) to analyze performance over a particular historical period.

Settings

  • ATR Period: Sets the lookback period used for the Average True Range calculation.
  • Source: Determines the price input used for the calculation (e.g., Close, HL2, OHLC4).
  • ATR Multiplier: Adjusts the distance between the price and the SuperTrend line. Higher values reduce sensitivity and noise.
  • Change ATR Calculation Method?: Toggles between the RMA (checked) and SMA (unchecked) methods for calculating volatility.
  • Show Buy/Sell Signals?: Enables or disables the visibility of "Buy" and "Sell" labels on the chart.
  • Highlighter On/Off?: Toggles the background shading between the price and the SuperTrend line.
  • Bar Coloring On/Off?: Changes the color of the price bars to match the current trend direction.
  • Backtesting Window (From/To): A group of settings (Year, Month, Day) that defines the start and end points for the strategy's trade execution.

FAQ

How do I adjust the sensitivity of the signals? You can increase the ATR Multiplier to reduce the number of signals and avoid noise, or decrease the ATR Period to make the indicator react faster to recent volatility.

Can I use this for automated trading? Yes, as this is a strategy script, it generates entry and exit commands that can be linked to automated execution platforms or used in the Strategy Tester for performance analysis.

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

Free access on the following platforms
tradingviewSymbolTradingView
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

ninjatraderNinjaTrader
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

metatrader4MetaTrader 4/5
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

thinkorswimThinkorswim
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.

Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.

As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.

Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.

Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.

This does not represent our full Disclaimer. Please read our full disclaimer.

© 2026 LuxAlgo Global, LLC.