OPEN-SOURCE SCRIPT
Weekly Distribution Levels

█ OVERVIEW
Weekly Distribution Levels plots standard deviation bands around the weekly open price, showing where the current week's move stands relative to its historical distribution. It answers the question: "How far has price moved this week compared to what's normal?"
Works on any instrument — futures, stocks, forex, crypto. No hardcoded statistics. Everything is computed dynamically from the chart's own price history.
█ HOW IT WORKS
At the start of each trading week, the indicator:
These levels represent the statistical boundaries of "normal" weekly price movement. A move beyond ±1σ is getting extended. Beyond ±2σ is rare. The dashboard shows your current deviation reading in real time (e.g., +0.72σ).
█ TWO CALCULATION METHODS
StdDev (Close − Open) — Default. Measures the variability of weekly net moves (where the week closed relative to where it opened). This captures directional tendency and is more useful for gauging how far the current week might travel from open to close.
Avg Weekly Range — Measures the average weekly high-to-low range. This captures total weekly volatility regardless of direction. Produces wider bands since ranges are always larger than net moves.
█ THE TURN ZONE
A shaded area around the ±0.5σ level (configurable). This is the zone where price statistically tends to reverse or consolidate during a typical week. Think of it as the boundary between "normal weekly noise" and "directional commitment."
█ FEATURES
Levels & Labels
Dashboard (info table)
History
Background Coloring
Alerts
█ HOW TO USE
1. Apply to any instrument — best used on 30-minute or 1-hour charts for a clean weekly overview
2. At the start of each week, levels automatically recalculate from the new weekly open
3. Watch the dashboard for your current σ reading throughout the week
4. Use the turn zone (±0.5σ) as the "normal range" boundary
5. Set alerts at ±1.0σ to get notified when the week is getting extended
6. Enable background coloring at ±1.5σ to visually flag overextended conditions
Suggested workflow:
█ SETTINGS
█ WHAT MAKES THIS ORIGINAL
█ LIMITATIONS
Weekly Distribution Levels plots standard deviation bands around the weekly open price, showing where the current week's move stands relative to its historical distribution. It answers the question: "How far has price moved this week compared to what's normal?"
Works on any instrument — futures, stocks, forex, crypto. No hardcoded statistics. Everything is computed dynamically from the chart's own price history.
█ HOW IT WORKS
At the start of each trading week, the indicator:
- Captures the weekly open price
- Retrieves the standard deviation of weekly net moves (close − open) from the previous N weeks
- Projects symmetrical levels above and below the open at configurable deviation intervals (±0.5σ, ±1.0σ, ±1.5σ, ±2.0σ, etc.)
These levels represent the statistical boundaries of "normal" weekly price movement. A move beyond ±1σ is getting extended. Beyond ±2σ is rare. The dashboard shows your current deviation reading in real time (e.g., +0.72σ).
█ TWO CALCULATION METHODS
StdDev (Close − Open) — Default. Measures the variability of weekly net moves (where the week closed relative to where it opened). This captures directional tendency and is more useful for gauging how far the current week might travel from open to close.
Avg Weekly Range — Measures the average weekly high-to-low range. This captures total weekly volatility regardless of direction. Produces wider bands since ranges are always larger than net moves.
█ THE TURN ZONE
A shaded area around the ±0.5σ level (configurable). This is the zone where price statistically tends to reverse or consolidate during a typical week. Think of it as the boundary between "normal weekly noise" and "directional commitment."
- Inside the zone: Price is doing nothing unusual — wait for direction
- Breaking out of the zone: The week is starting to trend — look for continuation
- Reaching ±1.5σ or beyond: Extended move — watch for exhaustion or reversal setups
█ FEATURES
Levels & Labels
- Weekly open line with customizable color, style, and width
- Upper (+) and lower (−) deviation levels with separate colors
- Labels show deviation value and actual price (e.g., "+1.0 (21,450)")
- Configurable max deviation (0.5 to 5.0) and step size (0.25 to 1.0)
- Optional gradient opacity — levels get more intense further from open
Dashboard (info table)
- Calculation method and lookback period
- Current 1σ value in points
- Weekly open price
- Live deviation reading (e.g., +0.72σ) with directional color
- Dark and Light theme support
- Adjustable size (Tiny / Small / Normal / Large) and position
History
- Show 1–10 previous weeks of levels on chart for context
- Dynamic object-count cap prevents runtime errors at extreme settings
Background Coloring
- Optional chart background shading when price exceeds a deviation threshold
- Separate colors for above and below threshold
- Adjustable threshold (default ±1.5σ) and opacity
- Only renders on recent bars — no historical clutter
Alerts
- Fires when price reaches a configurable deviation level (default ±1.0σ)
- Uses high/low for detection — catches wick touches, not just closes
- Once per direction per week — no spam
- Dynamic message includes deviation level, price, and ticker
█ HOW TO USE
1. Apply to any instrument — best used on 30-minute or 1-hour charts for a clean weekly overview
2. At the start of each week, levels automatically recalculate from the new weekly open
3. Watch the dashboard for your current σ reading throughout the week
4. Use the turn zone (±0.5σ) as the "normal range" boundary
5. Set alerts at ±1.0σ to get notified when the week is getting extended
6. Enable background coloring at ±1.5σ to visually flag overextended conditions
Suggested workflow:
- Monday/Tuesday: Price inside the turn zone is normal — no edge yet
- Mid-week: Breaking ±1.0σ signals a directional week — trade with the trend
- Late week at ±1.5σ+: Consider fading or tightening stops — the move is statistically stretched
█ SETTINGS
- Calculation: Lookback period (10–520 weeks), deviation method
- Levels: Max deviation, step size, line style/width/color
- Turn Zone: Toggle, center position, width, color
- Labels: Show/hide price on labels
- Background: Toggle, threshold, colors, opacity
- Alerts: Toggle, deviation level trigger
- Table: Theme, position, size
- History: Number of weeks to display (1–10)
█ WHAT MAKES THIS ORIGINAL
- Dynamic, not static — deviation bands recalculate from actual price history, not fixed percentages
- Weekly open anchored — levels reset each week from the actual open, not from arbitrary pivots
- Universal — works on any instrument without hardcoded values or asset-specific calibration
- Turn zone concept — highlights the statistical boundary between noise and trend
- Live σ reading — real-time dashboard shows exactly where the current week stands in its distribution
- Smart object management — dynamic caps prevent runtime errors even at extreme settings
█ LIMITATIONS
- Deviation bands assume roughly normal distribution of weekly moves — fat tails (news events, gaps) are not modeled
- Early in the week, the current σ reading is less meaningful since the week hasn't developed
- Lookback period matters — too short (10w) adapts fast but is noisy, too long (520w) is stable but slow to react to regime changes
- 52-week default is a reasonable balance for most instruments
- Standard deviation levels are guides, not guaranteed support/resistance
Open-source script
In true PulseWire spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Access my indicators and manual at: constantinpabst.com/
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by PulseWire. Read more in the Terms of Use.
Open-source script
In true PulseWire spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Access my indicators and manual at: constantinpabst.com/
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by PulseWire. Read more in the Terms of Use.
