OPEN-SOURCE SCRIPT
Filter Bar

1. Indicator Name
Filter Bar
2. One-line Introduction
A trend-aware bar coloring system that visualizes market direction and strength through adaptive transparency based on regression scoring.
3. General Overview
Filter Bar+ is a minimalist but powerful trend visualization tool that colors chart bars according to market direction and momentum strength.
It analyzes the linear regression trend alignment over a specified lookback period and uses a pairwise comparison algorithm to determine whether the market is in a bullish, bearish, or neutral state.
The result is a "trend score" that gets normalized to reflect trend intensity (0~1).
Bar colors are then dynamically updated using the specified bullish or bearish base colors, where higher intensity results in more opaque (darker) bars, and weaker trends lead to lighter, faded tones.
If no strong trend is detected, bars are shown in gray, signaling indecision or neutrality.
The strength of this indicator lies in its simplicity—it doesn’t draw lines, waves, or shapes, but overlays insight directly onto the chart through smart color cues.
It’s particularly effective as a background filter for price action traders, scalpers, and anyone who prefers clean charts but still wants embedded directional context.
4. Key Advantages
🎨 Adaptive Bar Coloring
Bar color opacity increases with trend strength, offering instant visual confirmation without clutter.
📊 Quantified Trend Direction
Uses a regression-based scoring system to reliably detect uptrends, downtrends, or sideways markets.
⚖️ Customizable Sensitivity
Parameters like lookback period and tolerance percentage give users full control over signal responsiveness.
🧼 Clean Chart Presentation
No lines, shapes, or overlays—just color-coded bars that blend into your existing chart setup.
🚀 Lightweight & Fast
Minimal computational load ensures it works smoothly even on lower-end devices or multiple chart setups.
🔒 Secure Internal Logic
Algorithm is neatly encapsulated and optimized, with no critical logic exposed.
📘 Indicator User Guide
📌 Basic Concept
Filter Bar+ evaluates trend direction and strength using a pairwise comparison of linear regression values.
The result determines whether the market is bullish, bearish, or neutral, and adjusts bar colors accordingly.
It visually amplifies the current market state without drawing any indicators on the chart.
⚙️ Settings Explained
Lookback Period: Number of bars used to compare regression values
Range Tolerance (%): Minimum score required to label a trend as bullish or bearish
Regression Source: Data input used for regression (default: close)
Linear Regression Length: Period for generating the base regression line
Bull/Bear Base Colors: Choose colors to represent bullish or bearish bars
📈 Buy Timing Example
Bars are green (or user-set bullish color) and becoming more vivid
Indicates a strengthening bullish trend; helpful when used alongside breakout confirmation or support zones
📉 Sell Timing Example
Bars turn red (or your custom bearish color) with increasing opacity
Signals growing bearish pressure; acts as confirmation during short setups or breakdowns
🧪 Recommended Use Cases
Combine with volume, RSI, or price action setups for direction filtering
Ideal for clean chart strategies where visual simplicity is preferred
Use as a confirmation layer to reduce noise in sideways markets
🔒 Precautions
This is a visual filter, not a signal generator—use alongside other strategies for entries/exits
In choppy markets, bars may flicker between colors—adjust sensitivity as needed
Works best when you already have a directional thesis and want to validate it visually
Always test settings for your asset/timeframe before applying in live trades
Filter Bar
2. One-line Introduction
A trend-aware bar coloring system that visualizes market direction and strength through adaptive transparency based on regression scoring.
3. General Overview
Filter Bar+ is a minimalist but powerful trend visualization tool that colors chart bars according to market direction and momentum strength.
It analyzes the linear regression trend alignment over a specified lookback period and uses a pairwise comparison algorithm to determine whether the market is in a bullish, bearish, or neutral state.
The result is a "trend score" that gets normalized to reflect trend intensity (0~1).
Bar colors are then dynamically updated using the specified bullish or bearish base colors, where higher intensity results in more opaque (darker) bars, and weaker trends lead to lighter, faded tones.
If no strong trend is detected, bars are shown in gray, signaling indecision or neutrality.
The strength of this indicator lies in its simplicity—it doesn’t draw lines, waves, or shapes, but overlays insight directly onto the chart through smart color cues.
It’s particularly effective as a background filter for price action traders, scalpers, and anyone who prefers clean charts but still wants embedded directional context.
4. Key Advantages
🎨 Adaptive Bar Coloring
Bar color opacity increases with trend strength, offering instant visual confirmation without clutter.
📊 Quantified Trend Direction
Uses a regression-based scoring system to reliably detect uptrends, downtrends, or sideways markets.
⚖️ Customizable Sensitivity
Parameters like lookback period and tolerance percentage give users full control over signal responsiveness.
🧼 Clean Chart Presentation
No lines, shapes, or overlays—just color-coded bars that blend into your existing chart setup.
🚀 Lightweight & Fast
Minimal computational load ensures it works smoothly even on lower-end devices or multiple chart setups.
🔒 Secure Internal Logic
Algorithm is neatly encapsulated and optimized, with no critical logic exposed.
📘 Indicator User Guide
📌 Basic Concept
Filter Bar+ evaluates trend direction and strength using a pairwise comparison of linear regression values.
The result determines whether the market is bullish, bearish, or neutral, and adjusts bar colors accordingly.
It visually amplifies the current market state without drawing any indicators on the chart.
⚙️ Settings Explained
Lookback Period: Number of bars used to compare regression values
Range Tolerance (%): Minimum score required to label a trend as bullish or bearish
Regression Source: Data input used for regression (default: close)
Linear Regression Length: Period for generating the base regression line
Bull/Bear Base Colors: Choose colors to represent bullish or bearish bars
📈 Buy Timing Example
Bars are green (or user-set bullish color) and becoming more vivid
Indicates a strengthening bullish trend; helpful when used alongside breakout confirmation or support zones
📉 Sell Timing Example
Bars turn red (or your custom bearish color) with increasing opacity
Signals growing bearish pressure; acts as confirmation during short setups or breakdowns
🧪 Recommended Use Cases
Combine with volume, RSI, or price action setups for direction filtering
Ideal for clean chart strategies where visual simplicity is preferred
Use as a confirmation layer to reduce noise in sideways markets
🔒 Precautions
This is a visual filter, not a signal generator—use alongside other strategies for entries/exits
In choppy markets, bars may flicker between colors—adjust sensitivity as needed
Works best when you already have a directional thesis and want to validate it visually
Always test settings for your asset/timeframe before applying in live trades
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.