All indicators

Function Volatility Stop V0

Feb 3, 2016

Static chart image
Support and ResistanceSignalsOscillatorsTrailing-StopVolatility

The Function Volatility Stop V0 indicator provides a versatile implementation of a volatility-based trailing stop that can be applied to any data series, such as the RSI. This tool helps traders identify trend reversals and define dynamic support and resistance levels based on market volatility.

Usage

The Usage section describes how the script can be used to identify trend shifts and manage trade exits. By default, this version is applied to an RSI series to demonstrate its flexibility beyond standard price action.

  • Trend Identification: When the RSI crosses above the volatility stop line, the trend is considered bullish (green). When it crosses below, the trend is considered bearish (red).
  • Dynamic Levels: The indicator plots a trailing line that adjusts based on the average range of the input series. This line can be used to set stop-loss levels or to confirm momentum shifts.
  • Volatility Width: An additional width plot is included to visualize the magnitude of the volatility shift at the start of a new trend.

Details

The script utilizes a custom function fVstop that calculates the volatility stop based on four primary inputs: high source, low source, exit source, and a range value.

The core logic tracks the maximum and minimum values of the source during a trend. When a new trend begins, the volatility stop is offset from the current source value by a user-defined multiplier of the average range. During an uptrend, the stop only moves upward (locking in gains), and during a downtrend, it only moves downward. This version specifically calculates an EMA of the absolute changes in the RSI to derive the volatility component used for the stop calculation.

Settings

Main Settings

  • Source for RSI: The price data (e.g., Close, Open, High) used to calculate the underlying RSI.
  • RSI Length: The lookback period for the RSI calculation.
  • Fast True Range Multiplier: The multiplier applied to the average range to determine the distance of the volatility stop from the source.
  • Average Range Length: The period used to calculate the EMA of the RSI's absolute changes, representing the volatility baseline.

FAQ

How do I access Function Volatility Stop V0?

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

Can this indicator be used on price instead of RSI?

Yes, while the default example uses RSI, the underlying fVstop function is designed to handle any series. You can modify the script inputs to point to price sources or other oscillators.

What do the different colors represent?

The circles represent the Volatility Stop; green indicates a bullish trend where the source is above the stop, and red indicates a bearish trend where the source is below the stop.

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.