OPEN-SOURCE SCRIPT
Zaktualizowano Daily Structure Map

Plots key daily price levels and detects significant gap movements between sessions, helping traders quickly identify where price opened and closed relative to the previous day.
Features:
Daily Open & Close lines — color-coded red/green based on current price position, so you instantly know if price is trading above or below key daily levels
Day Separators — dashed vertical lines that mark the start of each new trading day, working consistently across all instruments including 24/7 markets like gold (XAUUSD) and crypto
GAP Signal — cross markers that fire when the percentage difference between two consecutive daily closes exceeds a configurable threshold, highlighting meaningful breakout gaps
Alerts — built-in long and short gap breakout alerts you can set and forget
Best used on intraday timeframes (1m–1H) to see daily structure overlaid on your lower timeframe charts. Fully customizable threshold, separator color, and timeframe seeker to adapt to any instrument or trading style.
Features:
Daily Open & Close lines — color-coded red/green based on current price position, so you instantly know if price is trading above or below key daily levels
Day Separators — dashed vertical lines that mark the start of each new trading day, working consistently across all instruments including 24/7 markets like gold (XAUUSD) and crypto
GAP Signal — cross markers that fire when the percentage difference between two consecutive daily closes exceeds a configurable threshold, highlighting meaningful breakout gaps
Alerts — built-in long and short gap breakout alerts you can set and forget
Best used on intraday timeframes (1m–1H) to see daily structure overlaid on your lower timeframe charts. Fully customizable threshold, separator color, and timeframe seeker to adapt to any instrument or trading style.
Informacje o Wersji
Week separator logic, short-vs-long name toggle, 1H-only restriction, custom horizontal offsets, background mode — all overkill for "minimum"Informacje o Wersji
Separator settings group — color, style (Solid/Dashed/Dotted dropdown), and width (1–5)Open/Close span settings group — same three controls for the horizontal day spans, since you'll likely want those styled too
Inputs grouped — group="..." parameter organizes the settings panel into clear sections instead of one long list
Style strings get converted to Pine's line.style_* constants via ternary lookup
Informacje o Wersji
Levels:PDH / PDL / PDC — Previous Day High, Low, Close
PWH / PWL — Previous Week High, Low
PMH / PML / PMC — Previous Month High, Low, Close
Informacje o Wersji
## Changelog — v1.1.0**Released:** May 2026
### Added
- **Levels** section: 8 previous-period reference lines drawn as right-extending rays anchored to their origin bars
- PDH, PDL, PDC — previous day high, low, close
- PWH, PWL — previous week high, low
- PMH, PML, PMC — previous month high, low, close
- Each level has its own toggle and color picker
- Shared line style (Solid / Dashed / Dotted) and width controls for all levels
- Right-side labels (PDH, PDL, etc.) that stay pinned to the latest bar
- Master "Show Levels" and "Show Labels" toggles
### Changed
- Daily open and previous close now render as **horizontal lines spanning the full width of each day** instead of per-bar dot stacks
- Open/Close Spans moved into its own settings group with color, style, and width controls
- Day Separators settings split into a dedicated group with color, style (Solid / Dashed / Dotted), and width controls
- Day-of-week labels (Mon, Tue, Wed…) shown above each new day with a color picker
- Indicator renamed from "Daily Close GAP Detector" to **Daily Structure Map**
- `max_bars_back` raised from 1000 to 5000 as a safety net
### Fixed
- Day separators not appearing on 24/7 instruments (XAUUSD, crypto). Now uses `ta.change(time("D"))` which works on all session types
- PML / PMH / PWL / PWH not drawing on lower timeframes due to `max_bars_back` lookback limits. Origin bars are now captured in real time as new highs/lows form, instead of being looked up via historical bar references
### Migration notes
- Existing alerts (`SHORT GAP BREAKOUT`, `LONG GAP BREAKOUT`) are unchanged
- Default settings reproduce a similar visual to v1.0 — no action needed after upgrade
- If you previously hid the dotted open/close circles by setting a transparent color, you can now toggle them off via "Show Daily Open/Close Spans"
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.