OPEN-SOURCE SCRIPT

Constance Brown RSI with Composite Index

733
Constance Brown RSI with Composite Index
Overview

This indicator combines Constance Brown's RSI interpretation methodology with a Composite Index and ATR Distance to VWAP measurement to provide a comprehensive trading tool. It helps identify trends, momentum shifts, overbought/oversold conditions, and potential reversal points.

Key Features

  • Color-coded RSI zones for immediate trend identification
  • Composite Index for momentum analysis and divergence detection
  • ATR Distance to VWAP for identifying extreme price deviations
  • Automatic divergence detection for early reversal warnings
  • Pre-configured alerts for key trading signals


How to Use This Indicator
Trend Identification

The RSI line changes color based on its position:

  • Blue zone (RSI > 50): Bullish trend - look for buying opportunities
  • Purple zone (RSI < 50): Bearish trend - look for selling opportunities
  • Gray zone (RSI 40-60): Neutral/transitional market - prepare for potential breakout


The 40-50 area (light blue fill) acts as support during uptrends, while the 50-60 area (light purple fill) acts as resistance during downtrends.

// From the code:
Pine Script®
upTrendZone = rsiValue > 50 and rsiValue <= 90 downTrendZone = rsiValue < 50 and rsiValue >= 10 neutralZone = rsiValue > 40 and rsiValue < 60 rsiColor = neutralZone ? neutralRSI : upTrendZone ? upTrendRSI : downTrendRSI


Momentum Analysis

The Composite Index (fuchsia line) provides momentum confirmation:

  • Values above 50 indicate positive momentum
  • Values below 40 indicate negative momentum
  • Crossing above/below these thresholds signals potential momentum shifts


// From the code:
Pine Script®
compositeIndexRaw = rsiChange / ta.stdev(rsiValue, rsiLength) compositeIndex = ta.sma(compositeIndexRaw, compositeSmoothing) compositeScaled = compositeIndex * 10 + 50 // Scaled to fit 0-100 range


Overbought/Oversold Detection

The ATR Distance to VWAP table in the top-right corner shows how far price has moved from VWAP in terms of ATR units:
*
*Extreme positive values (orange/red): Potentially overbought
*Extreme negative values (purple/red): Potentially oversold
*Near zero (gray): Price near average value
*

// From the code:
Pine Script®
priceDistance = (close - vwapValue) / ta.atr(atrPeriod) // Color coding based on distance value


Divergence Trading

The indicator automatically detects divergences between the Composite Index and price:

  • Bullish divergence: Price makes lower low but Composite Index makes higher low
  • Bearish divergence: Price makes higher high but Composite Index makes lower high


// From the code:
Pine Script®
divergenceBullish = ta.lowest(compositeIndex, rsiLength) > ta.lowest(close, rsiLength) divergenceBearish = ta.highest(compositeIndex, rsiLength) < ta.highest(close, rsiLength)


Trading Strategies
Trend Following


1. Identify the trend using RSI color:
Blue = Uptrend, Purple = Downtrend
2. Wait for pullbacks to support/resistance zones:
In uptrends: Buy when RSI pulls back to 40-50 zone and bounces
In downtrends: Sell when RSI rallies to 50-60 zone and rejects
3. Confirm with Composite Index:
Uptrends: Composite Index stays above 50 or quickly returns above it
Downtrends: Composite Index stays below 50 or quickly returns below it
4. Manage risk using ATR Distance:
Take profits when ATR Distance reaches extreme values
Place stops beyond recent swing points

Reversal Trading
1. Look for divergences
Bullish: Price makes lower low but Composite Index makes higher low
Bearish: Price makes higher high but Composite Index makes lower high
2. Confirm with ATR Distance:
Extreme readings suggest potential reversals
3. Wait for RSI zone transition:
Bullish: RSI crosses above 40 (purple to neutral/blue)
Bearish: RSI crosses below 60 (blue to neutral/purple)
4. Enter after confirmation:
Use candlestick patterns for precise entry
Place stops beyond the divergence point


Four pre-configured alerts are available:
  • Momentum High: Composite Index above 50
  • Momentum Low: Composite Index below 40
  • Bullish Divergence: Composite Index higher low
  • Bearish Divergence: Composite Index lower high


Customization
*Adjust these parameters to optimize for your trading style:
*RSI Length: Default 14, lower for more sensitivity, higher for fewer signals
*Composite Index Smoothing: Default 10, lower for quicker signals, higher for less noise
*ATR Period: Default 14, affects the ATR Distance to VWAP calculation
*

This indicator works well across various markets and timeframes, though the default settings are optimized for daily charts. Adjust parameters for shorter or longer timeframes as needed.
Happy trading!

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.