Intraday Intensity Index: close location and volume
The Intraday Intensity Index (III) multiplies a bar's volume by the position of its close within its high-low range. A close near the high contributes positive volume; a close near the low contributes negative volume. The open price is not part of this calculation.
III = ((2 × Close − High − Low) / (High − Low)) × Volume
Example: H = 110, L = 100, C = 108 and V = 1,000 gives (6 / 10) × 1,000 = +600. This is a weighted volume contribution, not a percentage or a count of buy orders.
Read the formula before choosing a threshold
For a non-flat bar, the close-location factor lies between −1 and +1. At the high it is +1, at the midpoint it is 0, and at the low it is −1. With nonnegative volume, raw III lies between −V and +V for that bar. Its scale changes with the feed's volume units, so a fixed threshold such as +2.5 has no universal meaning.
A positive sign means the close is above the bar's midpoint. It does not establish above-average volume or a gain from the previous close. For example, after a previous close of 120, a bar with H = 110, L = 100 and C = 108 still produces positive III despite the price decline.
Definition used here: the volume-multiplication formula shown in the current Pine v6 reference. Verify the formula when comparing scripts with the same name. A formula that divides by volume is a different series, not a constant rescaling. The example below writes the arithmetic explicitly.
Same candle body, opposite III: compare IMI
Both hypothetical bars open at 100, close at 102 and have volume of 1,000. Only the high and low change.
| Bar | O / C | H / L | Close factor | Raw III | IMI body input |
|---|---|---|---|---|---|
| A: lower wick | 100 / 102 | 103 / 97 | 4 / 6 | +666.67 | Gain 2, loss 0 |
| B: upper wick | 100 / 102 | 107 / 99 | −2 / 8 | −250 | Gain 2, loss 0 |
III turns negative in bar B even though the body is bullish. IMI uses the positive and negative open-to-close body totals across a lookback. Swapping A for B leaves IMI unchanged if the rest of that lookback is identical. See the Intraday Momentum Index calculation for its separate 0 to 100 ratio.
Raw III, rolling totals and normalized II%
Raw III describes one bar. A rolling total adds III across N bars. A normalized window divides that total by volume over the same N bars and multiplies by 100:
II% = 100 × Sum(III, N) / Sum(Volume, N)
For two bars with III values +600 and −200 and volumes 1,000 and 500, II% = 100 × 400 / 1,500 = +26.67%. This is a volume-weighted close-location score, not a return or the percentage of trades initiated by buyers. It lies between −100 and +100 when all input bars are valid and total volume is positive.
Bollinger's screening guide uses a 21-day oscillator. On an hourly chart, a 21-bar input instead covers 21 hourly bars. With identical windows and invalid-bar handling, the normalized formula above is mathematically 100 × Chaikin Money Flow. That relationship does not make the raw single-bar value a rolling CMF reading.
Pine Script v6 with explicit data rules
Paste this indicator into TradingView's Pine Editor and add it to the chart. Output selects raw III or normalized II%. The window input affects only II%. The status table reports unavailable data, and gaps in the plot remain visible.
//@version=6
indicator("Intraday Intensity: explicit volume weighting", shorttitle="III", overlay=false)
length = input.int(21, "Normalized window", minval=1)
mode = input.string("Raw III", "Output", options=["Raw III", "Normalized II%"])
validBar = not na(volume) and volume >= 0 and not na(high) and not na(low) and not na(close) and high > low
float raw = validBar ? ((2.0 * close - high - low) / (high - low)) * volume : na
// Reject the entire window if any bar has missing volume or a flat range.
validCount = math.sum(validBar ? 1.0 : 0.0, length)
sumIntensity = math.sum(nz(raw, 0.0), length)
sumVolume = math.sum(nz(volume, 0.0), length)
validWindow = bar_index >= length - 1 and validCount == length and sumVolume > 0
float normalized = validWindow ? 100.0 * sumIntensity / sumVolume : na
float value = mode == "Raw III" ? raw : normalized
plot(value, "Selected intensity", color=color.rgb(37, 99, 235), style=plot.style_linebr)
hline(0, "Range midpoint reference", color=color.gray)
var table status = table.new(position.top_right, 1, 1)
if barstate.islast
table.cell(status, 0, 0, na(value) ? "Unavailable: check range, volume and history" : mode, text_color=color.white, bgcolor=color.new(color.black, 20))- High equals low: the range ratio is undefined. This implementation returns na rather than assigning a neutral close.
- Missing volume: return na. A zero-volume bar with a valid range contributes zero; a normalized window whose total volume is zero returns na.
- Incomplete or invalid window: II% stays unavailable until N consecutive valid bars exist. Zero placeholders inside the sums are used only with this validity check.
- Tick volume and exchange volume have different meanings. Read the chart feed's definition before comparing symbols. Missing volume cannot be reconstructed by this script.
The current bar can change before it closes. This is an indicator example with no orders or alerts. Educational information only; neither syntax validity nor a positive III proves a profitable trading rule.
Specify the III version before asking Pineify to edit it
Pine Script AI Coding Agent can help modify the script and check syntax when requested. State the formula, output scale, window and missing-data policy in the request. Review the generated code and compare several completed chart bars by hand before using any added condition.
Use the volume-weighted III formula from this example. Keep raw and normalized outputs separate. Preserve na for missing volume and flat ranges. Add an alert only after a completed bar crosses zero, then check the final Pine Script syntax.Edit the III script with Pineify
Intraday Intensity Index FAQ
Sources and related calculations
Definitions checked October 17, 2026. Numerical examples are hypothetical arithmetic, not market observations.
- TradingView Pine Script v6: ta.iii reference
- Bollinger Bands: Intraday Intensity and the 21-day oscillator
- TradingView: Chaikin Money Flow calculation
- thinkorswim: Intraday Momentum Index
- TradingView: missing, zero and tick volume
Continue with Accumulation/Distribution for cumulative close-location volume, or return to the TradingView indicator guides.