ICT-|D·W·M|-[DIV]

25,00
1. Overview

Instantly visualize the time structure on your charts with this simple and efficient indicator. It automatically plots vertical lines to mark the start of each new trading day, week, month, quarter, and year. Helping you segment price action, this tool allows you to seamlessly understand the temporal context of the market. It is an essential addition for multi-timeframe analysis, identifying key period-open levels, and massively improving the visual clarity of your trading workspace.


2. Logic

2.1. Time Period Detection: The script dynamically evaluates bar timestamps to pinpoint exactly when a new daily, weekly, monthly, quarterly, or yearly session begins.

2.2. ICT True Day Alignment: Instead of relying purely on local or exchange time, the logic includes a precise option to use New York Midnight as the true start of the period. This ensures your vertical dividers align perfectly with standard session opens and ICT methodologies.

2.3. Smart Vertical Reach & Gapping: To prevent full vertical lines from cluttering your price action, the indicator calculates the absolute highs and lows of the visible chart. By adjusting the "Reach Scale", the indicator can create a "Center Gap," drawing lines only at the top and bottom extremes while keeping the middle of your chart pristine.

2.4. Dynamic Label Stacking: The script intelligently stacks labels (Daily, Weekly, Monthly) using an automated tier-gap system and customizable edge offsets. This guarantees that labels never overlap or block each other, regardless of your zoom level.


3. Settings & Options

3.1. Dynamic Grey-Out UI: This indicator features a clean, master-dependent settings interface. By utilizing the latest Pine Script v6 UI controls, disabling any master toggle (e.g., turning off Monthly lines) will automatically grey out all of its related colors, styles, and label inputs. This smart grouping eliminates menu clutter and ensures your settings panel remains highly intuitive and easy to navigate at all times.

3.2. Display Divider Lines Settings
  • Timeframe Toggles: Independently show or hide Daily, Weekly, Monthly, Quarterly, and Yearly divider lines.
  • Past Bars: Define how many historical bars are evaluated (up to 5000) to keep your chart uncluttered and optimize loading performance.
  • Center GAP / Vertical Reach: Controls how far the lines extend from the top and bottom towards the center (e.g., a 0.5 value leaves a 50% gap in the middle of the chart).
  • Extend Lines Outward: Ensures line segments extend infinitely outward to hit the absolute top and bottom boundaries of your visible chart pane.

3.3. Master Label Controls
  • Show Labels (Master Switch): Globally toggle all text labels on or off with a single click.
  • Label Edge Offset (%): Adjust the vertical distance of the labels from the absolute top or bottom price of the loaded range.

3.4. Period-Specific Styles (Daily, Weekly, Monthly)
  • Use ICT True Day: Toggle the NY Midnight alignment on or off for the respective timeframes.
  • Label Options: Toggle text labels on or off. For the Daily settings, choose whether to plot or hide Sunday labels specifically.
  • Label Formatting: Set the Vertical Position (Top/Bottom), Format (Short vs. Full text), Size, and Font Style (Normal, Bold, Italic).
  • Line Aesthetics: Fully customize the Line Style (Solid, Dashed, Dotted), Line Width (1-5), and Line Color.

3.5. Quarterly & Yearly Styles
  • Line Aesthetics: Dedicated Line Style, Width, and Color settings specifically tailored for higher macro timeframes.
  • Quarterly/Yearly Size: Specific sizing controls for higher timeframe text labels.


4. Under the Hood: Engineered for Performance

This indicator is built from the ground up utilizing the absolute latest native Pine Script v6 functionality, ensuring maximum performance and zero chart lag:

  • User-Defined Types (UDTs) & Methods: Employs advanced custom data structures to cleanly handle visual states, keeping execution highly optimized while avoiding namespace clutter.
  • Optimized Execution via Native Switches: Replaces intensive conditional chains with native switch blocks, which are magnitudes faster for the engine to compute on high-frequency timeframes.
  • Memory Bounds Management: Arrays dynamically synchronize and strictly cap at their defined limits. This precise memory management prevents bloat and eliminates lagging loops on the final bar state.
  • Massive API Call Reduction: Instead of calculating and redrawing coordinates on every single bar tick, the engine elegantly computes, centers, and anchors labels exactly once when the specific period naturally closes.
  • Strict Typing Defenses: Uses advanced type declarations (such as simple strings) to guarantee constant-time execution and completely safe formatting renders across all symbols.
  • Master-Dependent UI Controls: Takes full advantage of Pine Script v6's dynamic input configurations (utilizing the [code]active[/code] parameter) to instantly grey out inactive settings. This delivers a polished, professional-grade user interface that adapts in real-time to user toggles, making the script visually cleaner both on the chart and inside the settings menu


5. Link to TradingView Publication

https://www.tradingview.com/script/mHCy6Deu-ICT-D-W-M-DIV-Vertical-Divider-Lines/


6. Link to WHOP Product Page

https://whop.com/ric-t/ict-d-w-m-div