Intraday Volatility Seasonality
- Göstergeler
- Sürüm: 1.0
- Etkinleştirmeler: 5
# Intraday Volatility Seasonality - Hourly volatility profile
*Category: Volatility | Difficulty: intermediate | Window: separate window below the chart | Markets: Universal (Forex, indices, commodities, crypto, stocks) | Suggested timeframes: M5, M15, M30, H1*
## Short description
> Builds the instrument average hourly volatility profile and compares it with the actual range of the current bar. It separates normally quiet hours from genuine anomalies.
### Overview
Intraday volatility is not randomly distributed: it depends on the hour. The London and New York sessions produce ranges many times larger than overnight ones, and this profile repeats day after day with notable regularity. The practical problem is that an ordinary volatility indicator knows nothing about the clock: when it flags low volatility at three in the morning it is saying nothing useful, because it is always like that at that hour. Intraday Volatility Seasonality builds the instrument average hourly profile from the loaded history and compares it with the actual range of the current bar. The gold line shows how much volatility is expected at this hour, the histogram how much is actually being realized: together the two say whether the market is behaving as usual or whether something anomalous is happening in this specific time band.
### How the calculation works
1. The true range of each bar is divided by a long period ATR, giving a normalised range independent of the general volatility regime.
2. This normalisation is essential: without it the hourly profile would mostly reflect the quiet and agitated periods of the history rather than the hours.
3. For each bar the previous InpLookback bars are scanned, selecting only those falling in the same hour of the day.
4. The average of their normalised ranges is the expected value for this time band.
5. If fewer than InpMinSamples observations are available for that band no expectation is drawn, rather than showing an unreliable value.
6. The ratio between realized and expected range determines the histogram colour.
### How to use it
- Use the gold line to plan the day: it says at which hours it is worth being at the chart and at which it is not.
- The orange histogram flags activity far above normal for that hour: something is happening, this is not the usual session.
- The blue histogram flags an unusually quiet time band, often near holidays or ahead of major data releases.
- Adapt stops to the hourly expectation: a stop suited to the London open is completely out of proportion at four in the morning.
- Raise InpLookback for a more stable profile, knowing more history bars will be needed before the first useful value.
### Who it is for and on which timeframes
It targets intraday traders working across several sessions who want to understand when the market is genuinely doing something different from usual. It is designed for timeframes from M5 to H1: on higher ones a single bar spans several time bands and the concept loses meaning. It requires deep intraday history, at least a few weeks, because each time band must gather enough observations. It is not suited to instruments with irregular or very short trading hours, where some bands cannot gather enough data.
### Practical example of reading a signal
On EURUSD M15 it is two in the afternoon server time and the gold line reads 145: at this hour the instrument typically moves forty five per cent more than its general average, because US markets are about to open. The histogram reads 152, in line with the expectation and coloured grey: a normal day. The next day, at the same hour, the expectation is still 145 but the histogram reads 310 and is orange. This is not simply a wide bar, it is a bar twice as wide as normal for that hour: something specific is happening, and it is time to check the economic calendar before trading.
## Input parameters
| Parameter | Default | Description |
|---|---|---|
| `InpLookback` | 600 | History bars examined to build the profile. The wider it is the more stable the profile, but the heavier the computation. Internally capped at 3000. |
| `InpAtrPeriod` | 100 | ATR period used to normalise the range, making the profile independent of the quiet and agitated periods of the history. |
| `InpHighRatio` | 1.40 | Ratio between realized and expected beyond which activity is deemed anomalously high. |
| `InpLowRatio` | 0.60 | Ratio below which activity is deemed anomalously low. |
| `InpMinSamples` | 5 | Minimum observations required for a time band. Below this threshold the expectation is not drawn at all. |
## Advantages / strengths
- It separates hourly seasonality from genuine anomaly, a distinction no ordinary volatility indicator can make.
- Normalisation on the long ATR prevents the profile from reflecting quiet and agitated periods instead of hours.
- It has an immediate practical use in planning the trading day and sizing stops.
- It explicitly refuses to produce an expectation when data are insufficient, instead of showing a made up value.
## Limitations and warnings
- Scanning back hundreds of bars on every bar makes it the slowest of the category on the first pass.
- The profile depends on the broker server time: changing broker, or at the daylight saving switch, shifts the profile.
- It aggregates all weekdays: Monday and Friday have different profiles that are averaged together here.
- It requires deep intraday history and is unusable on instruments with heavily fragmented trading hours.
**No repaint:** values printed on a closed bar are never modified afterwards.
**Disclaimer.** This product is a technical analysis tool, not an automated trading system, and it offers no profit guarantee whatsoever. Financial markets carry the risk of total loss of the invested capital. Past performance is not indicative of future results. Every signal must be confirmed with your own analysis, a money management plan and prior testing on a demo account. The author is not responsible for trading decisions taken on the basis of this indicator.
## Suggested tags / keywords for MQL5
`seasonality`, `intraday`, `volatility`, `session`, `hourly profile`, `anomaly`, `no repaint`, `time`
