OPEN-SOURCE SCRIPT

Z-Scored Moving Average Suite [KFB Quant]

Mis à jour
Z-Scored Moving Average Suite

This indicator combines several types of moving averages—Simple, Exponential, and Weighted—with a Z-Score calculation to give a clearer understanding of price trends in relation to their historical averages. It is used to detect overbought (OB) and oversold (OS) conditions, allowing you to see when an asset is deviating significantly from its mean.

Key Components:
  1. Moving Averages: The suite includes Simple (SMA), Exponential (EMA), and Weighted (WMA) Moving Averages. For each, a single, double, and triple version is calculated to smooth out noise.
  2. Z-Score: The Z-Score measures how far the current price is from its moving average in terms of standard deviations, helping to highlight unusual price behavior.
  3. Overbought and Oversold Levels:
    - When the Z-Score crosses above a predefined threshold (1.5 by default), the asset is considered Overbought (OB).
    - When the Z-Score drops below a certain level (-1.5 by default), the asset is seen as Oversold (OS).
  4. Visualization:
    - The histogram represents the average Z-Score of all the moving averages combined, colored based on bullish (blue) or bearish (brown) trends.
    - Individual Z-Scores for each moving average type (SMA, EMA, WMA) are also plotted, providing further insight into the momentum and direction.
  5. Signals:
    - The table in the chart shows a summary of Z-Scores for each type of moving average. It also provides a quick glance at whether the asset is in a bullish or bearish phase, if the Z-Scores are rising or falling, and whether the asset is overbought or oversold.


This tool is highly customizable, with adjustable lengths for the moving averages and Z-Scores, making it a flexible addition to any trading strategy that relies on mean-reversion or trend analysis.



Disclaimer: This tool is provided for informational and educational purposes only and should not be considered as financial advice. Always conduct your own research and consult with a licensed financial advisor before making any investment decisions.
Notes de version
Cleaned code.
Moving AveragesOscillatorsTrend Analysis

Script open-source

Dans le plus pur esprit TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par nos Règles. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Vous voulez utiliser ce script sur un graphique ?

Clause de non-responsabilité