OPEN-SOURCE SCRIPT
Cập nhật Bull & Bear Candle By Background Color

The essential chart overlay for high-speed momentum confirmation.
This professional-grade Pine Script v5 indicator provides instant, unfiltered visual feedback on the market's immediate bias by coloring the chart background based on the short-term relationship between Close and Open. It’s designed to streamline decision-making and enhance trade conviction.
Why Traders Use This Tool
In dynamic markets, reading momentum rapidly is critical. This indicator removes visual clutter and cognitive lag.
Zero-Lag Momentum Filter: Instantly identifies if control belongs to buyers (Close > Open) or sellers (Close < Open). A sustained background color acts as a directional bias filter for all your setups.
Trade Confirmation & Conviction: Use the background color as a high-level confluence factor. Only execute Long trades when the background is Bullish and Short trades when it is Bearish. This drastically reduces counter-trend entries.
Risk Management Signal: The appearance of the Neutral/Doji Color flags market equilibrium and consolidation, often preceding a critical structural shift. This is your immediate signal to tighten stops or prepare for a potential reversal setup.
Dual Confirmation: The script offers a highly requested feature: Bar Coloring layered atop the background to provide a second, granular layer of visual context, making momentum shifts impossible to miss.
⚙️ Key Features & Settings Usage
All settings are optimized for clarity, using high transparency to prevent the indicator from obscuring underlying price action or other analytical tools.
🎨 Background Color Settings (Primary)
These controls allow you to define the market state you are reading:
1. Background: Bullish Color: Confirms short-term buying pressure (Close > Open). Set a distinct color for confirmed upward momentum.
2. Background: Bearish Color: Confirms short-term selling pressure (Close < Open). Set a high-contrast color for immediate recognition of downward pressure.
3. Background: Neutral/Doji Color: Signals market indecision (Close ≈ Open). Use as a caution flag, highlighting pivot points and ranging periods.
✨ Added Feature: Bar Coloring
4. FEATURE: Enable Bar Coloring: When enabled, the individual candles are colored with a lighter hue matching the background. This provides dual visual confirmation, maximizing impact on lower timeframes where momentum flips quickly.
🧭 How to Achieve Confluence
Entry Filter: Wait for the background color to flip to your desired direction, then seek your primary entry signal (e.g., breakout, pullback, or MACD cross).
Trade Hold: As long as the background color remains consistent, the short-term momentum is confirmed, justifying the continuation of your trade.
Exit Signal: A flip to the Neutral/Doji Color should be treated as a warning shot, signaling a mandatory review of your position and stops.
Disclaimer: This indicator is a powerful visual and confirmation tool and does not generate buy/sell signals on its own. It is designed to be used in conjunction with your established trading strategy and comprehensive risk management principles
This professional-grade Pine Script v5 indicator provides instant, unfiltered visual feedback on the market's immediate bias by coloring the chart background based on the short-term relationship between Close and Open. It’s designed to streamline decision-making and enhance trade conviction.
Why Traders Use This Tool
In dynamic markets, reading momentum rapidly is critical. This indicator removes visual clutter and cognitive lag.
Zero-Lag Momentum Filter: Instantly identifies if control belongs to buyers (Close > Open) or sellers (Close < Open). A sustained background color acts as a directional bias filter for all your setups.
Trade Confirmation & Conviction: Use the background color as a high-level confluence factor. Only execute Long trades when the background is Bullish and Short trades when it is Bearish. This drastically reduces counter-trend entries.
Risk Management Signal: The appearance of the Neutral/Doji Color flags market equilibrium and consolidation, often preceding a critical structural shift. This is your immediate signal to tighten stops or prepare for a potential reversal setup.
Dual Confirmation: The script offers a highly requested feature: Bar Coloring layered atop the background to provide a second, granular layer of visual context, making momentum shifts impossible to miss.
⚙️ Key Features & Settings Usage
All settings are optimized for clarity, using high transparency to prevent the indicator from obscuring underlying price action or other analytical tools.
🎨 Background Color Settings (Primary)
These controls allow you to define the market state you are reading:
1. Background: Bullish Color: Confirms short-term buying pressure (Close > Open). Set a distinct color for confirmed upward momentum.
2. Background: Bearish Color: Confirms short-term selling pressure (Close < Open). Set a high-contrast color for immediate recognition of downward pressure.
3. Background: Neutral/Doji Color: Signals market indecision (Close ≈ Open). Use as a caution flag, highlighting pivot points and ranging periods.
✨ Added Feature: Bar Coloring
4. FEATURE: Enable Bar Coloring: When enabled, the individual candles are colored with a lighter hue matching the background. This provides dual visual confirmation, maximizing impact on lower timeframes where momentum flips quickly.
🧭 How to Achieve Confluence
Entry Filter: Wait for the background color to flip to your desired direction, then seek your primary entry signal (e.g., breakout, pullback, or MACD cross).
Trade Hold: As long as the background color remains consistent, the short-term momentum is confirmed, justifying the continuation of your trade.
Exit Signal: A flip to the Neutral/Doji Color should be treated as a warning shot, signaling a mandatory review of your position and stops.
Disclaimer: This indicator is a powerful visual and confirmation tool and does not generate buy/sell signals on its own. It is designed to be used in conjunction with your established trading strategy and comprehensive risk management principles
Phát hành các Ghi chú
Name UpdatePhát hành các Ghi chú
Name UpdatedPhát hành các Ghi chú
Color UpdatedMã 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.