OPEN-SOURCE SCRIPT
업데이트됨

Daily Structure Map

338
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.
릴리즈 노트
Week separator logic, short-vs-long name toggle, 1H-only restriction, custom horizontal offsets, background mode — all overkill for "minimum"
릴리즈 노트
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
릴리즈 노트
Levels:

PDH / PDL / PDC — Previous Day High, Low, Close
PWH / PWL — Previous Week High, Low
PMH / PML / PMC — Previous Month High, Low, Close
릴리즈 노트
## 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"

면책사항

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