OPEN-SOURCE SCRIPT
HTF ChoCh Wick Scalper

The SMC HTF ChoCh & Single-Wick Alignment is an institutional-grade trend-following indicator designed for TradingView. It blends advanced Smart Money Concepts (SMC) market structure tracking with precise candlestick anatomy filters. By analyzing structural shifts on a Higher Timeframe (HTF), the indicator filters out minor market noise and internal pullbacks on the lower timeframe (LTF), pinpointing high-probability entry candles that align perfectly with the macro order flow.
Objective (The Purpose)
The main objective of this indicator is to ensure traders only trade with the dominant institutional trend and completely avoid "trap" setups during corrections.
By hard-locking the market direction to the Higher Timeframe's ChoCh (Change of Character), the indicator eliminates counter-trend trading. It ensures that lower-timeframe single-wick reversal candles (like Hammers or Shooting Stars) are only highlighted when they represent institutional mitigation or the completion of a pullback in the direction of the macro trend.
How It Works
The indicator operates through a strict three-step filtering process:
1. Higher Timeframe (HTF) Pivot Tracking
The script continuously monitors a user-defined Higher Timeframe (e.g., 5-Minute structure while trading on a 1-Minute chart). It uses a dynamic Pivot mechanism (ta.pivothigh and ta.pivotlow) to identify major institutional swing highs and swing lows on the HTF.
2. HTF Change of Character (ChoCh) Detection
Bullish ChoCh: When the HTF candle body closes above the last confirmed HTF swing high, a Bullish ChoCh is triggered. The indicator locks into a Bullish state.
Bearish ChoCh: When the HTF candle body closes below the last confirmed HTF swing low, a Bearish ChoCh is triggered. The indicator locks into a Bearish state.
Note: Local structural breaks on the lower timeframe are completely ignored, treating them merely as temporary market corrections.
3. Candlestick Anatomy Filtering & Bar Coloring
Once the HTF trend state is locked, the indicator scans the current lower-timeframe candles for specific institutional footprints:
In a Bullish HTF State: The indicator looks only for candles with a bottom wick and absolutely no top wick (signaling strong buying pressure and liquidity sweeps). These bars are colored Green.
In a Bearish HTF State: The indicator looks only for candles with a top wick and absolutely no bottom wick (signaling heavy selling pressure and supply mitigation). These bars are colored Red.
Any candle that does not meet these strict rules or moves against the HTF ChoCh remains its default chart color.
Objective (The Purpose)
The main objective of this indicator is to ensure traders only trade with the dominant institutional trend and completely avoid "trap" setups during corrections.
By hard-locking the market direction to the Higher Timeframe's ChoCh (Change of Character), the indicator eliminates counter-trend trading. It ensures that lower-timeframe single-wick reversal candles (like Hammers or Shooting Stars) are only highlighted when they represent institutional mitigation or the completion of a pullback in the direction of the macro trend.
How It Works
The indicator operates through a strict three-step filtering process:
1. Higher Timeframe (HTF) Pivot Tracking
The script continuously monitors a user-defined Higher Timeframe (e.g., 5-Minute structure while trading on a 1-Minute chart). It uses a dynamic Pivot mechanism (ta.pivothigh and ta.pivotlow) to identify major institutional swing highs and swing lows on the HTF.
2. HTF Change of Character (ChoCh) Detection
Bullish ChoCh: When the HTF candle body closes above the last confirmed HTF swing high, a Bullish ChoCh is triggered. The indicator locks into a Bullish state.
Bearish ChoCh: When the HTF candle body closes below the last confirmed HTF swing low, a Bearish ChoCh is triggered. The indicator locks into a Bearish state.
Note: Local structural breaks on the lower timeframe are completely ignored, treating them merely as temporary market corrections.
3. Candlestick Anatomy Filtering & Bar Coloring
Once the HTF trend state is locked, the indicator scans the current lower-timeframe candles for specific institutional footprints:
In a Bullish HTF State: The indicator looks only for candles with a bottom wick and absolutely no top wick (signaling strong buying pressure and liquidity sweeps). These bars are colored Green.
In a Bearish HTF State: The indicator looks only for candles with a top wick and absolutely no bottom wick (signaling heavy selling pressure and supply mitigation). These bars are colored Red.
Any candle that does not meet these strict rules or moves against the HTF ChoCh remains its default chart color.
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.