Loading…

Choppiness Index

The Choppiness Index, developed by Australian commodities trader E.W. Dreiss, does not measure direction - it measures path efficiency. It sums the true range of every bar in a rolling window (the total distance price actually travelled, including every back-and-forth) and divides that by the width of the window's overall high-low range (the net distance price ended up covering). A market that thrashed back and forth to go nowhere produces a sum-of-true-range far larger than its net range, pushing the ratio - and the index, after a log transform that compresses it onto a 0-100 scale - toward 100. A market that moved in close to a straight line produces a sum close to the net range itself, pushing the index toward 0. That makes it a filter, not a signal generator: it tells a trader whether the current regime rewards trend-following systems (low readings) or mean-reversion and range systems (high readings), without saying which way to trade. It is commonly read against the same 38.2 and 61.8 levels used elsewhere in Fibonacci-flavoured analysis, though those are conventions, not laws - a market can sit above 61.8 for a long stretch during a genuine multi-week range. Notes and limitations - Needs InpPeriod bars of true range plus one prior bar for the first true-range term; earlier bars are intentionally left empty rather than guessed. - Summed fresh over the window at every bar rather than tracked incrementally, so a data gap or a changed InpPeriod can never leave a stale partial sum behind, and nothing here can repaint once a bar closes. - Pure path-efficiency measure with no directional component - it will not tell a trader whether to go long or short, only whether the current regime tends to favour trend or range approaches. - The 38.2/61.8 levels are the common convention, not a calibrated boundary for any particular symbol; watch the raw value's history on the instrument being traded before relying on the default levels.

Indicator · MT5 · v1.0 · Free

About Choppiness Index

Choppiness Index is an indicator for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 4 settings, such as Period, Choppy level and Trend level. MQL source code included.

Files in the download: ChoppinessIndex.ex5, ChoppinessIndex.mq5, ChoppinessIndex.txt.

Settings

SettingDefaultWhat it does
Period14Rolling window, in bars, used for both sums
Choppy level61.8Alert threshold: market judged choppy above this
Trend level38.2Alert threshold: market judged trending below this
AlertstrueAlert once per closed bar when a threshold is crossed

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: Trend · Alerts · MT5 Indicator · MQL5 Source Code

MetaTrader 4 & 5 indicators · PolyMaria