OPEN-SOURCE SCRIPT

Intraday Volatility Clock

251
The Concept
A stop is a distance, and every distance is really a bet about how much the market can move before you are wrong. But intraday volatility is nowhere near constant — it is loud at the open, quiet through the middle of the session, and wakes up again into the close. On liquid intraday instruments the gap between the busiest and calmest half-hours is routinely four to five times in variance, which is roughly double in standard deviation. A stop set on the session's average volatility is therefore far too tight in the first half hour and needlessly wide at midday. Same number of points, completely different meaning. Volatility Clock measures that shape from the instrument's own history and hands it back as a single number per time slot, so you can see which part of the day you are standing in before you decide what a distance is worth.

What It Shows
🕐 Time-of-Day Multiplier — a stepped line showing how much variance this slot of the session normally carries, expressed against the session average. 1.00 is a typical slot for this market; 3.00 means this slot usually runs three times as hot
📊 Curve Table — the fitted profile slot by slot, with the number of sessions behind each one so you can see which parts of the day are well measured and which are thin. Long sessions cut into small slots can outrun the table; when that happens it says how many slots were left off rather than quietly dropping the tail
📐 Sigma Mode — the same curve as a standard-deviation multiplier rather than a variance one, for scaling stop distances and expected move directly
⚖️ Session Average Line — the 1.00 reference. Above it the market is normally more active than its own daily baseline, below it less
🎛️ Fit Controls — slot width, how many sessions to measure over, and how hard to shrink thinly-observed slots toward neutral

How It Is Built
Squared log returns are pooled into time-of-day slots, one row per session. Each session's slots are divided by that session's own average before anything is compared across days, so a violent session contributes its shape and not its scale — otherwise one wild day writes the curve for every other. The statistic across sessions is the median, for the same reason. Thin slots are shrunk toward 1.00 in log space, so a slot with three observations degrades to "no opinion" rather than to a confident wrong number. The finished curve is renormalised to average 1.00, which is what makes it orthogonal to whatever volatility estimate you already use: applying it moves variance around inside the day without changing the overall level.

Slots are measured from the session open, not from midnight. On a market that opens at 09:15, a midnight grid would produce a first slot labelled 09:00 holding only fifteen minutes of trading — the hottest fifteen minutes of the day, reading high for the wrong reason. Anchoring to the open keeps every slot the same width and keeps sessions that run past midnight in the right order.

How To Use
Add it to an intraday chart with a decent number of completed sessions and read it as context, not as a trigger. It has no bullish or bearish opinion and never will.
Scale distances, do not shift them. Switch on Sigma Mode and treat the number as a multiplier on whatever stop or target width you already use. A 2.00 reading means the same setup deserves roughly twice the room it would get at midday
Mind the trough. The quietest part of the session is where fixed-distance stops look safest and are actually the loosest relative to what the market is doing. It is also where a trade needs the most time to travel anywhere
Respect the open. The first slot is usually the largest number on the chart by a wide margin. Positions taken there carry far more range than the rest of the day, whichever way it goes
Check the sample column. A slot backed by three sessions is a guess; one backed by forty is a measurement. Thin slots are deliberately pulled toward 1.00 rather than shown as confident extremes
Compare instruments. The shape is not universal. Index futures, single stocks and commodities each have their own profile, and a commodity trading across two continents' hours can look nothing like an index
Match the slot to the chart. Slot width must be at least the bar interval, and works best as an exact multiple of it. The script says so in the table rather than fitting a curve on a broken grid

Using It In A Trade
Everything below is one idea: the multiplier tells you what a point is worth right now, so anything you measure in points should be read through it. None of it is a signal, and none of it says which way to face.

1. Stops. Turn on Sigma Mode. If your working stop is X points and the reading is 1.80, the comparable stop in that slot is about 1.8X — not because the trade needs more room emotionally, but because the market covers that distance 1.8 times as easily there. Running one fixed number all day means you are unknowingly trading a tight stop at the open and a loose one at lunch.

2. Targets and the ratio you are actually getting. Scaling the stop without scaling the target quietly changes your risk-reward. If both move with the multiplier, the ratio survives. If only the stop moves, a 1:2 setup at midday is something else entirely at the open.

3. Position size. The inverse of the sigma multiplier is a size scalar. Half the size at a 2.00 slot and full size at a 1.00 slot puts roughly the same rupee risk on the table in both, which is usually what you meant by "fixed risk" in the first place.

4. Time budget for a trade. A trade needs the market to travel. In a 0.60 slot it travels slowly, so the same target takes materially longer and the trade will sit through more time doing nothing. If you scalp with a time-based exit, the exit is worth scaling too.

5. Choosing when to be in the market. Some approaches want movement — breakouts, momentum, anything paid by range. Those live in the peaks. Others want stillness — mean reversion, range fades, anything that assumes price comes back. Those live in the trough. The curve tells you which regime the clock has put you in before the chart does.

6. Breakout filtering. The same size of break means different things at different times. A move that clears yesterday's high in a 0.50 slot required real force to happen there. The identical move in the opening slot is inside what the market does routinely without meaning anything. Comparing break size against the local multiplier is a cheap sanity check.

7. Options and anything short premium. Premium sellers are paid for time and punished by movement, and the two are not distributed the same way through the day. The peaks are where a written position takes its damage; the trough is where decay does its work relatively undisturbed. Stop distances on short-premium positions are exactly the kind of fixed number that this curve says should not be fixed.

8. Comparing a session to its own norm. Take the realised movement of the current slot and divide by what the curve says that slot normally carries. Above one means today is running hot for that time of day, below one means it is quiet — a cleaner read on "is today unusual" than comparing against a flat daily average that has the time-of-day shape baked into it.

Works on any symbol on intraday timeframes. Larger bar intervals let the chart hold more sessions, which usually gives a steadier profile than squeezing more detail out of fewer days.

Notes
This measures where volatility concentrates, not where price goes. Nothing here forecasts direction, and no combination of settings will make it do so. It is a description of how the instrument distributes its movement across the trading day.
Non-repainting. The profile is recalculated once at each session open using completed sessions only, and only completed bars are ever added to the sample. The value displayed on any bar was knowable before that session began, and history is not redrawn as the current session develops.
Regular session only, by default. Pre-market and auction prints are not ordinary trading. Left in the sample, a single auction gap can double the opening slot on its own. The setting can be turned off, but the profile it produces should be read with that in mind.
History requirement. The profile needs several completed sessions before it will display anything. Below that it shows how many sessions it has gathered so far rather than drawing a curve nobody should trust. On non-intraday timeframes it says so and draws nothing. A slot with no observations behind it draws nothing rather than defaulting to 1.00.
A profile is not a promise. Any individual session can ignore the shape entirely — news, expiry and holidays all override it. The curve describes the central tendency of many days, not the obligation of the next one.
No alerts in this version.

Pernyataan Penyangkalan

Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.