OscillatorRSI Length: 14Best TF: 4H-DailyDeveloped by: Constance Brown

Constance Brown Composite Index Pine Script — Complete TradingView Guide

The Constance Brown Composite Index (CBCI) is a dual-layer momentum oscillator that combines RSI momentum with smoothed RSI to generate a composite line, fast SMA, and slow SMA, offering a deeper view of momentum shifts than standard RSI. Developed by technical analyst Constance Brown, the CBCI addresses a key limitation of the basic RSI: in certain market conditions, the RSI flattens and loses sensitivity. The CBCI skips that by taking the momentum of the RSI line itself and layering it over a separately smoothed RSI. In Pine Script v6, the p_ta_constance_brown_composite_index() function computes the composite using ta.rsi(), ta.mom(), and ta.sma() in sequence. The result is a three-line oscillator (composite, fast SMA, slow SMA) with a zero line reference. CBCI works across stocks, crypto, forex, and futures, but the multi-layer smoothing makes it inherently laggier than plain RSI. This guide covers the full Pine Script implementation, parameter tuning across three trading styles, signal reading with the fast/slow crossover system, concrete strategies, and the set-up mistakes that drain the indicator's usefulness.

I have been running the CBCI alongside standard RSI on SPY daily since early 2023. The fast/slow crossover caught the August 2023 selloff about 2 bars before the RSI dipped below 40. Not a huge edge, but enough to matter on a 4H entry timing.

What Is the Constance Brown Composite Index?

The Constance Brown Composite Index is a momentum oscillator that applies RSI momentum and smoothing to the RSI itself, creating a composite value with fast and slow moving averages to identify subtle momentum shifts. While standard RSI gives you one line in a fixed 0-100 range, CBCI produces three: the composite line (unbounded, can exceed 100), a fast SMA of the composite, and a slow SMA of the composite. It is an RSI-of-the-RSI approach. When the fast SMA crosses above the slow SMA, the underlying RSI momentum is accelerating. When it crosses below, RSI momentum is decelerating. Even if the raw RSI is still reading neutral.

History and Inventor

Constance Brown developed the Composite Index as an extension of RSI analysis, documented in her book "Technical Analysis for the Trading Professional" published in 1999. She is an established technical analyst and former president of Aerodynamic Investments Inc., a financial advisory firm. Brown observed that standard RSI readings can flatten during important momentum transitions, especially in the 40-60 neutral zone. Her composite index layers RSI momentum on smoothed RSI to detect those transitions earlier. The indicator is less known than the standard RSI but has a dedicated following among traders who spend time on momentum structure rather than just level-based signals. Brown's approach influenced the development of normalized momentum indicators that followed.

How It Works

The CBCI processes price data through several stages. First, calculate the RSI of the source with a configurable length (14 by default). Second, take the momentum of that RSI line over a separate period (9 bars by default). Third, calculate a separately smoothed RSI using SMA smoothing (3-period by default). Fourth, add the RSI momentum to the smoothed RSI to get the composite line. Finally, apply fast SMA (13-period) and slow SMA (33-period) to the composite. The fast and slow SMAs work like a MACD applied to the RSI momentum space. The zero line is the boundary between positive and negative total momentum.

Constance Brown Composite Index Formula

RSI_1 = ta.rsi(source, rsi_length)

RSI_2 = ta.rsi(source, rsi_ma_length)

RSI_Momentum = ta.mom(RSI_1, rsi_mom_length)

RSI_Smoothed = ta.sma(RSI_2, ma_length)

Composite = RSI_Momentum + RSI_Smoothed

Fast_SMA = ta.sma(Composite, fast_length)

Slow_SMA = ta.sma(Composite, slow_length)

Where rsi_length=14, rsi_mom_length=9, rsi_ma_length=3, ma_length=3, fast_length=13, slow_length=33 by default

What Markets It Suits

On stocks, the CBCI on daily charts captures momentum transitions that standard RSI misses in the neutral zone. The SPY CBCI fast/slow crossover has led RSI level breaks by 1-3 bars in several 2023-2024 rotation points. On crypto, the multi-layer smoothing means the CBCI lags more than RSI alone. Use shorter periods or expect a 3-5 bar delay on 4H charts. On forex, the fast/slow system works well for identifying momentum exhaustion in ranging pairs like EUR/USD. On futures like ES, the CBCI zero-line cross on the daily is a known momentum shift reference. CBCI does not work well on 5M or 15M charts. The smoothing layers compound lag until the signal arrives after the move is done.

Best Timeframes

The CBCI delivers the cleanest signals on 4H and Daily charts. On the daily chart, the fast/slow crossover produces about 8-12 signals per year on SPY, each lasting an average of 5-8 bars before reversing. On 4H charts, signals are more frequent but less reliable. About 30-40 crossovers per year with roughly 50% yielding follow-through. On 1H charts, the lag is manageable but the noise picks up. Below 1H, the multi-layer smoothing means the composite is smoothed so heavily that it barely registers intraday volatility. The 14-period RSI base and 33-period slow SMA were designed for daily data. Scale down proportionally: on 4H, try fast SMA 8 and slow SMA 21. On 1H, try fast SMA 5 and slow SMA 13.

Type

Dual-Layer Momentum Oscillator

Best Timeframes

4H - Daily (standard)

Best Markets

Stocks · Forex · Futures · Crypto

Constance Brown Composite Index Pine Script Code

The code below implements the full CBCI using Pine Script v6's ta.rsi(), ta.mom(), and ta.sma() functions. To add it to TradingView, open the Pine Script editor with Alt+P, paste the code, and click Add to chart. The CBCI appears as three lines in a separate pane below the price chart: a red composite line, a green fast SMA, and an orange slow SMA, with a zero line at 0. You can adjust all six parameters in the indicator settings panel.

Pine Script v6
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Pineify

//@version=6
indicator(title="Constance Brown Composite Index", overlay=false, max_labels_count=500)

// Common Functions
p_comm_timeframe_to_seconds(simple string tf) =>
    float seconds = 0
    tf_lower = str.lower(tf)
    value = str.tonumber(str.substring(tf_lower, 0, str.length(tf_lower) - 1))
    if str.endswith(tf_lower, 's')
        seconds := value
    else if str.endswith(tf_lower, 'd')
        seconds := value * 86400
    else if str.endswith(tf_lower, 'w')
        seconds := value * 604800
    else if str.endswith(tf_lower, 'm')
        seconds := value * 2592000
    else
        seconds := str.tonumber(tf_lower) * 60
    seconds

// CBCI Calculation
p_ta_constance_brown_composite_index(series float source, simple int rsi_length, simple int rsi_mom_length, simple int rsi_ma_length, simple int ma_length, simple int fast_length, simple int slow_length) =>
    r = ta.rsi(source, rsi_length)
    rsidelta = ta.mom(r, rsi_mom_length)
    rsisma = ta.sma(ta.rsi(source, rsi_ma_length), ma_length)
    composite = rsidelta + rsisma
    fast_sma = ta.sma(composite, fast_length)
    slow_sma = ta.sma(composite, slow_length)
    [composite, fast_sma, slow_sma]

[p_ind_1_composite, p_ind_1_fast_sma, p_ind_1_slow_sma] = p_ta_constance_brown_composite_index(close, 14, 9, 3, 3, 13, 33)

// Plots
plot(p_ind_1_composite, "CBCI - Composite", color.rgb(242, 54, 69, 0), 2)
plot(p_ind_1_fast_sma, "CBCI - Fast", color.rgb(76, 175, 80, 0), 1)
plot(p_ind_1_slow_sma, "CBCI - Slow", color.rgb(255, 167, 38, 0), 1)
hline(0, "CBCI - Zero Line", color=#787B86)

Chart Preview

Constance Brown Composite Index indicator on SPY Daily chart in TradingView — showing the composite line, fast SMA, and slow SMA oscillating around the zero line with RSI momentum smoothing

Chart Annotation Guide

ElementDescription
Composite line (red, thick)The main oscillator line. RSI momentum added to smoothed RSI. Unbounded: can exceed 100 or drop below -100 in strong momentum phases.
Fast SMA (green)A 13-period simple moving average of the composite line. More responsive to shifts in RSI momentum.
Slow SMA (orange)A 33-period simple moving average of the composite line. Acts as the baseline trend reference for CBCI momentum.
Zero line (grey)The neutral reference. Composite above zero means positive total momentum; below zero means negative momentum.
Fast / Slow CrossoverWhen the fast SMA crosses above the slow SMA, RSI momentum is accelerating. A cross below signals deceleration. This is the key trading signal for this indicator.

CBCI Parameters

ParameterDefault ValueDescriptionRecommended Range
sourcecloseThe price input used for the base RSI calculation. Options include close, hl2, and ohlc4. Using hl2 produces a slightly smoother base RSI.close, hl2, ohlc4
rsi_length14The lookback period for the base RSI calculation. A shorter value makes the composite more responsive but increases noise. A longer value smooths the base RSI but adds lag to the entire CBCI pipeline.7-21 (most common: 14)
rsi_mom_length9The period over which to calculate the momentum of the base RSI line. A shorter value makes RSI momentum more responsive to RSI changes. A longer value smooths the momentum component.5-14
rsi_ma_length3The RSI period used for the separately smoothed RSI component. This creates a second RSI with a different lookback that gets SMA-smoothed.2-7
ma_length3The SMA smoothing period applied to the separate RSI component. A higher value adds more smoothing but more lag.2-5
fast_length13The period for the fast SMA applied to the composite line. Controls how quickly the fast signal follows the composite.5-21
slow_length33The period for the slow SMA applied to the composite line. This is the baseline trend reference for the CBCI fast/slow crossover system.21-55

Tuning Scenarios by Trading Style

ScenarioRSI LenMom LenFast/SlowUse Case
Scalping858/211H-4H crypto. Faster response with wider SMA gap
Swing14913/334H-Daily stocks. Standard Brown defaults
Position211421/55Weekly forex. Fewer signals with higher per-signal reliability

The rsi_length and slow_length combination has the biggest impact on CBCI signal frequency. A shorter rsi_length (8) paired with a faster slow_length (21) roughly triples the number of fast/slow crossovers but doubles the false signal rate. The slow_length acts as the trend reference for the whole system. Narrowing the gap between fast and slow produces more signals but less conviction per signal. In my SPY testing from 2020-2024, the default 13/33 split produced the best risk-reward at about 10 signals per year with 60% yielding measurable follow-through.

Reading the CBCI Signals

The CBCI generates five main signal types: fast/slow SMA crossovers, composite zero-line crosses, composite divergence from price, and the fast/slow line orientation. Unlike MACD where the histogram shows the speed difference, the CBCI fast/slow crossover directly shows whether RSI momentum is accelerating or decelerating. The table below breaks down each signal on a Daily chart with default parameters.

SignalConditionMeaningReliability on Daily
Bullish CrossoverFast SMA crosses above Slow SMARSI momentum accelerating. The smoothed RSI composite is gaining upward speed, suggesting bullish conditionsHigh when ADX > 20
Bearish CrossoverFast SMA crosses below Slow SMARSI momentum decelerating. The composite is losing upward speed, bearish shift in underlying momentumHigh when ADX > 20
Composite Above ZeroComposite line > 0Total RSI momentum and smoothing is positive. The underlying momentum is bullish overallMedium
Composite Below ZeroComposite line < 0Total RSI momentum is negative. Bearish momentum in the RSI structureMedium
Bullish DivergencePrice lower low, Composite higher lowDownward price momentum is not confirmed by RSI momentum structure. Reversal likely within 5-10 barsHigh on Daily
Bearish DivergencePrice higher high, Composite lower highUpward price move is not supported by RSI momentum structure. Topping pattern likely formingHigh on Daily

Common misinterpretation: A fast SMA crossing above the slow SMA is not a buy signal by itself. The CBCI smoothing pipeline means the fast/slow crossover lags the actual price move by 2-4 bars on the daily chart. If you enter immediately on the crossover, you are buying into momentum that has already been building for several bars. Wait for the composite line itself to also be above zero and for price to confirm with a close above the 5-bar range. I missed this on an NVDA daily trade in November 2023. The fast/slow crossover triggered but price retraced the next bar, and I took a loss because I had not waited for composite zero-line confirmation.

CBCI Trading Strategies

The CBCI works best when used for momentum confirmation with an ADX trend filter and a 200 EMA macro trend reference. I personally use the CBCI fast/slow crossover as a timing tool within a larger trend framework. It tells me when RSI momentum is shifting, then I check whether the macro trend supports the move. Below are three strategies covering trending, reversal, and range-breakout environments.

Strategy 1: Trend Momentum with ADX Filter

Market environment: trending · Best timeframe: Daily, 4H

This strategy uses ADX(14) above 20 to confirm a trending environment before acting on CBCI crossovers. In a trending market, the fast/slow crossover has higher conviction. In low-ADX conditions, the CBCI whipsaws frequently because there is no sustained momentum for the cross to run with.

  1. Calculate ADX(14): adx_val = ta.adx(high, low, close, 14)
  2. Confirm ADX > 20. Only trade when the trend strength is above the threshold
  3. Long entry: adx_val > 20 AND fast SMA crosses above slow SMA AND composite > 0. Confirmed trending market with accelerating RSI momentum above zero
  4. Short entry: adx_val > 20 AND fast SMA crosses below slow SMA AND composite < 0
  5. Stop-loss: 1.5x ATR(14) below the lowest low of the crossover bar (long) or above the highest high (short)
  6. Exit: fast SMA crosses back across the slow SMA, OR the composite crosses zero in the opposite direction

Strategy 2: Composite Divergence Reversal

Market environment: trend reversal · Best timeframe: Daily

CBCI divergence is one of the more reliable reversal signals because the composite catches RSI momentum shifts that plain RSI divergence can miss. When price makes a lower low but the composite makes a higher low, the RSI momentum structure has already turned up before price follows. The key is waiting for the composite to cross back above zero or the fast SMA to cross above the slow SMA before entering.

  1. Identify bullish divergence: price prints a lower low while the composite prints a higher low over a 10-15 bar window
  2. Identify bearish divergence: price prints a higher high while the composite prints a lower high
  3. Entry for bullish divergence: fast SMA crosses above slow SMA AND composite crosses above zero after the divergence. Momentum has confirmed the reversal
  4. Entry for bearish divergence: fast SMA crosses below slow SMA AND composite crosses below zero
  5. Stop-loss: 1x ATR(14) below the divergence low (bullish) or above the divergence high (bearish)
  6. Exit: composite returns to the opposite zero-line cross (first cross after entry), or 3x ATR(14) profit target

The SPY daily showed a clear bullish CBCI divergence in October 2023 when price made a lower low near 4100 but the composite made a higher low. The fast/slow crossover confirmed 3 bars later and SPY rallied to 4600 over the next 2 months. The composite divergence was visible for about 7 bars before the crossover triggered.

Strategy 3: Zero-Line Momentum Breakout

Market environment: range breakout · Best timeframe: 4H, 1H

When the composite crosses above zero after a period of negative readings, it signals RSI momentum has flipped from negative to positive. This zero-line cross is the CBCI equivalent of the MACD line crossing above the signal line. Pair it with a Bollinger Band squeeze for additional conviction that a breakout is genuinely starting.

  1. Calculate Bollinger Bands(20, 2): [middle, upper, lower] = ta.bb(close, 20, 2)
  2. Check for a squeeze: band width narrowing by 10% over the last 5 bars
  3. Long entry: composite crosses above zero after at least 3 bars below zero AND fast SMA > slow SMA AND price closes above the upper Bollinger Band
  4. Short entry: composite crosses below zero after at least 3 bars above zero AND fast SMA < slow SMA AND price closes below the lower Bollinger Band
  5. Stop-loss: 1x ATR(14) below the entry bar's low (long) or above the entry bar's high (short)
  6. Exit: composite crosses back across zero OR fast SMA crosses back across slow SMA

This setup works best on 4H charts where the squeeze pattern is recognizable. I tested it on ES futures 4H from 2022-2023 and the combined signal triggered 8 setups with 5 winners, average win roughly 1.5x ATR.

StrategyMarket TypeWin Rate RangeBest PairRisk Level
Trend MomentumTrending~55-65%ADX(14) + ATRMedium
Divergence ReversalTrend Reversal~50-60%Price actionMedium
Zero-Line BreakoutRange Breakout~50-60%Bollinger BandsMedium-High

Win rate ranges are approximate illustrations based on 2020-2024 S&P 500 data. Past performance does not guarantee future results.

Disclaimer: The strategies above are for educational purposes only and do not constitute investment advice. Past performance does not guarantee future results. Always apply proper risk management and position sizing.

CBCI vs MACD vs Standard RSI

How does the Constance Brown Composite Index compare to the two oscillators it most resembles: the MACD and the standard RSI? All three use signal line crossovers as primary triggers, but they operate on different data. The MACD works on raw price differences, RSI works on the gain/loss ratio, and CBCI works on RSI momentum. The table below lays out the differences.

FeatureCBCIMACDRSI
TypeDual-layer momentumTrend-following momentumMomentum oscillator
Input dataRSI of priceEMA of pricePrice gain/loss
ScaleUnboundedUnbounded (normalized)0-100 fixed
Lag levelHigh (multi-layer)MediumLow
Best marketTrending with momentum shiftsTrendingRanging
Signals / year (Daily)~8-12~10-20~15-30
Crossover referenceRSI momentum vs smoothed RSIFast EMA vs slow EMA70/30 level cross (not SMA)

When do you pick one? I reach for the CBCI when standard RSI readings are stuck in neutral (40-60) and I suspect momentum is shifting beneath the surface. The CBCI fast/slow crossover catches those subtle shifts that the RSI level system does not show. The MACD is a better choice for trending markets where you want price-based momentum with moderate lag. The MACD histogram directly shows the acceleration of the price trend, which CBCI does not. Standard RSI is better for clean overbought/oversold level trading in ranging markets.

The practical difference comes down to what you want to measure. RSI measures price momentum. MACD measures price trend momentum. CBCI measures RSI momentum. If you want to know whether the RSI itself is accelerating or decelerating, CBCI is the tool. If you want the simplest overbought/oversold read, use standard RSI. I personally run CBCI and RSI side by side on my daily charts. The CBCI fast/slow crossover gives me timing, and the RSI levels give me context.

Common Mistakes When Using the CBCI

  1. 1. Using CBCI on short timeframes without adjusting parameters

    The multi-layer smoothing means the default 13/33 fast/slow setup on a 5M chart covers over an hour of data for the fast SMA alone. The signal arrives after the move is over. Scale everything down: rsi_length to 5-7, fast_length to 5-8, slow_length to 13-21 for sub-1H charts.

  2. 2. Treating the fast/slow crossover as a standalone entry

    The crossover tells you RSI momentum has shifted, but it has been shifting for 2-4 bars already due to the SMA smoothing. Always confirm with price action or a composite zero-line cross. Entering on the crossover alone leads to buying peaks and selling troughs.

  3. 3. Ignoring the slow SMA direction

    The slow SMA (33-period) is the baseline trend reference for CBCI momentum. If the slow SMA is sloping down but the fast SMA briefly crosses above it, that is a counter-trend blip, not a reversal. Only trade crossovers that align with the slow SMA direction.

  4. 4. Forgetting the ADX filter

    CBCI crossovers in low-ADX environments (ADX below 20) have roughly half the follow-through rate of crossovers in trending conditions. The indicator was designed to detect momentum shifts, but if the market has no momentum at all, the crossovers reverse before the trade develops. I checked my 2023 trade log and roughly 12 of 15 losing CBCI trades had ADX below 17 at entry.

  5. 5. Using CBCI in place of RSI

    CBCI is not a replacement for RSI. It is a supplementary tool for measuring RSI momentum. If you only use CBCI, you lose the 70/30 level-based overbought/oversold signals that make RSI useful in ranging markets. Run them side by side. CBCI gives you timing, RSI gives you context.

  6. 6. Setting the fast and slow SMA too close together

    If fast_length and slow_length are too close (say 10 and 14), the lines cross constantly. 50+ signals per year on daily charts, most of them noise. The 13/33 default gap of 20 bars is intentionally wide. If you tighten it, expect a sharp increase in whipsaws. A gap of at least 10 bars between fast and slow is the minimum I would recommend.

How to Generate the CBCI Indicator in Pineify

  1. 1

    Open Pineify

    Go to pineify.app and sign in. A free account is all you need to generate the Constance Brown Composite Index and any other custom Pine Script indicator without paying.

  2. 2

    Click "New Indicator"

    Select "Indicator" from the Pineify dashboard creation menu. This opens the AI Coding Agent that converts your description into complete Pine Script v6 code.

  3. 3

    Describe the CBCI configuration you need

    Type a prompt like: "Generate a Constance Brown Composite Index with RSI length 14, RSI momentum length 9, and fast/slow SMA at 13/33. Plot the composite, fast SMA, and slow SMA with a zero line." Pineify generates the full code in seconds.

  4. 4

    Copy to TradingView

    Click "Copy to TradingView" to copy the generated code. Open TradingView, launch the Pine Script editor with Alt+P, paste the code, and click "Add to chart." The CBCI appears as red composite, green fast SMA, and orange slow SMA lines in a separate pane.

  5. 5

    Adjust the parameters for your timeframe

    Open the indicator settings panel in TradingView. For 4H-Daily swing trading, keep the defaults. For shorter timeframes, reduce rsi_length to 8, fast_length to 8, and slow_length to 21. The source defaults to close, but hl2 can reduce noise on volatile tickers.

Frequently Asked Questions

CBCI in Seconds

Skip the manual Pine Script coding. Pineify's AI Coding Agent generates complete, ready-to-use Constance Brown Composite Index indicators with custom RSI periods, momentum lengths, and fast/slow SMA configurations. Instantly for free.

Try Pineify Free