Breadth Concepts: Participation and Its Measures
By the end of this lesson you will be able to define four participation measures precisely enough to compute any of them by hand from a table of closing prices, say what question each one answers, and name the specific defect that a database of currently listed companies introduces into every one of them.
Two markets that print the same number
Section titled “Two markets that print the same number”Imagine two markets of one hundred shares each. On Monday both indices close up one per cent.
In the first market, sixty-eight shares rose, twenty-nine fell and three were unchanged. In the second, eleven shares rose — including the three largest constituents, which together carry a quarter of the index weight — and eighty-six fell.
| Market A | Market B | |
|---|---|---|
| Index change | +1.0% | +1.0% |
| Shares advancing | 68 | 11 |
| Shares declining | 29 | 86 |
| Shares above their 200-day average | 71 | 34 |
The index is a weighted average, and a weighted average can be dominated by a handful of large weights. Breadth measures throw the weights away and count instead. That is the whole idea: a breadth statistic is an unweighted count over the members of a universe, taken bar by bar. Nothing more mystical than that.
Notice what this does and does not give you. It is not new data — every number in the table above came out of the same closing prices the index was computed from. It is a different summary of the same data, and it answers a question the index price cannot: how widely was the move shared?
Advances, declines and unchanged
Section titled “Advances, declines and unchanged”The oldest breadth measure counts, for each bar, how many members closed above their previous close (advances), how many closed below it (declines), and how many closed at exactly the same price (unchanged).
Counting is a per-bar sum across symbols
| Bar | Mon | Tue | Wed | Thu |
|---|---|---|---|---|
AAA closed up? | 1 | 1 | 0 | 1 |
BBB closed up? | 1 | 0 | 0 | 1 |
CCC closed up? | 0 | 0 | 0 | 1 |
DDD closed up? | 1 | 1 | 0 | 0 |
Advancing | 3 | 2 | 0 | 3 |
Declining | 1 | 2 | 4 | 1 |
Net advances | +2 | 0 | -4 | +2 |
What counts as “unchanged”
Section titled “What counts as “unchanged””On a market that quotes to two decimal places, “unchanged” means the close is bit-for-bit equal to the previous close, and on liquid shares that is rare. On a market with a coarse tick size, or on cheap shares, it happens constantly. The unchanged bucket is not a rounding error you can ignore: advances plus declines plus unchanged has to equal the number of members that had a usable bar, and that identity is the single most useful check you have on a breadth calculation. Lesson 2 turns it into an automated test.
Raw counts are not comparable across time
Section titled “Raw counts are not comparable across time”If your universe was 380 symbols in 2010 and is 520 symbols now, then “180 advancing” means something different in each year. Raw counts are usable within a bar — the advance/decline ratio for a single day is fine — but comparing today’s count with a count from 2010 compares two different denominators.
There are two fixes and you should be deliberate about which you use. Either divide by the member count on the same bar, which gives a percentage that is comparable over time, or work only with quantities that are already differences, such as advances minus declines. What you must not do is plot the raw advancing count over fifteen years and read the trend in it as a statement about participation.
The advance/decline line
Section titled “The advance/decline line”The advance/decline line is the running total of net advances:
Fragment — not a complete formula
NetAdvances = Advancing - Declining;ADLine = Cum( NetAdvances );It is a cumulative sum, and three consequences follow from that word.
Its level is arbitrary. Start the sum on a different date and every value shifts by a constant. Only the shape carries information, and any comparison of the A/D line’s level with anything else is meaningless.
It never forgets. A counting error on one bar in 2014 displaces every later value by the same amount, permanently. An indicator that is recomputed from a rolling window heals itself; a running total does not. This makes the A/D line the measure most sensitive to the data problems in the rest of this lesson.
It responds to a varying universe. If your universe grows, the average magnitude of
NetAdvances grows with it, and the line steepens for reasons that have nothing to do with
the market.
AmiBroker’s built-in advance/decline functions
Section titled “AmiBroker’s built-in advance/decline functions”AmiBroker ships AdvIssues(), DecIssues(), UncIssues(), AdvVolume(), DecVolume(),
UncVolume(), ADLine() and Trin(). Each takes no arguments and returns an array.
AdvIssues() is documented as returning the number of advancing issues for the market
that the currently analysed stock belongs to, so the answer depends on which symbol the
formula is running on and on how your Markets categories are set up.
There is one condition on all of them that catches people out. The Trin() reference page
states plainly that the built-in advance/decline indicators work only with composites
calculated inside AmiBroker — that is, with the numbers produced by the program’s own
Symbol → Calculate composites command, not with anything a data vendor supplies. The
same page notes that with a vendor database you should use that vendor’s own breadth
symbols and read them with Foreign() instead.
The built-in calculation is documented in the User’s Guide. It needs a base index chosen per market on the Markets tab of Symbol → Categories; that symbol must be marked as an index in Symbol → Information and must belong to the same market. AmiBroker then uses the base index’s quotation dates as the master calendar and looks for a matching quote of every member on each of those dates. The guide adds a warning worth taking literally: automatic composite recalculation only makes sense if you follow the whole exchange. If your database holds two hundred of the exchange’s two thousand listings, the counts are counts of your two hundred, whatever the menu calls them.
That constraint is the reason the rest of this part builds composites in AFL instead. When you write the counting rule yourself, you know exactly what universe it ran over.
Percentage above a moving average
Section titled “Percentage above a moving average”Counting the members trading above their own moving average produces a measure that is bounded between 0 and 100, comparable across time, and comparable between universes of different sizes. That makes it the most useful everyday breadth statistic in this part.
Two windows are conventional. The percentage above a 50-bar average moves quickly and spends a lot of time near its extremes; the percentage above a 200-bar average moves slowly and is usually read as a description of how broad the longer-term uptrend is. They are answering different questions, and reading them together is more informative than reading either alone: a market where the fast measure has collapsed while the slow one is still at seventy is in a different state from one where both are at twenty.
The eligibility problem, which nobody mentions
Section titled “The eligibility problem, which nobody mentions”A share that listed four months ago has no 200-bar moving average. It does not count as “below” its average — it has no average. If you treat a missing value as false, that share lands in the denominator and drags the percentage down, and your breadth reading falls every time the exchange has a busy quarter for new listings.
The clean rule is to require a member to have enough history before it is allowed to vote at all, and to use the same eligibility test for the numerator and the denominator. That decision is a real design choice with a real cost — recently listed companies become invisible to your dashboard for their first year — and Lesson 4 makes it explicitly.
New highs and new lows
Section titled “New highs and new lows”A new high is a bar whose high is the highest high over some window, conventionally fifty-two weeks. Counting members making new highs and members making new lows gives a measure of how the extremes of the distribution are behaving rather than its middle, which is why it often moves when the percentage-above-average measures do not.
Three details decide whether your count matches anyone else’s:
- The window. Fifty-two weeks of daily bars is about 252 bars, not 365. Say which you used.
- What is compared. Highest high against the current high is the usual definition; highest close against the current close is a different and slightly smoother series.
- Eligibility again. A share with nine months of history cannot make a fifty-two-week high, and including it in the denominator understates the reading.
The usual derived series is net new highs, NewHighs - NewLows, which for the same reason
as advances and declines is best expressed as a percentage of eligible members rather than
as a raw count.
What breadth adds, stated carefully
Section titled “What breadth adds, stated carefully”Breadth is a description of the composition of a move that has already happened. It tells you that today’s one per cent came from eleven shares rather than sixty-eight. That is a real and checkable statement about the past, and it is the whole of what a breadth reading asserts.
Everything beyond that — that narrow advances tend to be followed by declines, that a particular reading marks a turning point — is a further claim that needs its own evidence, and Lesson 3 is about how hard that evidence is to gather. Keep the two apart in your own notes. The measurement is solid. The inference from the measurement is not automatically solid because the measurement is.
The survivorship problem in breadth
Section titled “The survivorship problem in breadth”Part 2 introduced survivorship bias in the context of backtests: a database assembled today contains the companies that still exist, so a strategy tested on it never buys anything that went to zero. Breadth inherits the same defect, and in some ways more directly, because a breadth series is nothing but a count over the database’s membership.
Consider what is missing. Every company that fell steadily until it was delisted spent its last years contributing declines, contributing new lows, and sitting below its own moving averages. Those contributions are simply absent from a survivor database. The bias is one-directional: the missing members would almost all have pushed the readings down, so historical breadth computed from a present-day universe looks healthier than the market actually was.
Three further consequences are worth spelling out:
- The distortion grows with distance into the past. Last month’s membership is nearly correct; 2008’s is not, because the intervening delistings have been removed from it.
- The A/D line concentrates it. Being a running total, it accumulates every day of missing declines rather than letting them wash out.
- It also affects the denominator. Your member count on a 2008 bar is the number of today’s survivors that happened to be listed in 2008, which is smaller and different from the number of shares that traded that day.
A breadth statistic is an unweighted count across a universe, computed one bar at a time, from data you already have. Advances and declines and their running total are the classical form; the percentage above a moving average is the form that stays comparable over time; new highs and lows describe the tails. Every one of them depends on three decisions you must record — which universe, which eligibility rule, and which denominator — and every one of them is distorted in a predictable direction by a database that contains only the companies that survived.
The next lesson builds these series yourself with AddToComposite(), which is where the
decisions above stop being theoretical and start being lines of code.
Check your understanding
Sources for this lesson
7 verified · checked 2026-08-31
- 01AFL Function Reference - ADLineamibroker.com/guide/afl/adline.html2026-08-31
- 02AFL Function Reference - AdvIssuesamibroker.com/guide/afl/advissues.html2026-08-31
- 03AFL Function Reference - DecIssuesamibroker.com/guide/afl/decissues.html2026-08-31
- 04AFL Function Reference - UncIssuesamibroker.com/guide/afl/uncissues.html2026-08-31
- 05AFL Function Reference - Trinamibroker.com/guide/afl/trin.html2026-08-31
- 06AmiBroker User's Guide - Composite recalculationamibroker.com/guide/w_recalc.html2026-08-31
- 07AFL Function Reference - Foreignamibroker.com/guide/afl/foreign.html2026-08-31
Every technical claim on this page was checked against the official AmiBroker documentation on the date shown. Where the course disagrees with folklore, the source is how you can tell which one to trust.