All indicators

Z Score & Trend Following

Mar 23, 2024

Static chart image
Volume BasedSignalsOscillatorsMoving Averages

The Z Score & Trend Following indicator is a statistical tool that measures how many standard deviations a price point is from its mean to identify market trends and potential reversal points.

Usage

The tool can be used to identify overextended market conditions or the strength of a prevailing trend. When the Z Score is positive, it indicates price is trading above the mean, while a negative Z Score indicates price is trading below the mean.

Traders can interpret the indicator using the following visual cues:

  • Trend Identification: Values above the upper threshold suggest strong bullish momentum, while values below the lower threshold suggest strong bearish momentum.
  • Inverted Z Score: The red line represents the inverse of the Z Score, providing a symmetrical view of price oscillations.
  • Bar Coloring: If enabled, the chart bars change color based on the Z Score's relationship to zero and the thresholds, allowing for quick visual trend assessment directly on the price action.

Details

The indicator calculates the Z Score by taking the difference between the source price and a moving average, then dividing that result by the standard deviation. The mathematical formula used is: zscore = (Source - Moving Average) / Standard Deviation

The implementation allows for various moving average types, including the Volume Weighted Moving Average (VMA) and Triangular Moving Average (TMA), providing flexibility in how the mean is calculated relative to market volatility and smoothing requirements.

Settings

  • Standard Deviation Length: The lookback period used for the standard deviation calculation.
  • Average Length: The lookback period used for the moving average (mean) calculation.
  • Calculation Type: Selects the moving average method (SMA, EMA, WMA, VMA, or TMA).
  • Standard Deviations: Sets the threshold level (e.g., 3.0) for identifying extreme price deviations.
  • Bar Color: Toggles the price bar coloring based on the Z Score value.
  • Source: The price data point used for calculations (default is Close).

FAQ

How do I use the Z Score & Trend Following indicator?

The indicator is used to find overbought or oversold conditions based on statistical deviations from a mean. Crossing the zero line suggests a change in trend direction, while hitting threshold lines suggests extreme market moves.

What are the different calculation types?

You can choose between Simple (SMA), Exponential (EMA), Weighted (WMA), Volume Weighted (VMA), and Triangular (TMA) moving averages to suit different trading styles and timeframes.

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.