OPEN-SOURCE SCRIPT
Updated Candle Sweep Alert - Moon

This Pine Script is designed to detect Bearish Sweep and Bullish Sweep patterns on a TradingView chart and trigger alerts and notifications.
Bearish Sweep occurs when the current candle’s high is higher than the previous high, the close is lower than the open (bearish), and the current low is either lower or higher than the previous low.
Bullish Sweep occurs when the current candle’s low is lower than the previous low, the close is higher than the open (bullish), and the current high is either lower or higher than the previous high.
Alerts and notifications will be triggered when these conditions are met, helping traders monitor market movements automatically.
Bearish Sweep occurs when the current candle’s high is higher than the previous high, the close is lower than the open (bearish), and the current low is either lower or higher than the previous low.
Bullish Sweep occurs when the current candle’s low is lower than the previous low, the close is higher than the open (bullish), and the current high is either lower or higher than the previous high.
Alerts and notifications will be triggered when these conditions are met, helping traders monitor market movements automatically.
Release Notes
This Pine Script is designed to detect Bearish Sweep and Bullish Sweep patterns on a TradingView chart and trigger alerts and notifications.Bearish Sweep occurs when the current candle’s high is higher than the previous high, the close is lower than the open (bearish), and the current low is either lower or higher than the previous low.
Bullish Sweep occurs when the current candle’s low is lower than the previous low, the close is higher than the open (bullish), and the current high is either lower or higher than the previous high.
Alerts and notifications will be triggered when these conditions are met, helping traders monitor market movements automatically.
Release Notes
This Pine Script is designed to detect Bearish Sweep and Bullish Sweep patterns on a TradingView chart and trigger alerts and notifications.Bearish Sweep occurs when the current candle’s high is higher than the previous high, the close is lower than the open (bearish), and the current low is either lower or higher than the previous low.
Bullish Sweep occurs when the current candle’s low is lower than the previous low, the close is higher than the open (bullish), and the current high is either lower or higher than the previous high.
Alerts and notifications will be triggered when these conditions are met, helping traders monitor market movements automatically.
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.