OPEN-SOURCE SCRIPT

Daily/Weekly Swing Highs-Lows + Candle Patterns

145
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.


면책사항

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