OPEN-SOURCE SCRIPT

Johnny's Trend Lines, Supports and Resistances

Inspired and based on ismailcarlik's Trend Lines, Supports and Resistances.
Additions include an overall upgrade to Pinescript v5, changes in the way resistance and support levels are calculated, improved visual queues, and additional customization options.

This indicator is meticulously crafted to provide traders with visual tools for identifying trend lines, support, and resistance levels, enhancing the decision-making process in trading activities.

Features and Functionality
Trend Lines: The indicator allows users to enable or disable trend lines, adjust the number of points to check for establishing a trend, and set parameters for trend validation, including the maximum violation and exceptions for the last bars.

Support and Resistance: It offers tools to identify and visualize key support and resistance levels based on recent pivot points. This includes adjustable parameters for the maximum violations allowed and the exclusion of recent bars from the analysis.

Pivot Points: Users can define the pivot length for calculating highs and lows, which helps in marking significant pivot points that are instrumental in trend analysis.

Alerts and Notifications: The indicator is equipped with customizable alerts for trend line breaches and pivot point formations, which can be set to trigger at different frequencies based on user preference.

How It Works
Input Flexibility: Users can adjust various settings like the length of trend lines and pivot points, enabling or disabling specific features like marking pivots, and managing alert settings directly from the indicator’s input panel.

Dynamic Analysis: By analyzing the price action relative to the calculated trend lines and pivot points, the indicator dynamically identifies potential trend reversals, continuations, and significant price levels.

Visualization: It plots trend lines and marks support and resistance levels directly on the chart, with options to extend these lines and add labels for better clarity. Violated trend lines can be visually differentiated by changing their style and width.
Practical Application

Trend Line Strategy: Traders can use the trend lines to determine the strength of the current market trend and to spot potential reversal points.

Support and Resistance Strategy: By marking where the price has historically faced resistance or found support, traders can plan entry and exit points, set stop-loss orders, or identify breakout opportunities.

Pivot Points Strategy: Pivot points serve as vital indicators for intraday trading or long-term trend analysis, providing insights into potential support and resistance levels.
Customization and Alerts

Custom Alerts: Traders can set alerts for when the price crosses trend lines or when new support or resistance levels are formed, helping them stay informed of critical market movements without having to continuously monitor the charts.

Visual Customization: Users can personalize the appearance of trend lines and labels, choosing from a variety of colors and styles to match their chart setup or preferences.

"Johnny's Trend Lines, Supports and Resistances" is an essential tool for traders who rely on technical analysis, offering detailed insights and real-time updates on market conditions, trend strength, and potential price barriers.
Candlestick analysisdetectionforecastforecastingresistencesupportSupport and ResistancesupportandresistancezonessupportbreakouttrendlineanalysisTrend Line Breaktrendtrading

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer