Almost every intraday strategy has a time-of-day signature. Liquidity, volatility, and participation change across the session, and a strategy that thrives in the open's volatility may bleed through the lunch chop. Yet the TradingView Strategy Tester reports one set of aggregate numbers for the whole session, as if 9:30 AM and 1:00 PM were the same market. This guide covers a practical method for time-of-day backtest analysis: bucket trades by entry hour, then — the step almost everyone skips — test whether each hour's edge actually persists across time instead of trusting a single heatmap.
Step 1: Get the trade-level data out of TradingView
Hour-level analysis needs individual trades, not summary statistics, so start by exporting the Strategy Tester report as an .xlsx file — the "List of trades" sheet contains entry Date/Time and P&L for every trade. If you haven't done this before, the full walkthrough (including parsing traps) is in How to Export TradingView Strategy Tester Results to Excel.
One trap matters more here than anywhere else: the export has no timezone metadata. Timestamps are in whatever timezone your chart was set to. If you compute an hourly breakdown assuming the wrong timezone, every bucket is shifted and your "9 AM edge" might actually be an 11 AM pattern. Write down the chart timezone before you export.
Step 2: Bucket trades by entry hour
Group every closed trade by the hour of its entry timestamp and compute, per bucket: total net P&L, trade count, win rate, and average P&L per trade. Entry hour — not exit hour — is the standard choice because it's the moment the strategy decided to act, which is the thing you'd hypothetically be filtering.
The result is a simple table. Here's the shape of a typical one:
| Entry hour | Trades | Net P&L | Win rate |
|---|---|---|---|
| 09:00 | 142 | +$4,210 | 54% |
| 10:00 | 128 | +$1,870 | 51% |
| 12:00 | 96 | −$1,540 | 44% |
| 14:00 | 88 | +$2,930 | 49% |
At this point most write-ups stop and declare the green hours "your best trading hours." This is exactly where the analysis is most likely to fool you.
Before reading anything into the table, check the trade counts per bucket. Statistical honesty scales with sample size: an hour with 140 trades supports a description; an hour with 12 trades supports a shrug. Thinly-populated buckets — common at session edges and overnight hours — will happily display extreme win rates and dramatic totals that are pure small-sample noise. A reasonable habit is to grey out any bucket below a minimum count (say, 30 trades) in your own analysis and treat whatever it shows as unrated.
Step 3: The problem with a single heatmap
A per-hour total is one number summarizing years of data. It cannot distinguish between two radically different situations:
- Hour A: +$3,000 total, earned as small consistent gains month after month across the whole sample.
- Hour B: +$3,000 total, all of it from one explosive month two years ago, flat-to-negative ever since.
On the heatmap these hours look identical. Statistically they could hardly be more different: Hour A describes a persistent historical pattern; Hour B describes one lucky stretch. With ~100 trades per bucket, a couple of outlier trades landing in one hour is enough to paint it deep green.
Step 4: Test persistence with rolling windows
The fix is to add a time dimension back into the analysis. For each entry hour, slice the backtest history into rolling windows — for example, every 3-month span, stepped forward through the sample — and ask a binary question of each window: was this hour net profitable in this window? The share of windows where the answer is yes is that hour's Stability %.
An hour that was profitable in 9 of 10 windows scores 90% — the pattern showed up almost everywhere in the sample. An hour whose entire profit came from one hot month might score 30% — profitable in only 3 of 10 windows despite a green total. As descriptive bands:
- >70% — persistent. The hour was profitable in most windows across the sample.
- 40–70% — mixed. The result depends heavily on which stretch of history you look at.
- <40% — inconsistent. The headline total is likely concentrated in a small number of windows.
Running this at multiple window lengths (1, 3, and 6 months) adds robustness: an hour that scores well at every window length is describing something structural about the sample; one that only looks good at a single length is more fragile. This is the computation behind DataViz Studio's Rolling Window heatmap (a Pro feature), which ranks each entry hour by Stability % across 1/3/6-month rolling windows. Doing it by hand in a spreadsheet is possible — it's a windowed group-by per hour — just tedious enough that most people never actually do it, which is precisely why single-heatmap conclusions are so common.
Step 5: Explore hour-filter scenarios — with the right caveat
Once you know which hours were persistently profitable in the sample, the natural next question is: what would the equity curve have looked like restricted to those hours? Active Window Analysis (available on the Plus plan) builds these hour-filter scenarios with an equity curve per scenario, so you can see how the filtered subsets behaved historically.
The honest caveat — which DataViz Studio also shows in-app: hour-filtering a backtest after the fact is path-dependent. Positions interact across hours; a trade entered at 10:00 may have only existed because a 9:00 trade closed and freed up the position. A strategy actually restricted to certain hours live may behave differently than the filtered historical subset suggests. Treat filtered equity curves as descriptive scenarios of the historical sample, not as forecasts of a modified strategy.
And to keep the compliance framing explicit: none of this tells you when you should trade. It tells you when this strategy, on this instrument, over this sample, historically made or lost money — and how consistently. What you do with that description is a separate decision involving factors no backtest contains.
A worked checklist
- Note the chart timezone, then export the Strategy Tester report as .xlsx.
- Exclude open positions (they appear as fake exit rows dated at export time).
- Bucket closed trades by entry hour; compute P&L, count, and win rate per bucket.
- Discount buckets with few trades — a 12-trade hour is an anecdote, not a bucket.
- Compute Stability % per hour across 1/3/6-month rolling windows; trust persistent hours over big-total hours.
- Optionally build hour-filter scenarios, holding the path-dependency caveat in mind.
If you want the first pass without any spreadsheet work, the free instant report shows P&L by entry hour plus a best-hour stability teaser from any Strategy Tester export — no signup, processed in memory, never stored. It's a quick way to see whether your strategy even has a time-of-day signature worth investigating. For context on the other numbers in that report — profit factor, Sharpe, Sortino, drawdown — see TradingView Backtest Metrics Explained; and if you're weighing several strategy variants at once, the hourly signatures compare best on a unified axis, as described in How to Compare Multiple TradingView Strategies Side by Side.
The one-sentence version of this whole guide: a profitable hour is a fact about a sample; a persistently profitable hour is a property of the sample worth knowing about. Always ask which one you're looking at.
