OPEN-SOURCE SCRIPT
Bullish Candle Ratio

Introduction
Bullish Candle Ratio is a market statistics indicator that measures the percentage of bullish candles within a selected lookback period.
Instead of focusing on price levels or moving averages, the indicator evaluates the balance between bullish and bearish candles. This provides a simple overview of market participation and directional dominance over recent bars.
The result is displayed as a percentage between 0% and 100%, making it easy to assess whether buyers or sellers have been more active during the selected period.
How It Works
The indicator counts how many candles closed above their opening price during the selected lookback period.
The Bullish Candle Ratio is calculated as:
Bullish Candle Ratio = (Number of Bullish Candles ÷ Lookback Period) × 100
For example, if 15 out of the last 20 candles are bullish, the Bullish Candle Ratio equals 75%.
Key Features
Market Participation
Quickly measures whether buyers or sellers have dominated recent price action.
Easy to Read
Values range from 0% to 100%, making interpretation straightforward.
Trend Confirmation
High readings often support bullish market conditions, while low readings indicate bearish dominance.
Lightweight
Requires only basic candle calculations, making it suitable for all markets and timeframes.
Interpretation
Above 80%
Strong bullish dominance.
Most recent candles have closed higher than they opened.
Between 60% and 80%
Moderately bullish conditions.
Buyers are controlling the majority of recent price action.
Around 50%
Balanced market.
Neither buyers nor sellers have established clear dominance.
Between 20% and 40%
Moderately bearish conditions.
Selling pressure has become more noticeable.
Below 20%
Strong bearish dominance.
Most recent candles have closed lower than they opened.
Alert Conditions
The indicator includes two alert conditions.
Bullish Ratio Increasing
Triggered when the Bullish Candle Ratio crosses above 60%.
Bearish Ratio Increasing
Triggered when the Bullish Candle Ratio crosses below 40%.
Example Applications
- Measuring short-term market sentiment.
- Confirming trend strength.
- Monitoring shifts in buying and selling pressure.
- Comparing bullish participation across different markets.
- Supporting price action analysis.
Notes
Bullish Candle Ratio is intended to measure market participation rather than generate trading signals.
A high bullish ratio does not guarantee that prices will continue rising, just as a low ratio does not guarantee further declines.
The indicator is most effective when combined with trend analysis, support and resistance, and overall market structure.
Bullish Candle Ratio provides a simple statistical view of recent market sentiment by measuring the balance between bullish and bearish candles within a selected period.
Bullish Candle Ratio is a market statistics indicator that measures the percentage of bullish candles within a selected lookback period.
Instead of focusing on price levels or moving averages, the indicator evaluates the balance between bullish and bearish candles. This provides a simple overview of market participation and directional dominance over recent bars.
The result is displayed as a percentage between 0% and 100%, making it easy to assess whether buyers or sellers have been more active during the selected period.
How It Works
The indicator counts how many candles closed above their opening price during the selected lookback period.
The Bullish Candle Ratio is calculated as:
Bullish Candle Ratio = (Number of Bullish Candles ÷ Lookback Period) × 100
For example, if 15 out of the last 20 candles are bullish, the Bullish Candle Ratio equals 75%.
Key Features
Market Participation
Quickly measures whether buyers or sellers have dominated recent price action.
Easy to Read
Values range from 0% to 100%, making interpretation straightforward.
Trend Confirmation
High readings often support bullish market conditions, while low readings indicate bearish dominance.
Lightweight
Requires only basic candle calculations, making it suitable for all markets and timeframes.
Interpretation
Above 80%
Strong bullish dominance.
Most recent candles have closed higher than they opened.
Between 60% and 80%
Moderately bullish conditions.
Buyers are controlling the majority of recent price action.
Around 50%
Balanced market.
Neither buyers nor sellers have established clear dominance.
Between 20% and 40%
Moderately bearish conditions.
Selling pressure has become more noticeable.
Below 20%
Strong bearish dominance.
Most recent candles have closed lower than they opened.
Alert Conditions
The indicator includes two alert conditions.
Bullish Ratio Increasing
Triggered when the Bullish Candle Ratio crosses above 60%.
Bearish Ratio Increasing
Triggered when the Bullish Candle Ratio crosses below 40%.
Example Applications
- Measuring short-term market sentiment.
- Confirming trend strength.
- Monitoring shifts in buying and selling pressure.
- Comparing bullish participation across different markets.
- Supporting price action analysis.
Notes
Bullish Candle Ratio is intended to measure market participation rather than generate trading signals.
A high bullish ratio does not guarantee that prices will continue rising, just as a low ratio does not guarantee further declines.
The indicator is most effective when combined with trend analysis, support and resistance, and overall market structure.
Bullish Candle Ratio provides a simple statistical view of recent market sentiment by measuring the balance between bullish and bearish candles within a selected period.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.