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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.