OPEN-SOURCE SCRIPT
Updated TB DayProfile (stabil)

TB DayProfile Indicator
The TB DayProfile plots intraday price movements relative to the current day’s opening price. Each bar is shifted so that the daily open acts as a fixed zero line, making it easy to see how far the market has moved above or below the open during the session.
The indicator includes:
Relative intraday bars (iOpen, iHigh, iLow, iClose): Displayed as a custom bar chart, showing price action normalized to the day’s open.
Zero line with color signals: Turns green if the number of consecutive bars above the open exceeds a user-defined threshold, or red if below.
ATR reference bands: Daily ATR(5) from the previous day (scaled by 0.25) is plotted as upper and lower bands, helping to gauge typical intraday ranges.
This tool helps traders quickly identify whether the market is trending strongly away from the daily open, or if price is reverting back toward it, independent of the chosen chart timeframe.
The TB DayProfile plots intraday price movements relative to the current day’s opening price. Each bar is shifted so that the daily open acts as a fixed zero line, making it easy to see how far the market has moved above or below the open during the session.
The indicator includes:
Relative intraday bars (iOpen, iHigh, iLow, iClose): Displayed as a custom bar chart, showing price action normalized to the day’s open.
Zero line with color signals: Turns green if the number of consecutive bars above the open exceeds a user-defined threshold, or red if below.
ATR reference bands: Daily ATR(5) from the previous day (scaled by 0.25) is plotted as upper and lower bands, helping to gauge typical intraday ranges.
This tool helps traders quickly identify whether the market is trending strongly away from the daily open, or if price is reverting back toward it, independent of the chosen chart timeframe.
Release Notes
TB DayProfile (stable) — Indicator Description & ChangelogOverview
TB DayProfile visualizes intraday price action **relative to the current day’s open**. It re-centers each bar around today’s open, highlights momentum streaks above/below that open, shows symmetric **ATR-based bands** from the **previous day’s ATR**, and (optionally) plots a **day-specific VWAP**—also expressed relative to today’s open. The study lives in its own pane (`overlay=false`).
How it works
* **Day anchor:** On each new calendar day, the script locks the day’s open (`todaysOpen`) and computes `iOpen/iHigh/iLow/iClose` as price minus that open.
* **Streak logic:** It counts consecutive closes above or below `todaysOpen`. When the count exceeds user thresholds, the zero line color shifts (green for up-streak, red for down-streak).
* **ATR envelope:** Pulls **previous day’s ATR** on the daily timeframe and multiplies it by a user-defined factor to form **symmetric upper/lower bands** around zero (i.e., around the day’s open in the relative scale).
* **Day VWAP (optional):** Computes a fresh VWAP each day using cumulative `(HLC3 × Volume) / Volume`, then plots **VWAP − todaysOpen** in the same relative scale.
* **Day separators:** Draws **vertical dotted lines** at each day change. Optional alternating background stripes can provide an additional day-by-day visual rhythm.
Inputs
* `BarsUp` / `BarsDown`: thresholds for consecutive closes above/below the day’s open (affects zero-line color).
* `ATR Length (Daily)`: ATR length used on the **daily** timeframe.
* `Band = prev ATR ×`: multiplier for the prior day’s ATR to size the bands.
* Toggles:
* **Vertical day separators** (on by default)
* **Alternating daily background** (off by default)
* **Show Day-VWAP** (on by default)
Plots
* **TB\_DayProfile**: Re-centered bar chart of intraday OHLC vs. today’s open (green if `iClose ≥ iOpen`, red otherwise).
* **Zero (Today’s Open)**: Horizontal line at 0; color reflects up/down streak condition.
* **Upper/Lower ATR band**: Symmetric guides at `±(prevDailyATR × multiplier)`.
* **Day VWAP (rel)** (optional): `VWAP − todaysOpen` as a line on the same scale.
Notes
* **Symbols without volume:** Day VWAP requires volume; on instruments with no volume (some indices/FX feeds) it will be `na`.
* **No `timeframe` arg in `indicator()`:** The script creates drawings (day separators), so it **does not** set a `timeframe` parameter in `indicator()` to avoid side-effect context errors.
* **Resets per day:** Streak counters and VWAP accumulators reset on `timeframe.change("D")`.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.