OPEN-SOURCE SCRIPT
350DMA bands + Z-score (V2)

This script extends the classic 350-day moving average (350DMA) by building dynamic valuation bands and a Z-Score framework to evaluate how far price deviates from its long-term mean.
Features
350DMA Anchor: Uses the 350-day simple moving average as the baseline reference.
Fixed Multipliers: Key bands plotted at ×0.625, ×1.0, ×1.6, ×2.0, and ×2.5 of the 350DMA — historically significant levels for cycle analysis.
Z-Score Mapping: Price is converted into a Z-Score on a scale from +2 (deep undervaluation) to –2 (extreme overvaluation), using log-space interpolation for accuracy.
Custom Display: HUD panel and on-chart label show the current Z-Score in real time.
Clamp Option: Users can toggle between raw Z values or capped values (±2).
How to Use
Valuation Context: The 350DMA is often considered a “fair value” anchor; large deviations identify cycles of under- or over-valuation.
Z-Score Insight:
Positive Z values suggest favorable accumulation zones where price is below long-term average.
Negative Z values highlight zones of stretched valuation, often associated with distribution or profit-taking.
Strategic Application: This is not a standalone trading system — it works best in confluence with other indicators, cycle models, or macro analysis.
Originality
Unlike a simple DMA overlay, this script:
Provides multiple cycle-based bands derived from the 350DMA.
Applies a logarithmic Z-Score mapping for more precise long-term scaling.
Adds an integrated HUD and labeling system for quick interpretation.
Features
350DMA Anchor: Uses the 350-day simple moving average as the baseline reference.
Fixed Multipliers: Key bands plotted at ×0.625, ×1.0, ×1.6, ×2.0, and ×2.5 of the 350DMA — historically significant levels for cycle analysis.
Z-Score Mapping: Price is converted into a Z-Score on a scale from +2 (deep undervaluation) to –2 (extreme overvaluation), using log-space interpolation for accuracy.
Custom Display: HUD panel and on-chart label show the current Z-Score in real time.
Clamp Option: Users can toggle between raw Z values or capped values (±2).
How to Use
Valuation Context: The 350DMA is often considered a “fair value” anchor; large deviations identify cycles of under- or over-valuation.
Z-Score Insight:
Positive Z values suggest favorable accumulation zones where price is below long-term average.
Negative Z values highlight zones of stretched valuation, often associated with distribution or profit-taking.
Strategic Application: This is not a standalone trading system — it works best in confluence with other indicators, cycle models, or macro analysis.
Originality
Unlike a simple DMA overlay, this script:
Provides multiple cycle-based bands derived from the 350DMA.
Applies a logarithmic Z-Score mapping for more precise long-term scaling.
Adds an integrated HUD and labeling system for quick interpretation.
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。