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.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.