OPEN-SOURCE SCRIPT
Updated Buy&Sell Hollow Candles

The Hollow Candles Script is a type of candlestick analysis script designed to highlight the following:
Purpose of the Script: This script provides the user with buy and sell signals based on candlesticks that show an upward or downward reversal.
Mechanism of the Script: When a hollow (unfilled) red candle appears, it signals a potential entry, provided that this candle is at a low point, following a series of red candles with higher volume than previous days. Similarly, it gives a sell signal when a green candle appears at a peak with high sell volume surpassing that of prior days. However, the appearance of these candles alone should not prompt an immediate buy or sell; you should wait for a confirming candle to validate the signal.
Sideways Movement Caution: If these signals appear during a sideways or flat trend, it is not advisable to proceed with buying or selling.
Chart Insights: The chart demonstrates certain buy and sell operations along with some non-ideal signals where decision-making should be based on fundamental analytical experience.
Purpose of the Script: This script provides the user with buy and sell signals based on candlesticks that show an upward or downward reversal.
Mechanism of the Script: When a hollow (unfilled) red candle appears, it signals a potential entry, provided that this candle is at a low point, following a series of red candles with higher volume than previous days. Similarly, it gives a sell signal when a green candle appears at a peak with high sell volume surpassing that of prior days. However, the appearance of these candles alone should not prompt an immediate buy or sell; you should wait for a confirming candle to validate the signal.
Sideways Movement Caution: If these signals appear during a sideways or flat trend, it is not advisable to proceed with buying or selling.
Chart Insights: The chart demonstrates certain buy and sell operations along with some non-ideal signals where decision-making should be based on fundamental analytical experience.
Release Notes
This script designed to identify potential buy and sell opportunities based on hollow candle patterns and specific market conditions. It provides visual signals directly on the chart and includes an optional alert system for real-time notifications.Release Notes
Buy & Sell Hollow Candles with MA ColoringA candlestick analysis script with optional moving-average candle coloring and real-time alerts that supports your trading decisions.
Purpose
This indicator highlights potential buy and sell opportunities by:
Generating reversal signals based on hollow-candle patterns (“unfilled” red for buys; “filled” green for sells).
Optionally coloring every candle above/below a user-defined moving average to provide trend context and support your decision making.
Providing on-chart labels and optional alerts so you never miss a setup.
Core Mechanism
Hollow-Candle Signals
Buy: A red candle that closes lower than the prior close yet above its open, appearing at a new swing-low after a streak of red candles (or on a gap).
Sell: A green candle that closes above the prior close yet at or below its open, striking a new swing-high.
Confirmation: Treat these as potential entries; wait for a confirming candle or volume confirmation before acting.
Sideways Caution: In choppy/flat markets, use extra discretion.
Moving-Average Candle Coloring (Optional)
Toggle On/Off: Enable or disable with one checkbox.
Free-form Length: Type any MA length you like (7, 9, 44, 70, 200, etc.).
MA Type Selector: Choose from SMA, EMA, WMA, SMMA/RMA, VWMA or HMA.
Decision Support: When enabled, candles close above the MA in your “up” color (e.g. blue) and below in your “down” color (e.g. fuchsia)—helping you confirm whether the hollow-candle signal aligns with the broader trend.
Real-Time Alerts (Optional)
Enable Alerts to fire TradingView alerts on every buy or sell signal.
Alerts use alert.freq_once_per_bar, so you get one notice per bar as the signal occurs.
Chart Insights
On your chart you’ll see:
Buy/Sell labels at each signal candle (togglable individually).
A MA line and recolored candles (if MA coloring is turned on) that act as a visual filter to reinforce or question each reversal signal.
Alerts pop up in real time (if enabled), so you can step away from the screen.
Release Notes:
New: Integrated optional MA-based candle coloring as a decision-support overlay.
Improved: Single on/off toggle for MA features keeps your chart clean when you only want classic hollow-candle signals.
Maintained: Original hollow-candle logic and optional alert system remain exactly as published.
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.