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.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.