OPEN-SOURCE SCRIPT
4H Sweep Alert by Guhan

4H Sweep Alert Strategy
This indicator generates an alert when a 4-hour candle performs a liquidity sweep of the previous candle and closes strongly in the opposite direction, indicating a potential trend continuation or reversal.
Target
Target- 1:1
Stop loss - Alert candle low
Entry - After the close of the alert candle
Long Alert Conditions
A Buy Alert is triggered only when all of the following conditions are met:
The previous candle is bullish (green).
The previous candle is not a Doji and has a clearly defined body.
The current 4-hour candle sweeps below the previous candle's Low.
The current 4-hour candle closes above the previous candle's High.
The alert is generated only after the candle closes.
Short Alert Conditions
A Sell Alert is triggered only when all of the following conditions are met:
The previous candle is bearish (red).
The previous candle is not a Doji and has a clearly defined body.
The current 4-hour candle sweeps above the previous candle's High.
The current 4-hour candle closes below the previous candle's Low.
The alert is generated only after the candle closes.
Filters
To improve the quality of the alerts, the indicator ignores the following market conditions:
Doji or indecisive previous candles, as they do not represent strong directional intent.
Range-bound or sideways markets, where this pattern has a higher probability of producing false signals.
This setup is designed to perform best in established trending markets, where liquidity sweeps are more likely to result in strong directional moves.
This indicator generates an alert when a 4-hour candle performs a liquidity sweep of the previous candle and closes strongly in the opposite direction, indicating a potential trend continuation or reversal.
Target
Target- 1:1
Stop loss - Alert candle low
Entry - After the close of the alert candle
Long Alert Conditions
A Buy Alert is triggered only when all of the following conditions are met:
The previous candle is bullish (green).
The previous candle is not a Doji and has a clearly defined body.
The current 4-hour candle sweeps below the previous candle's Low.
The current 4-hour candle closes above the previous candle's High.
The alert is generated only after the candle closes.
Short Alert Conditions
A Sell Alert is triggered only when all of the following conditions are met:
The previous candle is bearish (red).
The previous candle is not a Doji and has a clearly defined body.
The current 4-hour candle sweeps above the previous candle's High.
The current 4-hour candle closes below the previous candle's Low.
The alert is generated only after the candle closes.
Filters
To improve the quality of the alerts, the indicator ignores the following market conditions:
Doji or indecisive previous candles, as they do not represent strong directional intent.
Range-bound or sideways markets, where this pattern has a higher probability of producing false signals.
This setup is designed to perform best in established trending markets, where liquidity sweeps are more likely to result in strong directional moves.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.