All indicators

Trailing SL Alerts

Mar 3, 2020

Static chart image
Price Action BasedSignalsTrailing-StopVolatility

The Trailing SL Alerts indicator provides a dynamic stop-loss tracking system designed to generate trend-following signals and alert users when price action breaks through established trailing levels.

Usage

The Usage section describes how the script can be used to manage risk and identify potential reversals. Users can apply this tool to visualize a trailing stop-loss line that adjusts based on price movement. When the price crosses the trailing stop level, the indicator triggers a "Long" or "Short" signal, suggesting a shift in trend direction.

Example usage includes:

  • Trend Following: Stay in a position as long as the price remains on the correct side of the trailing line.
  • Exit Management: Use the plotted line as a dynamic exit level for existing trades.
  • Alert Automation: Set up TradingView alerts using the "Once Per Bar" or "Once Per Bar Close" setting to be notified of trend changes in real-time.

Details

The script calculates the trailing stop-loss based on one of three user-defined methods: percentage-based, ATR-based, or an absolute price value.

  • In a Long state, the trailing stop can only move upward, locking in profits or reducing risk as price makes new highs.
  • In a Short state, the trailing stop can only move downward. The signal triggers when the high or low of the current bar breaks the previous bar's trailing stop level, causing the position state to flip and the stop to reset relative to the new price extreme.

Settings

  • SL Type: Chooses the calculation method for the stop-loss distance (%, ATR, or Absolute).
  • % SL: Sets the percentage distance from the price when "%" is selected.
  • ATR Length: Determines the lookback period for the Average True Range calculation.
  • ATR Mult: A multiplier applied to the ATR value to determine the stop distance.
  • Absolute SL: A fixed price unit distance used when "Absolute" is selected.

FAQ

How do I set up alerts for this indicator? You can create an alert by selecting the indicator in the Alert menu and choosing either the "SL Long" or "SL Short" condition. It is recommended to use the "Once Per Bar" or "Once Per Bar Close" setting.

Can I use this for any asset? Yes, the script is versatile and can be used on stocks, forex, crypto, or indices by adjusting the SL Type and values to fit the volatility of the specific asset.

How can I access this tool? 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.