OPEN-SOURCE SCRIPT

Weekly Support Zone - Advanced

211
# Weekly Support Zone - Advanced (WSZ)

## Overview

Weekly Support Zone - Advanced is a **multi-factor confluence scoring indicator** with a built-in **Auto-Tune Engine** that automatically optimizes all parameters for the current chart timeframe. It evaluates 5 independent market dimensions and combines them into a single directional score with percentage-based signal strength. Drop it on any chart, any timeframe, any instrument — it adapts instantly.

**Free & Open Source** — no invite-only access, no paywall. Full source code, fully transparent.

## Key Features

- **Auto-Tune Engine** — Detects your timeframe (Scalping / Intraday / Swing / Position / Macro) and applies research-backed parameter profiles automatically
- **5-Factor Confluence Scoring** — Only signals when multiple independent dimensions agree, reducing noise and false signals
- **Adaptive OB/OS Detection** — Uses Constance Brown / Cardwell method: overbought/oversold levels dynamically shift based on trend state (not static 70/30)
- **Chaikin Money Flow (CMF)** — Volume analysis based on where price closes within the bar range, not simple green/red candle counting
- **Non-Repainting** — All signals use confirmed bars only (barstate.isconfirmed)
- **Full Manual Override** — Disable Auto-Tune and control every parameter individually

## How The Scoring Works

The indicator evaluates 5 independent market dimensions. Each contributes +1 (bullish) or -1 (bearish) to the final score:

| # | Dimension | What It Measures |
|---|-----------|-----------------|
| 1 | **Macro Trend** | Price direction confirmed over N consecutive bars above/below SMA |
| 2 | **Momentum** | RSI directional bias — percentage of recent bars with RSI above/below 50 |
| 3 | **Market Structure** | Higher highs / lower lows pattern detection across N bars |
| 4 | **OB/OS** | Adaptive overbought/oversold detection using trend-shifted RSI ranges |
| 5 | **Volume Flow** | Chaikin Money Flow direction confirmed by volume spike or elevated volume |

**Signal strength** (0-100%) = the net agreement of all 5 factors. A "Strong" signal requires different thresholds per timeframe — 80% on scalping charts (4/5 factors) vs 40% on macro (2/5 factors).

## Auto-Tune Engine — 5 Timeframe Profiles

You don't need to change any settings when switching timeframes. The engine selects the optimal configuration automatically:

| Profile | Timeframes | MA | RSI | Strong Threshold |
|---------|------------|-----|-----|-----------------|
| **Scalping** | 1m - 5m | SMA 50 | RSI 7 | 80% (4/5 factors) |
| **Intraday** | 10m - 30m | SMA 100 | RSI 9 | 80% (4/5 factors) |
| **Swing** | 1H - 4H | SMA 200 | RSI 14 | 60% (3/5 factors) |
| **Position** | Daily - Weekly | SMA 200 | RSI 14 | 60% (3/5 factors) |
| **Macro** | Monthly+ | SMA 10 | RSI 14 | 40% (2/5 factors) |

All confirmation periods, thresholds, CMF settings, and OB/OS base levels also adapt per profile. The active profile and all parameters are displayed in the dashboard for full transparency.

## Adaptive OB/OS — Constance Brown Method

Traditional indicators use fixed RSI levels (70/30). This fails in trending markets:
- In a **bull market**, RSI oscillates between 40-80. An RSI of 40 IS oversold.
- In a **bear market**, RSI oscillates between 20-60. An RSI of 60 IS overbought.

WSZ Advanced uses the RSI moving average (Cardwell method) to detect the current trend regime, then shifts OB/OS levels accordingly. The dashboard shows the currently active dynamic levels (e.g., "OB:60 OS:20" in a bear market).

## Volume Flow — Chaikin Money Flow + Spike Detection

Instead of counting green vs red candles (which fails when candles have long wicks or small bodies), WSZ uses:

1. **Chaikin Money Flow (CMF)** — Measures where price closes within each bar's range, weighted by volume. A close near the high = buying pressure, near the low = selling pressure.
2. **Volume Spike Detection** — Identifies bars with volume significantly above the moving average.
3. **Elevated Volume Check** — Detects sustained above-average volume over multiple bars.

A volume signal triggers when CMF confirms a direction AND volume is either spiking or elevated.

## Chart Elements

- **Moving Average** — Adaptive SMA (auto-scales per timeframe)
- **Background Coloring** — Subtle green/red tint for overall signal bias
- **Triangle Markers** — Oversold (green, below bar) and overbought (red, above bar)
- **BUY/SELL Labels** — Only appear when signal strength exceeds the adaptive threshold
- **Dashboard** — 10-row panel showing mode, profile, all 5 factor signals, score, and active parameters

## Settings

**Mode** — Single toggle: Auto-Tune ON/OFF.

**Manual Overrides** (only active when Auto-Tune is OFF):
- Base Indicators: MA Length, RSI Length, OB/OS Levels, CMF Length
- Confirmation Periods: Candle counts for each of the 5 dimensions
- Thresholds: Momentum ratio, Volume Spike Multiplier, CMF Threshold, Strong Signal %

**Visual** — Toggle each element independently. Choose dashboard position (6 options).

## Alerts

5 built-in alert conditions:
- Strong Buy Signal — multiple factors aligned bullish
- Strong Sell Signal — multiple factors aligned bearish
- Oversold Condition — adaptive RSI threshold reached
- Overbought Condition — adaptive RSI threshold reached
- MA Cross — price crosses the moving average

## Best Used For

- Drop onto any chart, any timeframe — it adapts automatically
- Identifying confluence zones where multiple factors align
- Quick visual overview of market bias across 5 dimensions
- Spotting overbought/oversold conditions that traditional RSI misses (adaptive ranges)
- Confirming entries alongside your own strategy
- Works on all instruments: stocks, forex, crypto, futures, indices

## Technical Notes

- Pine Script v6 (latest version)
- Signals on confirmed bars only — no repainting
- Open source, no external dependencies, no security/library calls
- All inputs have tooltips explaining their function
- Float division throughout — no integer truncation issues

## Important Disclaimer

This indicator is provided for educational and informational purposes only. It does not constitute financial advice. No signals should be interpreted as buy or sell recommendations. Past performance is not indicative of future results. No indicator can predict market movements with certainty. Always implement proper risk management. The author assumes no responsibility for trading losses. Trade at your own risk.

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.