OPEN-SOURCE SCRIPT
HTF Control Shift Candles

HTF Control Shift Candles highlights reversal-type candles that show a decisive shift in market control between buyers and sellers. These candles are detected by measuring wick length relative to the entire range and the close’s position within that range. A bullish control shift occurs when a candle forms with a long lower wick and closes in the top portion of its range, showing strong rejection of lower prices and a buyer takeover. A bearish control shift occurs when a candle forms with a long upper wick and closes in the bottom portion of its range, showing rejection of higher prices and a seller takeover. Candles are automatically recolored for fast visual recognition, and alerts are built in so traders never miss a potential shift in control.
This tool is specifically designed for 30-minute and higher timeframes, where control shift candles carry greater significance for swing and intraday setups. Inputs allow you to adjust wick percentage (wickPct) and body percentage (bodyPct) thresholds for different levels of sensitivity. For example, with wickPct = 0.5 and bodyPct = 0.3, a bullish control shift requires the lower wick to be at least 50% of the entire range and the close to finish in the top 30%. By tuning these values, traders can refine the detection for different volatility regimes or personal trading strategies.
Bar Close Confirmation Only
This indicator confirms signals only after the candle has closed. The calculation requires final values for open, high, low, and close, which are not fixed until the bar finishes forming. That means no mid-bar or intrabar repainting — alerts and highlights trigger only once the bar is complete. For example, if a candle temporarily has a long lower wick but closes back in the middle of its range, it will not be marked as a bullish control shift. This ensures accuracy by waiting for the final candle close before confirming that buyers or sellers truly maintained control.
Control shift candles can be especially useful around liquidity sweeps, support/resistance zones, or after extended moves, as they often mark key turning points. A bullish control shift near demand may provide an early entry confirmation for longs, while a bearish control shift at supply may signal short opportunities or exits from longs. This makes the indicator a versatile tool for anticipating reversals, timing entries with precision, and filtering signals on higher timeframes where market structure shifts are most impactful.
This tool is specifically designed for 30-minute and higher timeframes, where control shift candles carry greater significance for swing and intraday setups. Inputs allow you to adjust wick percentage (wickPct) and body percentage (bodyPct) thresholds for different levels of sensitivity. For example, with wickPct = 0.5 and bodyPct = 0.3, a bullish control shift requires the lower wick to be at least 50% of the entire range and the close to finish in the top 30%. By tuning these values, traders can refine the detection for different volatility regimes or personal trading strategies.
Bar Close Confirmation Only
This indicator confirms signals only after the candle has closed. The calculation requires final values for open, high, low, and close, which are not fixed until the bar finishes forming. That means no mid-bar or intrabar repainting — alerts and highlights trigger only once the bar is complete. For example, if a candle temporarily has a long lower wick but closes back in the middle of its range, it will not be marked as a bullish control shift. This ensures accuracy by waiting for the final candle close before confirming that buyers or sellers truly maintained control.
Control shift candles can be especially useful around liquidity sweeps, support/resistance zones, or after extended moves, as they often mark key turning points. A bullish control shift near demand may provide an early entry confirmation for longs, while a bearish control shift at supply may signal short opportunities or exits from longs. This makes the indicator a versatile tool for anticipating reversals, timing entries with precision, and filtering signals on higher timeframes where market structure shifts are most impactful.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.