All indicators

Linear Trailing Stop

Jul 30, 2019

Static chart image
Support and ResistanceSignalsTrailing-StopVolatility

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 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.