Force Index with Adaptive Volatility Bands
- Indicators
-
Narayanan Mohanan Mohanan Krishnan
MT5/MQL5 developer building Expert Advisors, custom indicators, and backtesting and validation tools. I focus on clean, well-documented, no-repaint code: closed-bar logic, validated buffers, proper handle and memory management. This is the engineering that separates a reliable tool from a fragile - Version: 1.0
This indicator plots the Force Index — each bar's price change multiplied by its volume — inside adaptive standard-deviation bands. Where price alone tells you that a market moved, the Force Index tells you how much effort went into moving it.
A large price change on thin volume and a small change on heavy volume are very different events, even when the candles look similar. The Force Index separates them by combining both into a single reading, and the bands place that reading in the context of the instrument's own recent behaviour.
How it works
For each bar, the raw Force Index is the difference between the current close and the previous close, multiplied by that bar's volume. It is positive when the bar closes higher, negative when it closes lower, and scaled by how much trading took place. Tick volume is used by default; real volume is applied automatically where the broker supplies it.
That raw series is then smoothed over a chosen period, using the averaging method you select. Smoothing matters here: the unsmoothed Force Index is very noisy, and the period you choose decides whether you are watching short-term effort or a much longer swing.
A 20-period basis and its standard deviation are calculated over the smoothed series, and the upper and lower bands are placed at a chosen multiple of the deviation. Because the bands are built from the series' own variability, they widen when effort becomes erratic and contract when it settles.
Why the bands matter
The Force Index scales with volume, so its raw numbers are not comparable between instruments. In the screenshots accompanying this listing, the same indicator with the same settings reads within roughly plus or minus 2 on ETHBTC, plus or minus 10 on GBPUSD, and in the tens of thousands on TSLA. None of those numbers means anything on its own.
This is the problem the bands solve. Rather than asking whether a value is large in absolute terms, they ask whether it is large for this instrument, right now — a question that has the same meaning on every chart. It is what allows one set of defaults to travel across markets that differ by four orders of magnitude.
What the bands show
The Force Index oscillates around zero, and the zero line is meaningful in itself: above it, closes are advancing on the volume traded; below it, they are declining.
A move outside the bands means the effort behind recent bars has become statistically unusual relative to that instrument's own recent behaviour. A return inside means it has normalised. Neither is a signal to act — they describe where effort currently sits relative to its own recent range.
Three readings traders commonly take from this display:
Expansion from quiet. When the bands are pinched tight around a flat line, effort is consistent and unremarkable. When they suddenly flare, something has changed in the volume behind the move. What follows is not fixed — expansion can continue or subside — but the change itself is visible immediately.
Confirmation. Price makes a new high or low and the Force Index makes one too. The move is backed by proportionate effort.
Divergence. Price makes a new low while the Force Index makes a higher low, or the reverse at a high. Price has moved but the effort behind it has not followed. This is context, not a prediction — divergences resolve in both directions, and they can persist far longer than expected.
Inputs
- Force Index period — 13 by default. The smoothing length applied to the raw series.
- Force Index smoothing method — SMA by default; EMA, SMA, SMMA and LWMA are available.
- Applied volume — Tick Volume (default) or Real Volume where the broker supplies it
- Bands period — 20
- Bands deviation — 2.0
The Force Index period is the parameter most worth adjusting. A shorter period responds faster and produces more band contacts; a longer one is slower and marks only larger shifts in effort. One of the screenshots uses a period of 200 on a daily gold chart to show what a long-horizon setting looks like — the same indicator, reading a different question.
Buffers
- Buffer 0 — Force Index line, smoothed
- Buffer 1 — Upper band
- Buffer 2 — Basis
- Buffer 3 — Lower band
All four are readable from an Expert Advisor or another indicator with iCustom() and CopyBuffer(). Read shift 1 — the last fully closed bar — for values that will not change.
The indicator is self-contained: it creates no handles to other indicators, so the only handle your code manages is the one it creates itself.
Across instruments
The screenshots show the indicator on five markets that behave nothing alike.
- GBPUSD H1 — with horizontal levels drawn at plus and minus 1 for reference. For two days the reading stays pinned between them with the bands squeezed tight. At the marked bar, price breaks out of its range and the reading jumps to roughly 8.8 while the bands flare open. The fixed levels make the change of scale obvious at a glance.
- TSLA H1 — an equity selloff. Effort drops hard below the lower band as price falls, then recovers back toward zero and settles inside the bands while price stabilises in a range.
- DE30 M10 — an index at the European open. Hours of near-flat overnight readings with tightly pinched bands, then a sharp expansion as the session begins and volume arrives.
- XAUUSD Daily, period 200 — a long-horizon setting on gold. A spike at the January high, then months of persistently negative readings through the decline that follows.
- ETHBTC H4 — a crypto cross, where the whole reading fits within roughly plus or minus 2. The bands adapt to that scale exactly as they do on instruments thousands of times larger.
Calculation behaviour
Values are calculated only from completed data. Once a bar closes its value is final and does not change. Only the currently forming bar updates as new ticks arrive, and it settles at that bar's close. The indicator uses no look-ahead data and does not repaint closed bars.
Notes
- Separate indicator window, 4 plots, 5 buffers, one of which is internal.
- With the default settings, roughly 33 bars of history are needed before the bands begin to draw. A longer Force Index period increases that requirement.
- Tick volume is a proxy for traded volume. On instruments where the broker supplies real volume, selecting it gives a more faithful reading.
- No external dependencies. The Force Index, the basis and the standard-deviation bands are all calculated inside the indicator. It does not call any other indicator, so there are no handles to fail, nothing to install alongside it, and no dependency on the state of your standard indicator folder.
This indicator is a tool for technical analysis and market-condition filtering. It is not a trading system, it does not generate trading signals, it does not provide investment advice, and it does not open or manage trades automatically. No performance claims are made for it.
Free to download and use. If you find it useful, a rating helps other traders find it.
| More tools from this developer I build MT5 indicators and Expert Advisors with an emphasis on clean, documented, no-repaint code — closed-bar logic, validated buffers, and no dependencies on other indicators. Questions about the calculation, the buffers, or using this in your own EA? Send me a private message — I am happy to answer. |
Developed and maintained by Narayanan Mohanan, MT5/MQL5 Developer.
