All indicators

RSI Trendlines with Breakouts

Mar 7, 2023

Static chart image
SignalsOscillatorsPivot Based (Retrospective)Repainting Functionality

The RSI Trendlines with Breakouts indicator is a pivot-based visualization tool designed to automatically identify and project trendlines directly on the Relative Strength Index (RSI) to highlight potential momentum shifts. By applying technical trendline analysis to an oscillator, it helps traders identify breakouts and direction changes that might not be as immediately apparent on the price chart alone.

Usage

The script automatically detects swing highs and lows on the RSI to anchor trendlines. When the RSI value crosses these projected lines, a breakout signal is generated.

  • Bullish Breakouts: Occur when the RSI breaks above a descending trendline connected by RSI pivot highs.
  • Bearish Breakouts: Occur when the RSI breaks below an ascending trendline connected by RSI pivot lows.
  • Trendline Confluence: Use these breakouts as secondary confirmation for price action setups. For instance, an RSI trendline breakout occurring simultaneously with a price resistance breakout can signal stronger momentum.

Details

The indicator uses a specialized pivot-based system to monitor real-time swing levels. A new pivot event is triggered based on the lookback range after a dip or peak is confirmed.

To calculate the projections, the script determines the slope between the two most recent pivot points. It then extends this slope forward to the current bar. A unique "RSI Difference" filter is applied, requiring the RSI to exceed the trendline value by a specific threshold before a breakout is confirmed, which helps filter out minor fluctuations or "noise" around the trendline.

Settings

Trendline Settings

  • Lookback Range: Defines the number of bars used to determine a swing high or low for pivot detection.
  • RSI Length: The lookback period for the Relative Strength Index calculation.
  • RSI Source: The price data point (e.g., Close, HL2) used to calculate the RSI.

Conditions

  • Repainting: Choose between "On" for real-time updates or "Off: Bar Confirmation" to ensure signals only trigger after the candle closes.
  • RSI Difference: The required margin between the RSI value and the trendline to trigger a breakout label.

Styling

  • RSI Color: Customizes the color of the RSI line.
  • Line Width: Adjusts the thickness of the plotted trendlines.
  • Label Type: Choose between "Simple" (Br) or "Full" (Break) for the chart labels.
  • Pivot Colors: Individual color settings for pivot high and pivot low trendlines.

FAQ

How do I access RSI Trendlines with Breakouts?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Why does the trendline change after a breakout?

Once a breakout is confirmed, the script "locks" the breakout point and stops extending that specific trendline, often marking the event with a dotted line to show where the trigger occurred.

Can I use this on any timeframe?

Yes, the indicator includes a Timeframe setting that allows you to calculate RSI trendlines from a higher timeframe while viewing a lower timeframe chart, or simply leave it blank to match your current chart.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.