OPEN-SOURCE SCRIPT

Ultra Trendlines

Cập nhật
This indicator automatically draws trendlines based on every pivot point, helping traders visualize key support and resistance levels. It dynamically adjusts as new pivots are detected and validates the trendlines against price movement.

Introduction
The Ultra Trendlines indicator is designed to help traders identify and track significant trendlines on their charts. By automatically detecting pivot points (both highs and lows), it draws trendlines that highlight key market movements. These trendlines are valuable for understanding the broader trend and for making informed trading decisions.

Detailed Description
The indicator analyzes price data to find pivot points highs and lows over a user-defined lookback period. Once a pivot is detected, it draws trendlines between the pivot points.

.........
  1. Accuracy
    To ensure accuracy, the indicator only keeps trendlines that are confirmed by price action. It checks if the price crosses the trendline and deletes invalid lines.
    Additionally, it checks if the trendlines stay within predefined price thresholds, filtering out irrelevant lines that are too far from current price action.
    The indicator also has an option to only show "rising lows" and "falling highs" trendlines, offering further precision in trend direction.
    As new pivots are detected, older trendlines that fall outside the lookback period are removed, ensuring the chart remains clean.


    .....

  2. Style
    The trendlines can extend forward (infinite and userdefined), backward, both or none. The lines are drawn with a customizable style (solid, dotted, or dashed), color, and width.


.........

Summary of Key Points
The indicator automatically detects pivot points (highs and lows) and draws trendlines based on them. It allows you to customize the style, color, and width of the trendlines. The indicator filters out invalid trendlines by checking if they are still relevant based on price action and price thresholds. Additionally, you can choose to only display rising lows and falling highs for more accurate trend analysis. It also removes outdated trendlines to keep the chart clean.
Phát hành các Ghi chú
updated the script logic where trendlines will be deleted and added an option to display last X broken trendlines in desired settings.
Broken Trendlines are not affected by Lookback!!
Phát hành các Ghi chú
added a new filter for trendlines
automaticautotrendlineautotrendlinesChart patternsTrend Analysis

Mã nguồn mở

Theo tinh thần TradingView thực sự, tác giả của tập lệnh này đã xuất bản dưới dạng nguồn mở để các nhà giao dịch có thể hiểu và xác minh. Chúc mừng tác giả! Bạn có thể sử dụng miễn phí. Tuy nhiên, bạn cần sử dụng lại mã này theo Quy tắc nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?

Thông báo miễn trừ trách nhiệm