OPEN-SOURCE SCRIPT
Forecast Trend Filter ~ CharonQuant

The Forecast Trend Filter (FTF) is a trend and momentum confirmation indicator built on the original Forecast Oscillator concept developed by Tushar Chande.
The original Forecast Oscillator measures how far price deviates from a linear regression forecast to highlight momentum shifts.
This version extends that foundation and restructures it into a practical, signal-quality focused trend filter designed for real trading conditions.
What’s different in this implementation:
• Forecast Oscillator combined with slope confirmation to ensure momentum is accelerating, not stalling
• Trend alignment filter using a user-selectable moving average (SMA, EMA, WMA, HMA, ALMA, VWMA)
• Minimum deviation threshold to filter out weak or noisy signals
• Directional state logic that clearly defines bullish, bearish, or neutral conditions
• Visual trend context using adaptive colors, background bias, and overlay plots
Signals are only generated when all conditions align:
• Price deviates meaningfully from its linear regression forecast
• Oscillator slope confirms momentum continuation
• Deviation exceeds the minimum quality threshold
• Price is aligned with the higher-level trend filter
If one condition fails, the signal is ignored.
This design prioritizes signal quality over signal frequency.
Development and usage notes:
This indicator was developed and calibrated on the 1D INDEX:ETHUSD chart.
You must tweak the parameters to fit your market, timeframe, and trading style.
If you do not read this description or do not understand what the indicator is designed to do, do not use it.
Indicators amplify both discipline and mistakes.
Important reminder: No single indicator is sufficient on its own.
The original Forecast Oscillator measures how far price deviates from a linear regression forecast to highlight momentum shifts.
This version extends that foundation and restructures it into a practical, signal-quality focused trend filter designed for real trading conditions.
What’s different in this implementation:
• Forecast Oscillator combined with slope confirmation to ensure momentum is accelerating, not stalling
• Trend alignment filter using a user-selectable moving average (SMA, EMA, WMA, HMA, ALMA, VWMA)
• Minimum deviation threshold to filter out weak or noisy signals
• Directional state logic that clearly defines bullish, bearish, or neutral conditions
• Visual trend context using adaptive colors, background bias, and overlay plots
Signals are only generated when all conditions align:
• Price deviates meaningfully from its linear regression forecast
• Oscillator slope confirms momentum continuation
• Deviation exceeds the minimum quality threshold
• Price is aligned with the higher-level trend filter
If one condition fails, the signal is ignored.
This design prioritizes signal quality over signal frequency.
Development and usage notes:
This indicator was developed and calibrated on the 1D INDEX:ETHUSD chart.
You must tweak the parameters to fit your market, timeframe, and trading style.
If you do not read this description or do not understand what the indicator is designed to do, do not use it.
Indicators amplify both discipline and mistakes.
Important reminder: No single indicator is sufficient on its own.
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.