Support Resistance Channels


Hidden Redirect Link
Loading...

Overview

Support Resistance Channels is an automated technical indicator that identifies, calculates, and plots historical support and resistance zones. This is a 100% mathematically exact port of the original algorithm developed by LonesomeTheBlue, ensuring identical logic and outputs.

Core Algorithm

The indicator operates by scanning historical data for Pivot Highs and Pivot Lows. Instead of drawing single horizontal lines, the algorithm clusters overlapping pivots into unified price channels based on a user-defined maximum width.

Each generated channel is evaluated using a dynamic scoring system. The "strength" of a channel increases with every historical price interaction (touches or penetrations) within a specific loopback period. The script then applies a sorting algorithm to filter out noise, displaying only the highest-ranked, non-overlapping channels up to a specified limit.

Technical Features

  • Pivot Point Detection: Configurable left/right bar periods. Calculates using High/Low or Close/Open data.
  • Channel Clustering: Adjustable maximum channel width, calculated as a percentage of the highest/lowest price range over the last 300 bars.
  • Strength Filtering: Set a minimum strength threshold to ignore weak levels. Limits the maximum number of displayed channels (up to 10) to keep the chart clean.
  • Breakout Detection: Plots objective visual markers (arrows) when the closing price breaks out of an established channel.
  • Integrated Moving Averages: Includes two optional, independently configurable Moving Averages (SMA or EMA) with adjustable lengths.

Credits: Original algorithm and Pine Script implementation by LonesomeTheBlue. This version is a true algorithmic port built for precise mathematical parity.

© Licensed under MIT

Comments

loading