OPEN-SOURCE SCRIPT
Aktualisiert 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.
Versionshinweise
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 Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.