OPEN-SOURCE SCRIPT
업데이트됨 Statistical Deviation per Asset

INDICATOR: STATISTICAL DEVIATION PER ASSET (SDPA)
1. Overview
The Statistical Deviation per Asset (SDPA) is a quantitative analysis tool designed to measure the strength and exhaustion of price movements. Unlike standard oscillators (like RSI), the SDPA calculates the actual percentage deviation from the most recent pivot point (High or Low) and compares it against historical performance averages specific to each asset.
---
2. Core Logic & Calculation
The script operates on a Mean Reversion principle. It assumes that every asset (Gold, Bitcoin, Ethereum, etc.) has a unique "volatility signature" depending on the timeframe.
* Dynamic Pivot Detection: The indicator identifies recent Swing Highs and Swing Lows using an adaptive lookback period.
* Real-Time Return Calculation: Once a pivot is confirmed, the script calculates the real-time percentage gain (from a Low) or loss (from a High).
* Zero-Indexed Histogram: This return is plotted as an oscillator centered around a Zero Line, representing the current trend's progress since the last reversal.
---
3. Adaptive Intelligence (Multi-Asset & Multi-TF)
The SDPA is pre-loaded with a statistical database. It automatically adjusts its sensitivity and thresholds based on:
1. The Selected Asset: Whether trading XAUUSD, Bitcoin, or Solana, the deviation thresholds adapt to the specific volatility of that instrument.
2. The Timeframe (TF): The calculation period (period) and performance targets (hausse_perf / baisse_perf) change dynamically. For example, a 1-minute scalping setup uses a longer lookback (200) compared to a Daily swing setup (10).
---
4. Visual Anatomy
The interface is designed for instant "at-a-glance" interpretation:
* The Histogram:
* Green: Price is trending up since the last Swing Low.
* Red: Price is trending down since the last Swing High.
* Threshold Lines (The Statistical Averages):
* Thick Line (60% Opacity): Represents the Average Historical Deviation. When the histogram hits this line, the move is considered "statistically mature."
* Thin Line (70% Opacity): Represents the Strong Deviation Zone (1.5x the average), indicating extreme momentum or potential exhaustion.
* Background Highlighting: The chart background colors automatically when the price exceeds historical averages, signaling a High-Probability Reversal Zone.
---
5. How to Trade with SDPA
* Trend Maturity: If the histogram exceeds the Bullish Average (Green line), the current move has reached its typical historical limit. Traders should look for take-profit opportunities or wait for a reversal.
* Impulse Strength: A rapid move from the Zero Line toward the thresholds confirms strong institutional interest.
* Mean Reversion: When the histogram reaches the Strong Zone (1.5x), the price is "overextended" statistically, offering a high reward-to-risk ratio for counter-trend setups.
---
6. Technical Parameters
* Asset Choice: Dropdown menu to select the specific asset.
* Colors: Customizable Bullish and Bearish colors to match any UI theme.
* Precision: Set to 4 decimal places to ensure accuracy across all asset types.
1. Overview
The Statistical Deviation per Asset (SDPA) is a quantitative analysis tool designed to measure the strength and exhaustion of price movements. Unlike standard oscillators (like RSI), the SDPA calculates the actual percentage deviation from the most recent pivot point (High or Low) and compares it against historical performance averages specific to each asset.
---
2. Core Logic & Calculation
The script operates on a Mean Reversion principle. It assumes that every asset (Gold, Bitcoin, Ethereum, etc.) has a unique "volatility signature" depending on the timeframe.
* Dynamic Pivot Detection: The indicator identifies recent Swing Highs and Swing Lows using an adaptive lookback period.
* Real-Time Return Calculation: Once a pivot is confirmed, the script calculates the real-time percentage gain (from a Low) or loss (from a High).
* Zero-Indexed Histogram: This return is plotted as an oscillator centered around a Zero Line, representing the current trend's progress since the last reversal.
---
3. Adaptive Intelligence (Multi-Asset & Multi-TF)
The SDPA is pre-loaded with a statistical database. It automatically adjusts its sensitivity and thresholds based on:
1. The Selected Asset: Whether trading XAUUSD, Bitcoin, or Solana, the deviation thresholds adapt to the specific volatility of that instrument.
2. The Timeframe (TF): The calculation period (period) and performance targets (hausse_perf / baisse_perf) change dynamically. For example, a 1-minute scalping setup uses a longer lookback (200) compared to a Daily swing setup (10).
---
4. Visual Anatomy
The interface is designed for instant "at-a-glance" interpretation:
* The Histogram:
* Green: Price is trending up since the last Swing Low.
* Red: Price is trending down since the last Swing High.
* Threshold Lines (The Statistical Averages):
* Thick Line (60% Opacity): Represents the Average Historical Deviation. When the histogram hits this line, the move is considered "statistically mature."
* Thin Line (70% Opacity): Represents the Strong Deviation Zone (1.5x the average), indicating extreme momentum or potential exhaustion.
* Background Highlighting: The chart background colors automatically when the price exceeds historical averages, signaling a High-Probability Reversal Zone.
---
5. How to Trade with SDPA
* Trend Maturity: If the histogram exceeds the Bullish Average (Green line), the current move has reached its typical historical limit. Traders should look for take-profit opportunities or wait for a reversal.
* Impulse Strength: A rapid move from the Zero Line toward the thresholds confirms strong institutional interest.
* Mean Reversion: When the histogram reaches the Strong Zone (1.5x), the price is "overextended" statistically, offering a high reward-to-risk ratio for counter-trend setups.
---
6. Technical Parameters
* Asset Choice: Dropdown menu to select the specific asset.
* Colors: Customizable Bullish and Bearish colors to match any UI theme.
* Precision: Set to 4 decimal places to ensure accuracy across all asset types.
릴리즈 노트
Add a lot of assets 오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
My Website for the traders !
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
My Website for the traders !
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.