OPEN-SOURCE SCRIPT
Clean Trend System - HTF Bias Filtered

Clean Trend System - HTF Bias Filtered
Overview
Clean Trend System is a trend-following strategy designed to identify high-probability market moves by combining lower timeframe price action with higher timeframe trend confirmation.
The system filters trades using EMA structure, VWAP, RSI momentum, breakout detection, and an automatic Higher Timeframe (HTF) bias filter to avoid trading against the bigger trend.
Key Features
✅ Automatic HTF Trend Bias
- Automatically selects a higher timeframe based on the chart timeframe.
- Confirms bullish/bearish market direction using HTF EMA alignment.
✅ Multi EMA Trend Structure
- Fast EMA, Slow EMA, and Trend EMA identify market structure.
- Trades are only considered when the trend is aligned.
✅ VWAP & EMA Pullback Entries
- Detects pullbacks into EMA/VWAP zones.
- Looks for continuation entries with confirmation candles.
✅ Breakout Detection
- Includes recent high/low breakout logic.
- Captures momentum continuation moves.
✅ Momentum Filter
- Uses ROC momentum and Z-score logic to identify stronger moves.
- Background shading helps visualize momentum conditions.
✅ RSI Confirmation
- Filters weak signals and helps avoid overextended entries.
✅ Signal Control
- Prevents repeated signals in the same direction.
- Resets when trend conditions change.
Buy Conditions (Simplified)
A BUY signal appears when:
- Lower timeframe trend is bullish
- Higher timeframe bias is not bearish
- Momentum and RSI conditions confirm
- Pullback or breakout setup is detected
Sell Conditions (Simplified)
A SELL signal appears when:
- Lower timeframe trend is bearish
- Higher timeframe bias is not bullish
- Momentum and RSI conditions confirm
- Pullback or breakdown setup is detected
Recommended Usage
- Works best in trending markets.
- Can be used on intraday and swing timeframes.
- Always combine with proper risk management.
Disclaimer
This script is for educational and research purposes only. It is not financial advice. Past performance does not guarantee future results. Always test and adjust settings for your market.
Overview
Clean Trend System is a trend-following strategy designed to identify high-probability market moves by combining lower timeframe price action with higher timeframe trend confirmation.
The system filters trades using EMA structure, VWAP, RSI momentum, breakout detection, and an automatic Higher Timeframe (HTF) bias filter to avoid trading against the bigger trend.
Key Features
✅ Automatic HTF Trend Bias
- Automatically selects a higher timeframe based on the chart timeframe.
- Confirms bullish/bearish market direction using HTF EMA alignment.
✅ Multi EMA Trend Structure
- Fast EMA, Slow EMA, and Trend EMA identify market structure.
- Trades are only considered when the trend is aligned.
✅ VWAP & EMA Pullback Entries
- Detects pullbacks into EMA/VWAP zones.
- Looks for continuation entries with confirmation candles.
✅ Breakout Detection
- Includes recent high/low breakout logic.
- Captures momentum continuation moves.
✅ Momentum Filter
- Uses ROC momentum and Z-score logic to identify stronger moves.
- Background shading helps visualize momentum conditions.
✅ RSI Confirmation
- Filters weak signals and helps avoid overextended entries.
✅ Signal Control
- Prevents repeated signals in the same direction.
- Resets when trend conditions change.
Buy Conditions (Simplified)
A BUY signal appears when:
- Lower timeframe trend is bullish
- Higher timeframe bias is not bearish
- Momentum and RSI conditions confirm
- Pullback or breakout setup is detected
Sell Conditions (Simplified)
A SELL signal appears when:
- Lower timeframe trend is bearish
- Higher timeframe bias is not bullish
- Momentum and RSI conditions confirm
- Pullback or breakdown setup is detected
Recommended Usage
- Works best in trending markets.
- Can be used on intraday and swing timeframes.
- Always combine with proper risk management.
Disclaimer
This script is for educational and research purposes only. It is not financial advice. Past performance does not guarantee future results. Always test and adjust settings for your market.
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.