Linear Trailing Stop

Jul 30, 2019

Static chart image
Support and Resistance
Signals
Trailing-Stop
Volatility

The Linear Trailing Stop tool provides a dynamic trend-following boundary based on linear regression principles to help traders identify potential exit points and trend reversals. It utilizes a calculated linear median to project support and resistance levels that shift as price action evolves, offering a reactive stop-loss mechanism.

Usage

The Usage section describes how the script can be used to manage trades and identify market direction. The indicator plots a single line that flips between being a support (green) and a resistance (red) level.

  • Trend Identification: When the price is above the green line, the market is considered in an uptrend, and the line acts as a trailing stop for long positions. When the price is below the red line, the market is in a downtrend, and the line acts as a trailing stop for short positions.
  • Trend Reversals: A trend change is signaled when the price closes on the opposite side of the trailing stop. A cross above the red line signals a shift to a bullish state, while a cross below the green line signals a shift to a bearish state.
  • Volatility Filtering: By adjusting the Multiplier and Length, users can filter out market noise. A higher multiplier will place the stop further from the price, reducing the frequency of stop-outs during volatile periods.

Details

The Linear Trailing Stop is derived from the concept of Linear Channels. It calculates a base linear value that tracks the source price using a step-based approach. The step size is determined by the instrument's tick size or point value, scaled by the chosen length.

The tool calculates two potential values: an upper bound and a lower bound. These bounds are generated by taking the linear median and adding or subtracting the absolute rate of change of that median, multiplied by the user-defined Multiplier. Unlike standard moving averages, this method attempts to project a linear trajectory based on the momentum of price movement. The script includes an extrapolation feature that uses the most recent data points to extend the current stop level forward visually, assisting in real-time decision-making.

Settings

  • Source: Defines the input price data used for the calculations, typically set to "Close."
  • Length: Determines the lookback period used to calculate the step size and linear smoothing.
  • Multiplier: Controls the distance between the linear median and the trailing stop bands. Increasing this makes the stop wider.
  • Use Point Value: When enabled, the calculation uses the symbol's point value to determine the step size. When disabled, it uses the minimum tick value.
  • Extrapolate Line: A visual toggle that extends the current trailing stop line into the future bars to better visualize the current trend level.

FAQ

What does the color change in the line signify? The color change signifies a trend reversal. A green line indicates a bullish trend where the stop is below the price, while a red line indicates a bearish trend where the stop is above the price.

How can I make the indicator less sensitive to price spikes? You can decrease sensitivity by increasing the Multiplier or the Length settings. This will move the trailing stop further away from the price action, requiring a larger move to trigger a trend flip.

How can I access the Linear Trailing Stop? 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.