How bars are built
TradingView builds each bar (candle) based on the instrument's trading session and the selected interval. These rules explain why the last bar of the day is sometimes shorter than the others, and why weekly and monthly bars start exactly where they do.
Intraday bars (1m, 5m, 1h, 2h, etc.)
Intraday bars are anchored to the session open — the bar grid is counted from the moment the trading session starts.
- When the session closes, the current bar closes at the session close, even if it hasn't reached its full length. That's why the last bar of a session can cover less time than the full interval.
- Example 1: the exchange closes at 16:00, the interval is 2 hours. If the last full bar opened at 15:00, the final bar of the day covers only 15:00–16:00 (one hour) instead of two.
- Example 2: session 09:30–16:00 (6.5 hours), the interval is 4 hours. Bars of the day: 09:30–13:30 and 13:30–16:00 — the last one lasts 2.5 hours.
- If an instrument trades in several sessions per day(e.g., with a lunch break), each session typically starts with a new bar. For some instruments, however, the sessions are built as one continuous grid, so bar building can differ.
- Example 3: sessions 09:00–11:30 and 13:00–15:00, the interval is 1 hour. Morning: 09:00–10:00, 10:00–11:00, 11:00–11:30 (short). Afternoon starts fresh: 13:00–14:00, 14:00–15:00. The 11:30–13:00 break is not included in any bar.
Daily bars (1D)
A daily bar is one trading day with all of its trading. Its open matches the start of the day's first session.
For a closed (past) daily bar, TradingView uses the values the exchange itself reports — the official Open/High/Low/Close/Volume the exchange considers the result of that trading day. These daily figures arrive essentially ready, so a finished daily bar matches the exchange's own daily data.
The current (still-open) daily bar is built live as the day trades: Open = the day's first price, High / Low = the highest / lowest price seen so far, Close = the latest trade. The bar may continue to update after the trading session closes. It is finalized when the daily data is finalized.
- Example: a stock trades 09:30–16:00 → one daily bar for the whole day.
Weekly, monthly, and multi-day/multi-week bars (5D, 2W, 3M, etc.)
Bars on these intervals are anchored to the start of the year — from the first trading day of the year/the first business day of the year.
- The last bar of the year can be incomplete — covering fewer days/weeks than the interval. This applies to weekly, monthly, yearly and custom multi-day/week/month (DWM) bars; a daily (1D) bar is always full and closed.
- Multi-day and monthly bars are cut exactly at the year boundary —they don't cross into the next year, and a new bar always starts with the new year.
- Example 4: a 3-day bar that would span December 31 and January 1 is cut off at the end of the year, and a fresh 3-day bar starts in January.
- Example 5: on a 3-month interval, bars run Jan–Mar, Apr–Jun, Jul–Sep, Oct–Dec.
- Weekly (and multi-week) bars are the exception —the week count restarts each year, but a partial week at the turn of the year is not split into a tiny stub — the leading days of January (before the first full week) are folded into the last weekly bar of the previous year, so that bar can extend a few days into January. The first weekly bar of the new year then starts with the first full week. A fully non-trading (holiday) week is skipped.
- Example 6: if January 1 is a Thursday, days Jan 1–4 belong to the previous year's last weekly bar, and the first weekly bar of the new year starts with the first full week.
Exceptions and special cases
The rules above apply to regular time-based candles on instruments with an exchange session. There are cases where they work differently:
- 24/7 crypto markets still rely on session rules — usually anchored to 00:00 UTC — to build daily bars.
- Non-time-based chart types — Renko, Range, Point & Figure, Kagi, Line Break. They are computed on top of a regular time-based series (built by the session/year rules above), but the boundaries of their elements come from price movement (a fixed box/range/reversal size), not from time or session. The result depends on the underlying resolution and the Based on real prices setting.
- Alignment can differ between exchanges. For some instruments, the grid is anchored to a "round" time (e.g., the top of the hour) rather than strictly to the session's opening minute.
- Schedule changes over time. If an instrument's trading hours have changed, historical bars are built according to the schedule that was in effect at that time, not the current one. This can happen when an exchange modifies its official trading hours or as a result of seasonal shifts, such as adjustments for summer and winter time transitions (Daylight Saving Time).
- Holidays and session corrections. On holidays and other special days, an instrument's schedule can differ from its usual one, so bars for those days are built according to that corrected schedule. Also, on some derivatives markets a single trading day can span several calendar days — for example, CME futures, whose day opens in the evening and runs into the next calendar date — so one daily bar there may cover more than one calendar date.