A buy signal is a persistent state, not a daily price change
StockCharts defines a P&F buy signal as an X column breaking above the preceding X column. It remains active until an O column breaks below the preceding O column, producing a sell signal. Changing from an X column to an O column alone does not necessarily cancel the buy signal.
- Counting stocks above a moving average measures a different form of breadth. Label that output by its actual rule rather than calling it BPI.
- Bull/Bear Power measures price relative to an EMA for a chart symbol. It does not supply the constituent signal states required here.
| Hypothetical stock | Observation | BPI treatment |
|---|
| Stock A | Price closes higher today but has not broken the prior X-column high; its last signal was sell. | Still excluded from the buy-signal count. |
| Stock B | Price closes lower today, but its active buy signal has not been replaced by a sell signal. | Still included in the buy-signal count. |
| Stock C | An X column exceeds the previous X-column high and replaces a sell signal. | Adds one to the count, regardless of market capitalization. |
Calculate BPI for a 20-stock universe
Assume 20 eligible stocks with complete P&F histories at the same observation time. Twelve have active buy signals and eight have sell signals. BPI = 100 × 12 / 20 = 60%. The following hypothetical observations are sequential; they are an arithmetic example, not historical market data.
- With membership fixed at 20, one net state change moves BPI by 5 percentage points. With 500 eligible stocks, it moves BPI by 0.2 percentage points.
- The replacement row shows why a falling BPI need not mean an existing stock generated a new sell signal. Membership can change the result.
- For a separate incomplete snapshot with 12 buys, six sells and two unknown states, 12 / 18 = 66.67% describes the observed subset. The full 20-stock value is unknown, bounded by 60% and 70%; do not silently publish 66.67% as full-universe BPI.
| Observation | Buy count / total | BPI | Reason |
|---|
| Initial snapshot | 12 / 20 | 60% | Twelve active buy signals. |
| Next completed observation | 13 / 20 | 65% | Two stocks switch to buy and one switches to sell: 12 + 2 − 1 = 13. |
| Constituent replacement | 12 / 20 | 60% | One buy-state stock leaves and one sell-state stock enters. The other stocks do not change state. |
Separate stock P&F settings from the BPI chart settings
StockCharts describes its underlying BPI calculation using traditional box sizing and three-box reversal P&F charts. Traditional scaling uses a price-range table. Replacing it with ATR or percentage boxes can change which stocks have buy signals, so a custom calculation must identify that choice.
- For a BPI column ending at 64 on that two-point grid, a fall to 58 is a three-box reversal. This is a six-percentage-point fall, not a 6% relative decline.
- Changing the display of an already published BPI does not recalculate its constituent signals. A line chart can move while the P&F display remains in the same column.
| Layer | What its settings control | Check |
|---|
| Each constituent stock | The price moves needed to form columns and change the active signal. | Box method and size, reversal count, high/low versus close inputs, adjustments and sufficient prior history. |
| The aggregated BPI series | The display of the resulting percentage as a line or P&F chart. | StockCharts illustrates BPI with two-percentage-point boxes and a three-box reversal: six percentage points. |
Audit the universe, denominator and publication time
StockCharts publishes BPI from maintained component lists and adjusted stock prices, with end-of-day updates. Its documentation warns that other providers can differ because of constituent and price-data choices. Record the provider alongside the value instead of treating every similarly named series as interchangeable.
- StockCharts uses $BPSPX for S&P 500 breadth and $BPNDX for Nasdaq 100 breadth. These are provider identifiers, not a guarantee of identical symbols or access on TradingView.
- Under a strict complete-coverage policy, mark BPI unavailable if any required constituent state is unknown or the denominator is zero. If publishing partial coverage, label both the subset result and coverage count.
| Data requirement | What to record | Failure condition |
|---|
| Point-in-time membership | Eligible securities and effective addition/removal dates for every historical observation. | Applying today's members to old dates changes the historical population and can introduce survivorship bias. |
| Denominator | Actual eligible count, security/share-class policy and unknown-state count. | An index name is not proof that the denominator is always exactly 500 or 100. |
| Price history | Corporate-action adjustments, source fields, P&F initialization and coverage. | Insufficient history or a missing quote must not silently become a sell signal. |
| Availability time | Observation date, publication timestamp, time zone and revision policy. | Using an end-of-day value before it was published gives a historical strategy information too early. |
Interpret levels without assuming a reversal
The conventional 30 and 70 levels mark low and high breadth zones. Above 50, a majority of included stocks have buy signals. These descriptions do not establish an entry price, reversal date or profitable trade. A high reading can persist, and a low reading can accompany further weakness.
- Separate level from direction: 65% rising from 60% and 65% falling from 70% have the same current proportion but different recent changes.
- A rising index price with falling BPI is a participation divergence only after matching the universe and observation dates. It is not proof that the index must fall next.
- If using BPI as a strategy filter, define confirmation time, entry, exit, position size and costs separately. Test the rule using values that were available at each decision time.
Use a verified BPI series for TradingView alerts
First confirm that the intended series is accessible in your TradingView account. Inspect the provider, definition, update schedule and history. A community indicator named Bullish Percent may use a custom basket or moving-average rule; read its calculation before comparing it with a published P&F index.
- Compare several completed observations with the provider. Check the 0-to-100 scale and timestamps before selecting alert thresholds.
- Specify whether an alert fires on crossing a level or while remaining above it. For a daily feed, an intraday chart-bar close does not by itself establish that the daily observation is final.
- TradingView documents 40 unique request.*() calls per script, or 64 on Ultimate. Requesting hundreds of constituents individually exceeds those limits; loops do not remove the limit.
- TradingView P&F data is constructed from lower-timeframe prices and approximates tick-based calculations. Requesting a P&F series for one symbol does not produce a market-wide BPI.
- Give Pineify the verified symbol or accessible series, observation frequency, threshold, confirmation policy and missing-data behavior. Ask the AI Coding Agent to draft a state alert, then review its source and compare its outputs in TradingView.