OPEN-SOURCE SCRIPT
Обновлено MA Z-score

## MA Z-Score
The MA Z-Score is a momentum and trend-strength indicator that measures how far a moving average deviates from its statistical mean using a Z-score calculation. Instead of analyzing raw price action directly, this script normalizes the selected moving average and helps traders identify trend acceleration, overextended conditions, and momentum shifts more clearly across different markets and timeframes.
### Features
* Multiple Moving Average types:
* EMA
* SMA
* DEMA
* HMA
* VWMA
* Z-score normalization of the selected MA
* Configurable lookback period
* Adjustable bullish and bearish thresholds
* Dynamic trend coloring
* Optional bar coloring
* Custom visual reference levels
* Built-in alert conditions for long and short signals
### How It Works
The script first calculates a moving average based on the selected type and length.
It then computes:
* The mean of the MA using an EMA
* The standard deviation over the chosen lookback period
* The Z-score using:
[
Z = \frac{MA - Mean}{Standard\ Deviation}
]
This creates a normalized oscillator showing how extreme the current MA value is relative to its recent behavior.
### Signal Logic
* Long Condition:
* Triggered when the Z-score rises above the bullish threshold.
* Short Condition:
* Triggered when the Z-score falls below the bearish threshold.
The oscillator changes color depending on trend direction:
* Green = bullish momentum
* Pink = bearish momentum
Optional candle coloring allows price bars to reflect the current trend state directly on the chart.
### Best Use Cases
This indicator can be used for:
* Trend confirmation
* Momentum analysis
* Detecting strong expansions
* Identifying potential reversals
* Filtering trades with statistical context
* Multi-timeframe trend alignment
### Tips
* Lower thresholds create more signals but increase noise.
* Higher thresholds filter weak momentum and focus on stronger trends.
* HMA and DEMA react faster to price movement.
* VWMA can be useful for volume-sensitive markets.
### Alerts
The script includes built-in TradingView alerts:
* MA Z-score Long
* MA Z-score Short
These alerts can be connected to notifications, bots, or automated workflows.
### Important
This indicator is not designed as a standalone trading system. It works best when combined with:
* Market structure
* Support & resistance
* Volume analysis
* Higher timeframe bias
* Risk management
The MA Z-Score is a momentum and trend-strength indicator that measures how far a moving average deviates from its statistical mean using a Z-score calculation. Instead of analyzing raw price action directly, this script normalizes the selected moving average and helps traders identify trend acceleration, overextended conditions, and momentum shifts more clearly across different markets and timeframes.
### Features
* Multiple Moving Average types:
* EMA
* SMA
* DEMA
* HMA
* VWMA
* Z-score normalization of the selected MA
* Configurable lookback period
* Adjustable bullish and bearish thresholds
* Dynamic trend coloring
* Optional bar coloring
* Custom visual reference levels
* Built-in alert conditions for long and short signals
### How It Works
The script first calculates a moving average based on the selected type and length.
It then computes:
* The mean of the MA using an EMA
* The standard deviation over the chosen lookback period
* The Z-score using:
[
Z = \frac{MA - Mean}{Standard\ Deviation}
]
This creates a normalized oscillator showing how extreme the current MA value is relative to its recent behavior.
### Signal Logic
* Long Condition:
* Triggered when the Z-score rises above the bullish threshold.
* Short Condition:
* Triggered when the Z-score falls below the bearish threshold.
The oscillator changes color depending on trend direction:
* Green = bullish momentum
* Pink = bearish momentum
Optional candle coloring allows price bars to reflect the current trend state directly on the chart.
### Best Use Cases
This indicator can be used for:
* Trend confirmation
* Momentum analysis
* Detecting strong expansions
* Identifying potential reversals
* Filtering trades with statistical context
* Multi-timeframe trend alignment
### Tips
* Lower thresholds create more signals but increase noise.
* Higher thresholds filter weak momentum and focus on stronger trends.
* HMA and DEMA react faster to price movement.
* VWMA can be useful for volume-sensitive markets.
### Alerts
The script includes built-in TradingView alerts:
* MA Z-score Long
* MA Z-score Short
These alerts can be connected to notifications, bots, or automated workflows.
### Important
This indicator is not designed as a standalone trading system. It works best when combined with:
* Market structure
* Support & resistance
* Volume analysis
* Higher timeframe bias
* Risk management
Информация о релизе
## MA Z-ScoreThe MA Z-Score is a momentum and trend-strength indicator that measures how far a moving average deviates from its statistical mean using a Z-score calculation. Instead of analyzing raw price action directly, this script normalizes the selected moving average and helps traders identify trend acceleration, overextended conditions, and momentum shifts more clearly across different markets and timeframes.
### Features
* Multiple Moving Average types:
* EMA
* SMA
* DEMA
* HMA
* VWMA
* Z-score normalization of the selected MA
* Configurable lookback period
* Adjustable bullish and bearish thresholds
* Dynamic trend coloring
* Optional bar coloring
* Custom visual reference levels
* Built-in alert conditions for long and short signals
### How It Works
The script first calculates a moving average based on the selected type and length.
It then computes:
* The mean of the MA using an EMA
* The standard deviation over the chosen lookback period
* The Z-score using:
[
Z = \frac{MA - Mean}{Standard\ Deviation}
]
This creates a normalized oscillator showing how extreme the current MA value is relative to its recent behavior.
### Signal Logic
* Long Condition:
* Triggered when the Z-score rises above the bullish threshold.
* Short Condition:
* Triggered when the Z-score falls below the bearish threshold.
The oscillator changes color depending on trend direction:
* Green = bullish momentum
* Pink = bearish momentum
Optional candle coloring allows price bars to reflect the current trend state directly on the chart.
### Best Use Cases
This indicator can be used for:
* Trend confirmation
* Momentum analysis
* Detecting strong expansions
* Identifying potential reversals
* Filtering trades with statistical context
* Multi-timeframe trend alignment
### Tips
* Lower thresholds create more signals but increase noise.
* Higher thresholds filter weak momentum and focus on stronger trends.
* HMA and DEMA react faster to price movement.
* VWMA can be useful for volume-sensitive markets.
### Alerts
The script includes built-in TradingView alerts:
* MA Z-score Long
* MA Z-score Short
These alerts can be connected to notifications, bots, or automated workflows.
### Important
This indicator is not designed as a standalone trading system. It works best when combined with:
* Market structure
* Support & resistance
* Volume analysis
* Higher timeframe bias
* Risk management
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.