Daily Borders with Weekday Labels[fitfatq]

This indicator displays daily vertical border lines and the previous day’s weekday label on intraday charts (i.e., charts with a timeframe lower than Daily). It draws a vertical line at the start of each new trading day and places a label displaying the previous day’s weekday (e.g., Monday) at the horizontal midpoint between the previous and the current day. Users can customize various visual aspects such as the separator line style and width, label style, text color, and text size. Additionally, the indicator offers an option to fix the label’s Y coordinate at a specified price level to prevent it from being overlapped by candlesticks.
Parameter Details
Use Fixed Weekday Label Y Coordinate
- Type: Boolean
- Default: false
- Description: When enabled, the weekday label’s vertical position will be fixed at a specified price level (see next parameter). Otherwise, the label’s Y position is determined dynamically (typically based on the current bar’s low minus 3 ticks).
Fixed Weekday Label Y Coordinate (price)
Type: Float
Default: 130.0
Description:
This parameter sets the fixed price level at which the weekday label will be displayed if the "Use Fixed Weekday Label Y Coordinate" option is enabled. Please input a value that corresponds to your chart’s price scale (e.g., 130.50). Note: In charts with high price levels (for example, stocks trading at 3000 or above), it is recommended to set this value to 3000 or above. The higher the value, the closer the label will appear to the candlesticks.
Separator Line Style
Type: String (Options: "Solid", "Dotted", "Dashed")
Default: "Dotted"
Description: Specifies the style of the vertical separator line drawn at the start of each new day. "Solid" displays a continuous line, "Dotted" shows a dotted line, and "Dashed" provides a dashed line.
Separator Line Width
Type: Integer
Default: 1
Description: Determines the thickness of the separator line. A higher number results in a thicker line; the minimum value is 1.
Label Style
Type: String (Options: "None", "Label Up", "Label Down", "Label Left", "Label Right", "Label Center")
Default: "None"
Description: Sets the built-in style for the weekday label. "None" means no background or border (plain text only), while other options apply predefined visual effects.
Text Color
Type: Color
Default: Black
Description: Determines the text color of the weekday label.
Label Text Size
Type: String (Options: "Tiny", "Small", "Normal", "Large", "Huge")
Default: "Normal"
Description: Specifies the text size of the weekday label. Adjust according to preference to ensure the label is readable.
Usage Summary
How It Works:
The indicator detects the start of a new trading day using a change in the daily timeframe (via ta.change(time("D"))). When a new day begins, it draws a vertical separator line at the first bar of that day. If previous day data is available, the indicator calculates the horizontal midpoint between the start of the previous day and the current day and displays the previous day’s weekday label at that position. If the fixed Y coordinate option is enabled, the label is drawn at the specified price level; otherwise, it is positioned relative to the current bar’s low.
Customization:
Users can adjust all visual aspects, including the line style and width as well as the label style, text color, and text size. The fixed Y coordinate option allows the label’s vertical position to remain constant, which helps prevent overlapping with price bars.
Chart Requirement:
This indicator only operates on intraday charts (timeframes lower than Daily) and will not display on Daily or higher timeframe charts.
License
This indicator is released under the Mozilla Public License 2.0. Please credit the original author (fitfatq) when using or sharing this script.
Only two label Y‑coordinate modes remain: fixed price or default (low minus 3 ticks).
Removed all relative‑percentage positioning and related inputs.
Label text size is now directly numeric and mapped internally.
Modification Summary
Deleted positionMode dropdown, relativePct, visibleBars, and all table‑related code.
Replaced with a single useFixedLabelY checkbox to switch between fixed price and default position.
Retained original comments and tooltips in both English and Chinese.
Weekday Offset Instructions
Default weekdayCorrection = 0 for U.S. markets (NYSE/NASDAQ).
For Taiwan stocks (TSE), set weekdayCorrection = -1.
Adjust for other exchanges based on local time‑zone differences.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.
Declinazione di responsabilità
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.