OPEN-SOURCE SCRIPT
ที่อัปเดต:

Daily/Weekly Swing Highs-Lows + Candle Patterns

820
Description
Daily/Weekly Swing Highs-Lows + Candle Patterns

This indicator plots the most recent Daily and Weekly Swing Highs and Lows (key support/resistance levels) using a simple and effective logic: a swing high/low is confirmed when the previous bar's extreme is higher/lower than both the current and the one before it.

Features:
• Daily Swing Highs/Lows (teal/maroon circles) – toggleable
• Weekly Swing Highs/Lows (blue/purple circles) – optional
• Visual separators for new daily and weekly bars (light background color)
• Daily candle pattern labels (optional):
- US = Up Swing (strong bullish continuation)
- DS = Down Swing (strong bearish continuation)
- IN = Inside Bar
- OUT = Outside Bar
• Daily close position labels (optional):
- P = Positive (close in upper 25% of the range)
- mP = minor Positive (50–75%)
- mN = minor Negative (25–50%)
- N = Negative (lower 25%)

All elements are fully customizable (colors, visibility) and work on any timeframe.

Best suited for intraday timeframes (1 min to 4 hours) where daily and weekly key levels provide important context for price action and reversals.

The optional "Trading session length" input is mainly useful for markets with shorter sessions (e.g., European indices) and does not affect swing detection.

Open-source, free to use and modify.


How to Use the Indicator + Practical Use Case
Key Settings (Inputs)
Trading session length (hours) → Default 8.5 h (useful for FTSEMIB, DAX, etc.). Leave it as is unless you trade a market with a different session length.
Daily Swing Levels → Show/Hide daily swing highs (teal) and lows (maroon).
Weekly Swing Levels → Usually keep off on intraday charts to avoid clutter (turn on for higher-timeframe context).
Daily Candle Patterns → Enable only if you want to see US/DS/IN/OUT labels on the daily close.
Close Position (P/mP/mN/N) → Enable if you want to quickly see how strong/weak the daily close was.

What You See on the Chart
Teal circles = Last confirmed daily swing high (resistance).
Maroon circles = Last confirmed daily swing low (support).
Blue/purple circles (if enabled) = Weekly swing high/low.
Light gray background = Start of a new trading day.
Purple background (if weekly enabled) = Start of a new week.
Small labels on daily close (if enabled):
- US = strong bullish day
- DS = strong bearish day
- IN = inside bar (consolidation)
- OUT = outside bar (expansion)
- P/mP/mN/N = how far the close was from the high/low of the day.

Best Timeframes 1 min to 240 min charts → Daily levels act as major support/resistance zones for intraday trading.
Avoid using on daily or higher charts (the logic is designed for intraday context).

Why this works well intraday:
The daily swing high/low levels are high-probability zones where institutions and algorithms often defend positions. On intraday charts, they act as “magnets” for price, giving you clean entries and exits with clear invalidation levels.
This indicator keeps your chart clean while providing exactly the context most intraday traders need: key daily levels + daily momentum context.


เอกสารเผยแพร่
What's New in This Version (Update Notes)

New Feature:
Volume-Based Conviction Coloring for Daily Swing Levels
This update introduces a subtle but powerful enhancement to the daily swing high/low circles by adding volume trend context to help assess the strength and reliability of each swing level.

Key changes and additions:
Volume Rate-of-Change (ROC) Filter – Now calculates a smoothed daily volume ROC to determine whether volume has been expanding or contracting in the recent period leading up to the swing formation.

Dynamic Transparency Coloring – Daily swing circles (both resistance and support) now adjust their opacity based on the prevailing volume trend:
- Bold/solid (low transparency) when volume is expanding (smoothed ROC > 0) → indicates higher conviction and institutional participation.
- Faded/semi-transparent (higher transparency) when volume is contracting (smoothed ROC ≤ 0) → suggests weaker or less convincing swings.

Fully Customizable – New inputs under the "Volume rate-of-change" group:
ROC Length (default: 10 days)
SMA Length for smoothing (default: 5 days)
Transparency levels for strong vs. weak volume states (default: 0 for strong, 50 for weak)

This addition helps traders quickly distinguish between high-probability swings backed by rising volume and potentially less reliable ones formed during volume dry-ups — all without adding clutter or extra plots.

All other original features remain unchanged:
Clean daily/weekly swing high/low levels
Optional US/DS/IN/OUT daily candle pattern labels
Close position labels (P/mP/mN/N)
New day/week background shading
Session length input (still present for future use)

This version keeps the indicator lightweight and focused while giving experienced traders an extra layer of confluence directly on the key levels.Ideal for intraday traders who want to prioritize bounces or breaks at swings formed with genuine volume support.

Open-source as always — enjoy the update!

เอกสารเผยแพร่
Update overview
No functional modifications.
Minor changes : graph correction plus "tooltip" added in the section hours input.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน