[TradersPost] Simple Trend Lines

This script is designed to identify and visualize trends based on pivot highs and pivot lows over a user-defined timeframe on trading charts. It enhances trading strategy by dynamically plotting trend lines and adjusting to price changes, providing traders with real-time insights into potential breakout or breakdown points. This utility is crucial for those looking to refine entry and exit strategies based on technical trend analysis.


Dynamic Trend Lines: Automatically draws and updates trend lines based on pivot highs and pivot lows, helping traders to visualize current trends and potential reversal points.

Customizable Parameters: Offers extensive input options for users to define the number of bars to the left and right of pivots, the number of trends to track, and the sensitivity of the trend detection.

Trend Confirmation and Deletion: Includes features to confirm trends through multiple touchpoints and optionally remove broken trends from the display, keeping the chart uncluttered and focused on relevant information.

Design Flexibility: Users can customize the color and style of trend lines and labels, adapting the visual aspects of the script to their preferences or chart themes.

Performance Optimization: Utilizes efficient data structures and algorithms to manage memory and processing demands, ensuring that the script remains responsive even with extensive data.


This script is provided for informational purposes only and does not guarantee profitability. It is still in the experimental phase and should be used as part of a comprehensive trading strategy that includes risk management and due diligence. Users should trade based on their own analysis and risk tolerance.
Release Notes:
- Added option to switch between ticks and percentage values when using log scale mode.
Release Notes:
- Adjust buffer check to account for log scales.

Protected script
This script is published closed-source but you may use it freely. You can favorite it to use it on a chart. You cannot view or modify its source code.

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?