PineCodersTASC

TASC 2024.02 Price-Time Filtering

█ OVERVIEW

This script implements a price-time trend filter proposed by Alfred François Tagher in the “Trend Identification By Price And Time Filtering” article from the February 2024 edition of TASC's Traders' Tips.


█ CONCEPTS

In his article, Alfred François Tagher proposed a rule set designed to minimize the impact of stochastic price movements, facilitating the identification of larger-scale trends. The rules are:
• If the most recent week's close exceeds the previous week's high, the trend is up.
• If the most recent week's close is below the previous week's low, the trend is down.
• The trend remains unchanged until one of the above conditions occurs.
Similar rules can also apply to monthly bars.
The author argues that this approach integrates characteristics of conventional price action and time dynamics filters, so he refers to it as price-time filtering.


█ CALCULATIONS

This script applies the above price-time filtering rules and offers multiple ways to view the results on a chart:
• In the "Oscillator" view mode, the script counts and displays the number of bars in the uptrend and downtrend.
• In the "Linebreak" view mode, the trend filter is presented in a format resembling a point-and-figure (P&F) chart, with the length of each bar corresponding to the high-low range of the respective trend.
• In both view modes, the script offers bar coloring of the main chart based on the identified trend.

Tools and ideas for all Pine coders: www.tradingview.com/u/PineCoders/
Pine news broadcasts: t.me/PineCodersSquawkBox or twitter.com/PineCoders
TASC: traders.com/
Mã nguồn mở

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

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

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

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