Time-of-Day/Session Performance Stats [QuantAlgo]🟢 Overview
The Time-of-Day/Session Performance Stats is a comprehensive time-based analysis tool built for traders who want clear, ranked insight into when markets actually move. It measures average range, volume, bullish bias, and drift across every hour of the day and the four major sessions, then surfaces the strongest and weakest windows so you can focus activity where the data supports it. Whether you trade crypto around the clock or equity and forex sessions on a weekday schedule, the indicator turns raw historical bars into practical rankings, session comparisons, and non-repainting chart overlays.
🟢 What is Time-of-Day and Session Performance?
Markets are not uniform across the 24-hour cycle. Liquidity, volatility, and participation concentrate in specific hours and sessions. Sydney is typically the thinnest of the four major centers, Tokyo drives Asian activity, London often produces the widest ranges of the day, and the London-New York overlap is usually the busiest window. By averaging range, volume, the share of up closes, and net drift for each hour and each session over a configurable lookback, this tool converts those recurring patterns into ranked statistics instead of leaving you to rely on memory or anecdotal observation.
🟢 How It Works
The indicator walks a configurable window of past bars (limited by lookback days and a hard max-bar ceiling) in the timezone you select. Every usable bar is assigned to its hour of day and to any sessions it falls inside. Range can be measured in percent of close or in raw price units. Volume, directional closes, and drift are accumulated in parallel. Hours that do not meet a minimum bar-count threshold are dropped from every ranking so tiny samples cannot distort the boards.
Five ranking boards are produced: Activity (average range), Volume (when the symbol reports it), Bias (percentage of directional bars that closed higher), Drift (mean close-minus-open percentage), and Aggregated (the mean percentile of range, volume, and directional edge). Sessions are ranked solely on average range per bar and can be toggled or given custom windows. Overlaps count toward every session involved rather than being forced into one.
Chart overlays read a trailing window of the same length rather than the final ranking, so background shading and bar coloring never repaint. The Focus Hours panel converts the Aggregated ranking into three practical allocation plans plus the single quietest hour to avoid.
🟢 Key Features
▶ Ranking Boards
Five independent boards list every qualifying hour from strongest to weakest.
1. Activity Ranking: Orders hours by average bar range. Rank 1 is the hour with the most room; the last row is the quietest. This is the simplest and often most useful single board.
2. Volume Ranking: Orders hours by average volume. Read it alongside Activity. High range on low volume signals thin participation. The board is hidden automatically on symbols that report no volume.
3. Bias Ranking: Orders hours by the percentage of directional bars that closed above their open. Flat bars are excluded, so the figure reflects only bars that actually moved. There is no separate bearish column; the bottom of the board is the most bearish reading.
4. Drift Ranking: Orders hours by mean percentage change from open to close. An hour can post a high bull rate yet still show negative drift if its losing bars are larger than its winning ones. Divergences between Bias and Drift are often the most interesting signals.
5. Aggregated Ranking: Combines percentile ranks of range, volume (when present), and directional edge into a single composite score. This is the ranking that feeds both the Focus Hours panel and the Aggregated overlay option.
▶ Session Ranking Panel
The four major sessions are ranked by average range per bar and displayed with their window, bull rate, drift, and bar count. Rank 1 takes the bullish color and the last rank takes the bearish color on the same continuous gradient used by the boards. Because a bar inside an overlap is counted toward every session it belongs to, session bar totals can exceed the overall sample size.
▶ Focus Hours Panel
The Aggregated ranking is translated into four labeled plans: Aggressive (top hour only), Mix (top two with 80/20 weights), Conservative (top three with 50/30/20 weights), and Avoid (the single quietest hour by average range). Each row shows the relevant hours, their session affiliation, bull rate, drift, and score so the reading can be acted on immediately.
▶ Chart Overlay
Background shading and price-bar coloring can be driven independently by Session Ranking, Activity Ranking, Volume Ranking, Bias Ranking, Drift Ranking, Aggregated Ranking, or Focus Hours. All overlays are computed from a trailing window so they never repaint. Transparency controls let you keep the ranking obvious or keep it subtle enough not to compete with price.
▶ Session and Filter Controls
Sydney, Tokyo, London, and New York can each be enabled or disabled and given custom HHMM-HHMM windows in the selected timezone. A weekdays-only filter removes weekend bars for forex, futures, and equities while leaving crypto fully intact. The Bars To Include setting can restrict the entire study to all bars, any enabled session, or one named session.
▶ Built-in Alerts
Ready-made alert conditions fire when price enters the peak activity hour, the quietest hour, the peak volume hour, the most bullish or most bearish hour, or the top Aggregated hour. Separate alerts cover the open and close of each individual session, any session start or end, and the start and end of the London-New York overlap.
▶ Color Presets
Six presets (Classic, Aqua, Cosmic, Cyber, Neon, Custom) apply a continuous gradient from the bullish color at rank 1 to the bearish color at the last rank across every board, panel, and overlay. Custom mode exposes individual bullish and bearish color pickers; text contrast is calculated automatically so any chosen colors remain readable.
▶ Interval Warning
When the chart interval is higher than 1 hour, most of the 24 hour buckets never receive a bar, leaving the rankings incomplete. The indicator displays a clear warning label on the chart that explains the limitation and recommends switching to 5m, 15m, 30m, or 1h, for example. The warning can be turned off once the restriction is understood and a clean chart is preferred.
Timeofday
Session Range Completion ClockThis indicator measures WHEN, inside a chosen intraday session, that session's range is actually
built. It answers a question that session tools normally skip: by a given time of day, how much of
the day's eventual range is typically already spent, and has the extreme that will define the day
usually already printed?
It draws no levels, marks nothing on price, and produces no signals. It is a measurement
instrument that reports descriptive statistics over the sessions in your loaded history.
THE UNDERLYING PRINCIPLE
A session's range is not built at a constant rate, and how it is built differs by symbol, by
session and by contract. The script assumes nothing about the shape - it measures it on whatever
instrument and window you point it at.
"How much range is left" and "is the extreme already in" are two different statistics, and the
script keeps them separate. For every completed session in the loaded history it records the
running high and low at the end of each time bucket, then waits for the session to close so the
FINAL range is known. It then attributes, for each bucket:
- the fraction of the final range that had been traversed by the end of that bucket;
- whether the session's high had already been made at or before that bucket;
- whether the session's low had already been made;
- whether both were already in place, meaning the range was finished and everything afterwards
happened inside it;
- the traversed range expressed in units of daily ATR or of the previous day's range, which makes
the figure comparable across volatility regimes.
These are accumulated across sessions and reported as means and frequencies.
HOW TO READ THE TABLE
The table is drawn once, on the last bar of the chart. Each row is a point in time, labelled with
the clock time at the end of that bucket.
"n" is the number of sessions contributing to that row. "Range built" is the mean percentage of
the session's final range already traversed. "High set" and "Low set" are the percentage of
sessions in which that extreme was already established. "Both set" is the percentage of sessions
in which the entire range was already complete; that column is shaded by value. "Range/unit" is
the mean range so far in the normalization unit selected in the inputs, which is named in the
bottom-right cell.
If the session contains more buckets than the row limit, buckets are sampled at an even stride so
the table still ends on the session's final bucket.
The pane also plots two lines during a live session: the current session's range so far, and the
mean range so far of all prior qualifying sessions at the same point in the session, both in the
same unit. That is a like-for-like comparison at equal elapsed session time. It is not a
projection and the script does not extend either line forward.
On a daily or higher chart the table prints a message instead of statistics: the whole measurement
is defined on intraday bars and there is nothing to compute.
WHAT IT DOES NOT DO
It does not predict where price will go, does not identify breakouts, and does not mark levels. A
high "Both set" figure at a given time means only that historically, on this symbol and this
session, the range was usually already complete by then. It is a frequency over past sessions, not
a statement about today, and nothing in the script says whether acting on it would be a good idea.
METHOD, AND WHY IT DOES NOT REPAINT
A session is folded into the statistics only after it has closed, so the session in progress never
contributes to its own statistics.
Historical values are never recalculated. The statistics accumulate forward in time, which means
the historical-mean line on early bars was computed from a smaller sample than the same line on
recent bars. That is deliberate; the alternative would be a curve that silently rewrites its own
past.
The daily normalization unit comes from a single bundled request on the daily timeframe. The
requested expression is offset by one bar and the request uses lookahead, which is the pair the
Pine Script documentation specifies for confirmed higher-timeframe values: the offset discards the
daily bar that is still forming and returns the one before it, which was already final. Historical
and realtime bars therefore receive the same value. This matters more here than it looks, because
the unit is latched once at session start and then used for that whole session - a unit that
differed between live and reloaded charts would give a session two different "Range/unit" figures
depending on when you looked at it.
Time buckets are anchored to the declared session start time rather than to the first bar
observed. This keeps the time-of-day axis stable on illiquid symbols, on sessions that run through
midnight, and on continuous 24-hour sessions where there is no gap between sessions to detect. A
session string containing more than one range, such as 0900-1130,1230-1500, is treated as a single
window running from the first start to the last end; buckets falling inside the break carry the
pre-break state forward, which is what you want, because the range does not reset over lunch. An
optional day mask such as 0930-1600:23456 is respected.
SETTINGS
Session and Session time zone define the window. Use the exchange's own time zone so buckets stay
aligned across daylight-saving changes.
Bucket size should be a multiple of the chart timeframe. A bucket narrower than the chart
timeframe contains no bars of its own and simply carries the previous bucket's state forward.
Minimum session completeness excludes half-days, early closes and partially loaded history, which
would otherwise depress the late-session figures. Lower it if a market you are studying
legitimately has short sessions.
Normalise range by chooses between daily ATR and the previous day's range. ATR is smoother; the
previous day's range reacts faster.
ORIGINALITY
The session and time-of-day category on this platform is overwhelmingly made of level-drawing
tools: opening-range boxes, session high/low lines, session shading. Those draw where. Very little
published measures when, and the two are different objects - this script plots nothing on price at
all.
There is a small existing family of scripts that chart the distribution of the hour at which the
daily high or low prints, and the "High set" and "Low set" columns overlap with that idea. This is
not a reskin of any of them: the accumulator here is cumulative by elapsed session time rather
than a histogram of one timestamp, it is folded only on session close, it is keyed to a
user-supplied session string with mid-session-break handling and a day mask, and it is combined
with final-range-fraction and volatility normalization. No code is borrowed from any published
script.
LIMITATIONS
Requires an intraday chart timeframe.
The sample is whatever history the chart has loaded, which on lower timeframes may be only a few
hundred sessions - check "n" before reading anything into a row.
Results are sensitive to the chart timeframe, because the exact bar on which an extreme prints is
resolution-dependent. Coarser timeframes will place extremes in later buckets than they truly
occurred.
The "Range/unit" column can be based on a smaller sample than the percentage columns, because the
earliest sessions in the loaded history have no completed daily bar to normalize against and are
skipped for that column only.
Sessions spanning a daylight-saving transition can be misattributed by one hour for a single day.
On non-standard chart types - Heikin Ashi, Renko, Kagi, Point and Figure, Range - the highs and
lows are synthetic, so the statistics describe the synthetic series rather than traded prices.
The statistics describe the loaded history only and carry no assumption that the distribution is
stable over time.
Source is open and commented.
Indicator
Session Profitability Visualizer
What it shows
Session Profitability Visualizer breaks the trading day into its 24 hours and shows, for each hour, how price has historically behaved on your chart. It answers a simple statistical question: "When this market trades at 09:00 vs. 14:00 vs. 20:00, how have bars in that hour tended to move?"
For every hour with enough data it displays a table with:
- Hour — the hour-of-day bucket (00:00–23:00) in the symbol's exchange timezone
- Cum move — the cumulative close-minus-open of all completed bars in that hour (in points, or in % if you select the percent metric)
- Bars — how many completed bars contributed to that bucket (the sample size)
- % Pos — the share of those bars that closed above their open
Rows are tinted green or red by the sign of the cumulative move, with color intensity scaled by magnitude relative to the strongest hour, so the "heavier" hours stand out at a glance. An optional (off by default) background shading tints the chart by the historical statistics of the hour the current bar belongs to.
How it works
On every completed intraday bar inside the lookback window, the script:
1. Determines the bar's hour of day using the symbol's exchange timezone (syminfo.timezone).
2. Computes the bar's move — either close − open in points, or (close − open) / open × 100 in percent, depending on the Metric input.
3. Adds that move to the hour's running sum, increments the hour's bar count, and increments a positive-bar counter when the move is positive.
The per-hour sums, counts, and positive counts are held in three 24-element arrays. The table is rendered once on the last bar from those arrays. There is no request.security() call, no reference to future data, and only confirmed bars are counted — the statistics do not repaint on historical data (the live, still-forming bar is excluded until it closes).
Inputs
- Lookback (bars) — how many recent bars feed the statistics (default 5000). Larger windows are more stable; smaller windows react faster to regime changes.
- Metric — Points (close − open) or Percent (bar return %). Percent is more comparable across price levels and long histories.
- Min samples per hour — hours with fewer completed bars than this are hidden (default 30), so thin buckets don't masquerade as meaningful.
- Table position — where the table sits on the chart.
- Shade background — optional tint of the current bar's hour by its historical stats (off by default).
How to use it
Apply it to any intraday chart (15m or 1h are good starting points — on a 15m chart each hour bucket gets four bars per session). Look for hours where the cumulative move and the % positive rate agree and the sample count is healthy; those are the hours where the market has shown a persistent directional lean on your symbol. Compare the same symbol on different lookbacks to see whether the pattern is stable or an artifact of one period.
Limitations — please read
- Hour buckets use the symbol's exchange timezone, not your chart's display timezone. A "09:00" row on NASDAQ symbols means 09:00 America/New_York regardless of your local clock.
- Bar close-minus-open is a directional proxy, not trade P&L. It ignores spreads, slippage, position sizing, and intrabar path.
- The statistics are a historical observation, not a prediction. An hour that has drifted up for 5000 bars can stop doing so at any time; sample sizes shrink quickly on higher intraday timeframes.
- The script is intraday-only by design; on daily and above it shows an explanatory message instead of statistics.
This is a statistical visualization tool. It does not generate signals or recommendations of any kind.
Indicator
Intraday RVOL Overlay: Time-of-Day Relative Volume
## Intraday RVOL Overlay — Time-of-Day Relative Volume
This indicator plots intraday relative volume directly on the price chart.
It is designed to answer a specific question:
Is today’s volume running above or below normal for this exact point in the trading session?
A standard volume moving average compares recent candles with other recent candles. That can be useful, but it does not account for the natural shape of intraday volume. Volume is usually heavier near the market open, often quieter around midday, and may increase again near the close.
This script takes a different approach. It compares today’s cumulative intraday volume with the average cumulative volume at the same time of day over previous trading sessions.
For example, if the chart is at 14:45, the script compares:
today’s cumulative volume from the start of the session up to 14:45
with
the average cumulative volume from the start of the session up to 14:45 over the selected lookback period
The result is shown as an RVOL multiple.
How RVOL is calculated
The script calculates:
RVOL = today’s cumulative intraday volume so far / average cumulative intraday volume by the same time of day
Example:
Today cumulative volume: 4.05M
Average cumulative volume by this time: 6.30M
RVOL = 4.05M / 6.30M = 0.64x
This means the symbol is trading at around 64% of its normal cumulative volume for that point in the session.
What makes this script different
This is not a basic volume moving average and it is not a standard RSI or moving-average crossover setup.
The original purpose of this script is to provide a time-of-day adjusted intraday volume comparison while keeping the information visible on the main price chart.
The script combines three ideas:
1. Cumulative intraday volume tracking
2. Historical same-time-of-day volume comparison
3. Price-chart overlay scaling
Instead of asking whether the current candle has high volume compared with the last few candles, it asks whether today’s total traded volume so far is high or low compared with what is normally expected at this stage of the session.
How to read the lines
The main RVOL line shows today’s cumulative intraday relative volume.
RVOL below 1.0x = volume is running below normal
RVOL around 1.0x = volume is running around normal
RVOL above 1.5x = volume is meaningfully above average
RVOL above 2.0x = volume is unusually strong
The script also plots reference lines:
1.0x average volume line
1.5x high-volume threshold line
If the RVOL line is below the 1.0x line, today’s cumulative volume is below average for this point in the session.
If the RVOL line is above the 1.5x line, today’s cumulative volume is meaningfully above average for this point in the session.
Important note about price scaling
RVOL is a ratio, not a price.
Because this script is plotted as an overlay on the main price chart, the RVOL values are visually mapped into a small band inside the recent price range.
This means the price-axis values shown beside the RVOL plots are only visual placement values. They are not support levels, resistance levels, targets, or actual price signals.
The overlay is price-scaled only so the RVOL information can be viewed directly alongside price action without requiring a separate indicator pane.
Inputs
Average over previous trading days
Controls how many prior trading sessions are used to calculate the average cumulative volume baseline.
Price scaling lookback bars
Controls the recent price range used to place the RVOL overlay band on the chart.
RVOL value plotted at top of band
Controls the visual cap for the overlay. For example, with a cap of 3.0, RVOL values of 3.0x or higher are plotted at the top of the visual band.
Overlay band position
Allows the RVOL band to be placed near the top or bottom of the price chart.
Overlay band height
Controls how much vertical space the RVOL overlay uses inside the price chart.
Fallback search minutes
Allows the script to look backwards for nearby historical volume slots when exact same-minute data is missing.
Suggested use
This indicator is intended for intraday charts.
Recommended chart timeframes:
5-minute
15-minute
1-hour
Supported chart timeframes:
Intraday charts from 1 minute upward
Not supported:
Seconds charts
Daily charts
Weekly charts
Monthly charts
Practical interpretation
This script can help give volume context to intraday price movement.
For example:
A price move with RVOL below 1.0x may be happening on weaker-than-normal participation.
A price move with RVOL above 1.5x may have stronger-than-normal participation.
A breakout attempt with RVOL above 2.0x may be occurring during unusually active trading.
This does not mean the move will continue. It only shows whether volume participation is above or below normal for that time of day.
Limitations
This script works best on liquid symbols with regular intraday trading activity.
Results may be affected by:
extended-hours data
half trading days
market holidays
trading halts
low-liquidity symbols
missing historical bars
unusual trading sessions
symbols with irregular volume patterns
The script does not generate buy or sell signals. It should be used as a volume context tool alongside price action, trend, liquidity, volatility, and risk management.
Disclaimer
This script is provided for educational and research purposes only. It is not financial advice. It does not predict price direction and should not be used as the sole basis for trading decisions.
Indicator
Optimal Buy Time 60 vs 252 Sessions ComparisonOptimal Buy Time — 60 vs 252 Sessions Comparison
This indicator statistically analyzes at what time of day a security tends to have its lowest price relative to the daily close, identifying the historically most favorable intraday time slots for opening a long position, whether intraday or multi-day.
How it works
For each 30-minute time slot of the NYSE session (09:30–16:00 ET) the script calculates, on a historical basis, the average return obtainable by buying during that slot and holding until the daily close. The calculation is performed over two parallel periods — 60 sessions (approximately 3 months) and 252 sessions (approximately 1 year) — allowing you to see whether a pattern is recent or structural, and whether it is improving or deteriorating.
The central table
The table displays all 13 time slots with the following data for each:
60d ret. — average return % if you buy during that slot, calculated over the last 60 sessions
60d win% — percentage of times the closing price was higher than the entry price
252d ret. — same calculation over the last year
252d win% — annual win rate
Trend — indicates whether the recent pattern is improving, deteriorating, or stable compared to the full year
Green cells indicate historically favorable buying slots, red cells indicate slots to avoid. The best slot is highlighted with a more intense green.
The colored background
During the market session the panel background colors in real time: green when you are in a historically favorable slot, red when you are in a slot to avoid.
How to set it up
Recommended timeframe: 30 minutes
Sessions to analyze: default 60 and 252 — adjustable in settings. Increasing the value improves statistical robustness but reduces sensitivity to recent changes
Good threshold %: default 0.1 — minimum average return for a slot to be considered favorable. Lowering it to 0.05 shows more green slots, raising it to 0.3 restricts them to slots with a more significant edge
Show table: enables or disables the summary table
Color background: enables or disables the real-time background color
Important notes
Times in the table are shown in both Italian time and ET (Eastern Time, New York). Italian time corresponds to ET +6 hours — verify the active time zone on your broker before trading.
Data is purely statistical and based on the historical behavior of the security. It does not constitute a buy or sell signal. Intraday patterns change over time depending on market conditions — it is recommended to periodically reassess the analysis and not to use this indicator as the sole decision-making criterion.
Fascia Oraria Ottimale di Acquisto — Confronto 60 vs 252 sedute
Questo indicatore analizza statisticamente a che ora della giornata un titolo tende ad avere il prezzo più basso rispetto alla chiusura, identificando le fasce orarie storicamente più convenienti per aprire una posizione long intraday o multi-giorno.
Come funziona
Per ogni fascia oraria da 30 minuti della sessione NYSE (09:30–16:00 ET) lo script calcola, su base storica, il rendimento medio ottenibile acquistando in quella fascia e tenendo fino alla chiusura di giornata. Il calcolo viene eseguito su due periodi in parallelo — 60 sedute (circa 3 mesi) e 252 sedute (circa 1 anno) — permettendo di vedere se un pattern è recente o strutturale, e se sta migliorando o peggiorando.
La tabella centrale
La tabella mostra tutte le 13 fasce orarie con i seguenti dati per ognuna:
60g rend. — rendimento medio % se acquisti in quella fascia, calcolato sulle ultime 60 sedute
60g succ. — percentuale di volte in cui il prezzo di chiusura è stato superiore al prezzo di acquisto
252g rend. — stesso calcolo sull'ultimo anno
252g succ. — tasso di successo annuale
Trend — indica se il pattern recente sta migliorando, peggiorando o è stabile rispetto all'anno
Le celle verdi indicano fasce storicamente favorevoli all'acquisto, le rosse fasce da evitare. La fascia migliore è evidenziata con verde più intenso.
Lo sfondo colorato
Durante la sessione di mercato lo sfondo del pannello si colora in tempo reale: verde quando sei in una fascia storicamente favorevole, rosso quando sei in una fascia da evitare.
Come impostarlo
Timeframe consigliato: 30 minuti
Sedute da analizzare: default 60 e 252 — modificabili nelle impostazioni. Aumentare il valore aumenta la solidità statistica ma riduce la reattività ai cambiamenti recenti
Soglia buona %: default 0.1 — soglia minima di rendimento medio per considerare una fascia favorevole. Abbassarla a 0.05 mostra più fasce verdi, alzarla a 0.3 le restringe alle sole fasce con vantaggio più marcato
Mostra tabella: attiva o disattiva la tabella riepilogativa
Colora sfondo: attiva o disattiva il colore di sfondo in tempo reale
Note importanti
Gli orari in tabella sono mostrati sia in ora italiana che in ET (Eastern Time, fuso di New York). L'ora italiana corrisponde a ET +6 ore in orario solare e ET +6 ore in orario legale — verificare il fuso attivo sul proprio broker prima di operare.
I dati sono puramente statistici e basati sul comportamento passato del titolo. Non costituiscono un segnale di acquisto o vendita. I pattern intraday cambiano nel tempo in funzione del contesto di mercato — si consiglia di rieseguire l'analisi periodicamente e di non utilizzare questo indicatore come unico criterio decisionale.
Indicator
Tops & Bottoms - Time of Day Report█ OVERVIEW
The indicator tracks and reports the percentage of occurrence of daily tops and bottoms by the time of the day.
█ CONCEPTS
At certain times during the trading day, the market reverses and marks the high or low of the day. Tops and bottoms are vital when entering a trade, as they will decide if you are catching the train or being straight offside. They are equally crucial when exiting a position, as they will determine if you are closing at the optimal price or seeing your unrealized profits vanish.
This indicator is before all for educational purposes. It aims to make the knowledge available to all traders, facilitate understanding of the various markets, and ultimately get to know your trading pairs by heart.
Tops and bottoms percentage of occurrence on EURGBP (London time).
Up days versus down days on EURUSD (London time).
█ FEATURES
Selectable time zones
Present the column chart in your local time zone (or other market participants).
Configurable time range filter
Select the period to report from.
Day type filter
Analyze all days, or filter only up days or down days.
█ HOW TO USE
Plot the indicator and visit the 1-hour or 30-minute timeframe.
█ NOTES
Timeframe choice
The 1-hour timeframe produces a higher number of days sampled. Prefer the usage of the 30-minute timeframe when your market starts at 9:30 AM.
Daylight Saving Time (DST)
The exchange time and geographical time zone options may observe Daylight Saving Time, unlike UTC+0.
High of Day Low of Day hourly timings: Statistics. Time of day %High of Day (HoD) & Low of Day (LoD) hourly timings: Statistics. Time of day % likelihood for high and low.
//Purpose:
To collect stats on the hourly occurrences of HoD and LoD in an asset, to see which times of day price is more likely to form its highest and lowest prices.
//How it works:
Each day, HoD and LoD are calculated and placed in hourly 'buckets' from 0-23. Frequencies and Percentages are then calculated and printed/tabulated based on the full asset history available.
//User Inputs:
-Timezone (default is New York); important to make sure this matches your chart's timezone
-Day start time: (default is Tradingview's standard). Toggle Custom input box to input your own custom day start time.
-Show/hide day-start vertical lines; show/hide previous day's 'HoD hour' label (default toggled on). To be used as visual aid for setting up & verifying timezone settings are correct and table is populating correctly).
-Use historical start date (default toggled off): Use this along with bar-replay to backtest specific periods in price (i.e. consolidated vs trending, dull vs volatile).
-Standard formatting options (text color/size, table position, etc).
-Option to show ONLY on hourly chart (default toggled off): since this indicator is of most use by far on the hourly chart (most history, max precision).
// Notes & Tips:
-Make sure Timezone settings match (input setting & chart timezone).
-Play around with custom input day start time. Choose a 'dead' time (overnight) so as to ensure stats are their most meaningful (if you set a day start time when price is likely to be volatile or trending, you may get a biased / misleadingly high readout for the start-of-day/ end-of-day hour, due to price's tendency for continuation through that time.
-If you find a time of day with significantly higher % and it falls either side of your day start time. Try adjusting day start time to 'isolate' this reading and thereby filter out potential 'continuation bias' from the stats.
-Custom input start hour may not match to your chart at first, but this is not a concern: simply increment/decrement your input until you get the desired start time line on the chart; assuming your timezone settings for chart and indicator are matching, all will then work properly as designed.
-Use the the lines and labels along with bar-replay to verify HoD/LoD hours are printing correctly and table is populating correctly.
-Hour 'buckets' represent the start of said hour. i.e. hour 14 would be populated if HoD or LoD formed between 14:00 and 15:00.
-Combined % is simply the average of HoD % and LoD %. So it is the % likelihood of 'extreme of day' occurring in that hour.
-Best results from using this on Hourly charts (sub-hourly => less history; above hourly => less precision).
-Note that lower tier Tradingview subscriptions will get less data history. Premium acounts get 20k bars history => circa 900 days history on hourly chart for ES1!
-Works nicely on Btc/Usd too: any 24hr assets this will give meaningful data (whereas some commodities, such as Lean Hogs which only trade 5hrs in a day, will yield less meaningful data).
Example usage on S&P (ES1! 1hr chart): manual day start time of 11pm; New York timezone; Visual aid lines and labels toggled on. HoD LoD hour timings with 920 days history:
Indicator
Statistics: High & Low timings of custom session; 1yr historyGet statistics of the Session High and Session Low timings for any custom session; based on around 1yr of data.
//Purpose:
-To get data on the 'time of day' tendencies of an asset.
-Narrow in on a custom defined session and get statistics on that session.
//Notes:
-Input times are always in New York time (but changing the timezone after setting WILL adust both table stats and background highlight correctly.
-For particularly long sessions, make sure text size is set to 'tiny' (very long vertical table), or adjust table to display horizontally.
-You'll notice most assets show higher readings around NY equities open (9:30am NY time). Other assets will have 'hot-spots' at other times too.
-Timings represent the beginning of a 15m candle. i.e. reading for 15:45 represents a high occurring between 15:45 and 1600.
-Premium users should get 20k bars => around 1year's worth of data on a 15minute chart. Days of history is displayed in the top left corner of the table.
//Limitations
-only designed and working on 15minute timeframe (to gather a full year of meaningful/comparable % stats, need 15minute 'buckets' of time.
-sessions cannot cross through midnight, or start at midnight (00:15 is ok). 00:15 >> 23:45 is the max session length. On BTC, same applies but 01:00 instead of midnight (all in NY time).
-if your session crosses through 'dead time' (e.g. 17:00-18:00 S&P NY time); table will correctly omit these non-existent candles, but it will add on the missing hour before the start time.
//Cautionary note:
-Since markets are not uncommonly in a trending state when your defined session starts or ends, the high/low timings % readings for start and end of session may be misleadingly high. Try to look for unusually high readings that are not at the start/end of your session.
Wheat (ZW1!) 15min chart; Table displayed vertically:
Nasdaq (NQ1!) 15m chart; Table displayed horizontally and with smaller text to view a very long custom session:
Indicator
Volume+ (Time of Day)This volume indicator measures the volume for each bar at the time of day and displays the average and +1 standard deviation above that average.
The color intensity of the bar is increased when the volume exceeds +1 standard deviation.
See how on the chart that other than the early morning and late day volume, there are clearly key moments in the day at 7am, 10am, 10:30am, and 11am. See how on the second day, there were volume spikes before 10am, 10:30am and then more obviously just before 11am.
Indicator
Time of Day - Volatility Report█ OVERVIEW
The indicator analyses the volatility and reports statistics by the time of day.
█ CONCEPTS
Around the world and at various times, different market participants get involved in the markets. How does this affect the market?
Knowing this gets you better prepared and improves your trading. Here are some ideas to explore:
When is the market busy and quiet?
What time is it the most volatile?
Which pairs in your watchlist are moving while you are actively trading?
Should you adjust your trading time? Should you change your trading pairs?
When does your strategy perform the best?
What entry times do your winners have in common? What about the exit times of your losers?
Is it worth keeping your trade open overnight?
Bitcoin (UTC+0)
Gold (UTC+0)
Tesla, Inc. (UTC+0)
█ FEATURES
Selectable time zones
Display the statistics in your geographical time zone (or other market participants), the exchange time zone, or UTC+0.
Configurable outputs
Output the report statistics as mean or median.
█ HOW TO USE
Plot the indicator and visit the 1H timeframe.
█ NOTES
Gaps
The indicator includes the volatility from gaps.
Calculation
The statistics are not reported from absolute prices (does not favor trending markets) nor percentage prices (does not depict the different periods of volatility that markets can go through). Instead, the script uses the prices relative to the average range of previous days (daily ATR).
Extended trading session
The script analyses extended hours when activated on the chart.
Daylight Saving Time (DST)
The exchange time or geographical time zone selected may observe Daylight Saving Time. For example, NASDAQ:TSLA always opens at 9:30 AM New York time but may see different opening times in another part of the globe (New York time corresponds to UTC-4 and UTC-5 during the year).
Indicator
Highlight Trading Window (Simple Hours / Time of Day Filter)As the name says this is a straightforward way to highlight the times of day that you are interested in studying.
Like to trade just a market open, or highlight a full session?
Could also be used negatively to "block out" a window of time each day.
Usage:
Just set your preferred time zone and then your time window (start and end).
Hope you find it useful! 😁
Indicator
Time-of-Day DeviationCreates a 'Time-of-Day' Deviation cone starting from the first bar of the session based upon data from previous days.
Indicator












