OPEN-SOURCE SCRIPT
Filtered TEMA Crossover

Filtered Dual TEMA Crossover
This indicator is a trend-following tool based on the classic Dual Triple Exponential Moving Average (TEMA) Crossover strategy, enhanced with two robust filters: the Chop Index and the Average Directional Index (ADX).
The TEMA is known for its low lag and high responsiveness, making the crossover an effective signal for trend reversals. However, trading TEMA crossovers during sideways, choppy markets often leads to false signals. This is where the filters come in.
Key Features
▪️Dual TEMA Crossover: Plots two customizable TEMA lines (Fast and Slow) for clear visualization of the primary trend direction.
▪️Intelligent Signal Filtering: Buy and Sell signals are generated only when the market confirms it is in a trending state, thanks to two integrated filters:
➖Chop Index Filter: Blocks signals when the market is detected as sideways or consolidating (Chop Index reading above a user-defined threshold).
➖ADX Filter: Ensures signals are only taken when the trend strength is sufficient (ADX reading above a user-defined minimum threshold).
▪️Customizable Signals: Full control over the signal shapes (Arrows, Triangles, etc.), colors, text, and size.
How to Use It
Use the Filtered Dual TEMA Crossover to enter positions on trend continuation or reversal while dramatically reducing exposure to low-quality, whipsawing signals common in non-trending environments.
Before the filters:

After the filters:

Minimize Noise. Maximize Clarity. Trade the Trend.
This indicator is a trend-following tool based on the classic Dual Triple Exponential Moving Average (TEMA) Crossover strategy, enhanced with two robust filters: the Chop Index and the Average Directional Index (ADX).
The TEMA is known for its low lag and high responsiveness, making the crossover an effective signal for trend reversals. However, trading TEMA crossovers during sideways, choppy markets often leads to false signals. This is where the filters come in.
Key Features
▪️Dual TEMA Crossover: Plots two customizable TEMA lines (Fast and Slow) for clear visualization of the primary trend direction.
▪️Intelligent Signal Filtering: Buy and Sell signals are generated only when the market confirms it is in a trending state, thanks to two integrated filters:
➖Chop Index Filter: Blocks signals when the market is detected as sideways or consolidating (Chop Index reading above a user-defined threshold).
➖ADX Filter: Ensures signals are only taken when the trend strength is sufficient (ADX reading above a user-defined minimum threshold).
▪️Customizable Signals: Full control over the signal shapes (Arrows, Triangles, etc.), colors, text, and size.
How to Use It
Use the Filtered Dual TEMA Crossover to enter positions on trend continuation or reversal while dramatically reducing exposure to low-quality, whipsawing signals common in non-trending environments.
Before the filters:
After the filters:
Minimize Noise. Maximize Clarity. Trade the Trend.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.