Entropy measures how evenly the values in the lookback window are spread. The study divides a price range into equal slices, called bins, drops each value of the window into its bin, and counts the bins. From those counts it computes the Shannon entropy, the sum of minus p times the natural log of p over every bin that holds a share p of the values. It then divides by the log of the number of bins, the entropy of a perfectly flat spread, so the reading sits between 0 and 1.
The range and the number of bins are not reset for each window. The lowest and highest values are kept from every value seen so far, so the range is the range of the whole chart to date. The count that sets the number of bins also grows with every value scanned, which takes it to its ceiling of 100 bins within the first few dozen bars. The reading is therefore the spread of the recent window measured against the whole range seen so far.
The line needs at least two values before it draws, and reads 0 if every value seen so far is the same.
How to read Entropy (ENTROPY)
A low reading means the values in the recent window fall into only a few slices of the chart's range: price has been sitting in a narrow band. A higher reading means the window has travelled across more of the range. Because the range keeps growing with the chart, a window of the same width reads lower late in a long chart than early in it.
Use it to compare quiet and active stretches on the same chart rather than as an absolute number. It says nothing about direction.
Settings
- Source
- The series whose spread is measured, such as the close.
- Length
- How many recent bars are dropped into the bins. A longer window covers more of the range and usually reads higher.
Frequently asked questions
Why is the reading low even when price moves?
The bins divide the whole range seen so far, often into 100 slices. A window of a few bars only reaches a handful of them unless it covers a large part of that range.
Why does the same move read differently later in the chart?
The range used for the bins grows as new highs and lows arrive, so each bin gets wider and the same window lands in fewer of them.
What does a reading of 1 mean?
Every bin holds the same share of the window's values, a perfectly even spread. With 100 bins and a short window that cannot happen, so readings stay well below 1.
