INVITE-ONLY SCRIPT
Multi-Timeframe Price Zones

📌Multi-Timeframe Price Zones
This indicator plots dynamic multi-timeframe price zones—including previous highs/lows, pivot levels, and magnetic support/resistance regions—using auto-updating boxes on the chart, allowing traders to identify high-influence price areas across higher timeframes with clarity and precision.

■ Magnetic Zones 1 – Inputs
Timeframe: Selects the higher timeframe used for generating zones (e.g., D, W, M).
Show Last: Defines how many of the most recent timeframe zones to display.
PDHL: Toggles previous-day-high/low zones.
P: Toggles the pivot level (previous period midpoint).
SR1 / SR2: Enables two sets of magnetic support/resistance zones based on volatility expansion multipliers.
Sub Color: Sets the primary color used for box borders, backgrounds, and text.
■ General Zone Settings
Box Transparency: Adjusts opacity of filled price zones.
Border Style: Selects border style (solid, dashed, dotted).
Text Size: Controls label sizing for zone annotations.
Text Alignment: Positions labels inside boxes (left, center, right).

■ Data Retrieval Logic
The script pulls higher-timeframe timestamps and close times (time, time_close) using request.security, ensuring boxes start exactly at the beginning of the selected timeframe and extend to its closing bar.
A helper function retrieves any higher-timeframe price series (high, low, midpoint, and magnetic zone values).
■ Magnetic Zone Calculation
The script computes magnetic support/resistance levels using previous-bar volatility:
prev_hl_diff = previous high − previous low
Resistance = hl2 + (multiplier × prev_hl_diff)
Support = hl2 − (multiplier × prev_hl_diff)
Two multipliers are used:
0.236 → SR1
0.786 → SR2
These create responsive zones that expand/shrink with volatility.
■ Buffer Zone Expansion
Each level generates a “buffer zone”—a small band above/below the main value—to create visually meaningful zones rather than a single flat line:
top = level + range/8
bottom = level − range/8
Buffers are applied symmetrically around each SR level.

■ Zone Types Displayed
1. PDHL Zones (Previous High / Previous Low)
Retrieved directly from the selected higher timeframe’s last completed bar.
2. Pivot Zone (P)
Based on midpoint (hl2) of the previous period.
3. Magnetic Zones SR1 / SR2
Volatility-based resistance/support zones with buffer expansion.
■ Box Rendering System
The script uses a generalized draw_box() function that draws labeled rectangles using:
timeframe start/end timestamps
top/bottom price boundaries
custom background transparency
border style and width
optional price annotations
All box references are stored in arrays for proper management and future cleanup.
■ Auto-Updating Logic
Whenever the higher timeframe changes (timeframe.change()):
New boxes are created for SR1, SR2, pivot, and PDHL levels.
Boxes extend from the higher timeframe’s opening timestamp to its closing timestamp.
Price labels include the exact value and the timeframe abbreviation.
This ensures zones remain aligned with the boundaries of each higher-timeframe candle.


■ Purpose
This indicator is designed to:
Highlight multi-timeframe price zones such as PDHL, pivots, and magnetic SR ranges.
Provide contextual support/resistance from a higher timeframe while trading lower timeframes.
Visualize volatility-driven price zones that often act as reaction levels.
Draw clean, well-structured, auto-refreshing boxes with customizable styling.
It does not attempt to predict price or generate trade signals—its function is structural visualization.
■ Notes
Zones update only when the higher timeframe completes.
Buffer zones visually emphasize areas of interest rather than single price lines.
Transparency and styling allow integration into any chart layout.
This indicator plots dynamic multi-timeframe price zones—including previous highs/lows, pivot levels, and magnetic support/resistance regions—using auto-updating boxes on the chart, allowing traders to identify high-influence price areas across higher timeframes with clarity and precision.
■ Magnetic Zones 1 – Inputs
Timeframe: Selects the higher timeframe used for generating zones (e.g., D, W, M).
Show Last: Defines how many of the most recent timeframe zones to display.
PDHL: Toggles previous-day-high/low zones.
P: Toggles the pivot level (previous period midpoint).
SR1 / SR2: Enables two sets of magnetic support/resistance zones based on volatility expansion multipliers.
Sub Color: Sets the primary color used for box borders, backgrounds, and text.
■ General Zone Settings
Box Transparency: Adjusts opacity of filled price zones.
Border Style: Selects border style (solid, dashed, dotted).
Text Size: Controls label sizing for zone annotations.
Text Alignment: Positions labels inside boxes (left, center, right).
■ Data Retrieval Logic
The script pulls higher-timeframe timestamps and close times (time, time_close) using request.security, ensuring boxes start exactly at the beginning of the selected timeframe and extend to its closing bar.
A helper function retrieves any higher-timeframe price series (high, low, midpoint, and magnetic zone values).
■ Magnetic Zone Calculation
The script computes magnetic support/resistance levels using previous-bar volatility:
prev_hl_diff = previous high − previous low
Resistance = hl2 + (multiplier × prev_hl_diff)
Support = hl2 − (multiplier × prev_hl_diff)
Two multipliers are used:
0.236 → SR1
0.786 → SR2
These create responsive zones that expand/shrink with volatility.
■ Buffer Zone Expansion
Each level generates a “buffer zone”—a small band above/below the main value—to create visually meaningful zones rather than a single flat line:
top = level + range/8
bottom = level − range/8
Buffers are applied symmetrically around each SR level.
■ Zone Types Displayed
1. PDHL Zones (Previous High / Previous Low)
Retrieved directly from the selected higher timeframe’s last completed bar.
2. Pivot Zone (P)
Based on midpoint (hl2) of the previous period.
3. Magnetic Zones SR1 / SR2
Volatility-based resistance/support zones with buffer expansion.
■ Box Rendering System
The script uses a generalized draw_box() function that draws labeled rectangles using:
timeframe start/end timestamps
top/bottom price boundaries
custom background transparency
border style and width
optional price annotations
All box references are stored in arrays for proper management and future cleanup.
■ Auto-Updating Logic
Whenever the higher timeframe changes (timeframe.change()):
New boxes are created for SR1, SR2, pivot, and PDHL levels.
Boxes extend from the higher timeframe’s opening timestamp to its closing timestamp.
Price labels include the exact value and the timeframe abbreviation.
This ensures zones remain aligned with the boundaries of each higher-timeframe candle.
■ Purpose
This indicator is designed to:
Highlight multi-timeframe price zones such as PDHL, pivots, and magnetic SR ranges.
Provide contextual support/resistance from a higher timeframe while trading lower timeframes.
Visualize volatility-driven price zones that often act as reaction levels.
Draw clean, well-structured, auto-refreshing boxes with customizable styling.
It does not attempt to predict price or generate trade signals—its function is structural visualization.
■ Notes
Zones update only when the higher timeframe completes.
Buffer zones visually emphasize areas of interest rather than single price lines.
Transparency and styling allow integration into any chart layout.
초대 전용 스크립트
이 스크립트는 작성자가 승인한 사용자만 접근할 수 있습니다. 사용하려면 요청 후 승인을 받아야 하며, 일반적으로 결제 후에 허가가 부여됩니다. 자세한 내용은 아래 작성자의 안내를 따르거나 c9indicator에게 직접 문의하세요.
트레이딩뷰는 스크립트의 작동 방식을 충분히 이해하고 작성자를 완전히 신뢰하지 않는 이상, 해당 스크립트에 비용을 지불하거나 사용하는 것을 권장하지 않습니다. 커뮤니티 스크립트에서 무료 오픈소스 대안을 찾아보실 수도 있습니다.
작성자 지시 사항
This script is provided as Invite-Only. If you would like to request access, please send me a message on my TradingView profile including your username.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
초대 전용 스크립트
이 스크립트는 작성자가 승인한 사용자만 접근할 수 있습니다. 사용하려면 요청 후 승인을 받아야 하며, 일반적으로 결제 후에 허가가 부여됩니다. 자세한 내용은 아래 작성자의 안내를 따르거나 c9indicator에게 직접 문의하세요.
트레이딩뷰는 스크립트의 작동 방식을 충분히 이해하고 작성자를 완전히 신뢰하지 않는 이상, 해당 스크립트에 비용을 지불하거나 사용하는 것을 권장하지 않습니다. 커뮤니티 스크립트에서 무료 오픈소스 대안을 찾아보실 수도 있습니다.
작성자 지시 사항
This script is provided as Invite-Only. If you would like to request access, please send me a message on my TradingView profile including your username.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.