OPEN-SOURCE SCRIPT
已更新 HTF BIAS FILTER

🧭HTF Bias Filter Indicator: 5 in 1 indicator
Technical Overview
The Bias Filter is a comprehensive multi-timeframe tool designed to confirm directional bias using five key indicators before entering a trade. It plots higher-timeframe Moving Averages directly on the chart and provides an immediate status summary via a static dashboard.
The more confluence on the dashboard, the greater the probability of the direction of the trade.
1. 📊 Display Components
A. Plotted Lines
The indicator uses the request.security function to draw Moving Averages from higher timeframes onto your current chart:
1H EMA 21 (Purple): The 21-period Exponential Moving Average calculated on the 1-Hour (60 min) chart. Plotted using a step-line style.
4H EMA 50 (Red): The 50-period Exponential Moving Average calculated on the 4-Hour (240 min) chart. Plotted using a step-line style.
B. Directional Dashboard
A fixed-position summary table is anchored to the bottom-right corner of the chart, providing a quick glance at the current status of all five filters.
2. 🎨 Colour Logic
Each of the five indicators is assigned a colour based on its current directional signal. The more indicators that show the same colour (confluence), the stronger the signal and the higher the likelihood of a high-probability trade.
🟢 Green indicators are signaling UP/BUY (Bullish momentum or trend).
🔴 Red indicators are signaling DOWN/SELL (Bearish momentum or trend).
⚫ Gray indicators are signaling Mixed or flat directions (neutral or undecided).
Note: The dashboard's main header color is determined by a strict confluence logic (All four 4H filters must align for Green/Red), while individual indicator colors follow the simple rules above.
3. 📋 Indicator Breakdown and Logic
The dashboard provides the direction of five different filters.
3.1. Higher-Timeframe (HTF) Trend Indicators
These two signals determine the immediate slope and direction of the primary Moving Averages:
4H EMA 50:
Timeframe: 4-Hour (240 min)
Logic: Compares the current EMA value to the value two bars ago on the 4H chart.
Output: UP ↑, DOWN ↓, or FLAT ⏸
1H EMA 21:
Timeframe: 1-Hour (60 min)
Logic: Compares the current EMA value to the value two bars ago on the 1H chart.
Output: UP ↑, DOWN ↓, or FLAT ⏸
3.2. 4-Hour Confluence Filters
These three indicators provide supplementary confirmation on Volume, Price Position, and Momentum, all calculated on the 4-Hour (240 min) chart:
4H OBV (Smoothed):
Timeframe: 4-Hour (240 min)
Logic: Direction is based on the current value of the 21-bar smoothed On-Balance Volume (OBV) compared to its value nine bars ago.
Output: UP ↑, DOWN ↓, or FLAT ⏸
4H ATR DIR (EMA Proxy):
Timeframe: 4-Hour (240 min)
Logic: Determines the price position by comparing the current Close price against the 4H EMA 50.
Output: BUY 🟢 (Close > EMA 50), SELL 🔴 (Close < EMA 50), or FLAT ⏸️ (Close = EMA 50).
4H RSI (14):
Timeframe: 4-Hour (240 min)
Logic: Momentum check comparing the 14-period Relative Strength Index (RSI) value against the 50 level.
Output: BUY 🟢 (RSI > 50), SELL 🔴 (RSI < 50), or FLAT ⏸️ (RSI = 50).
Technical Overview
The Bias Filter is a comprehensive multi-timeframe tool designed to confirm directional bias using five key indicators before entering a trade. It plots higher-timeframe Moving Averages directly on the chart and provides an immediate status summary via a static dashboard.
The more confluence on the dashboard, the greater the probability of the direction of the trade.
1. 📊 Display Components
A. Plotted Lines
The indicator uses the request.security function to draw Moving Averages from higher timeframes onto your current chart:
1H EMA 21 (Purple): The 21-period Exponential Moving Average calculated on the 1-Hour (60 min) chart. Plotted using a step-line style.
4H EMA 50 (Red): The 50-period Exponential Moving Average calculated on the 4-Hour (240 min) chart. Plotted using a step-line style.
B. Directional Dashboard
A fixed-position summary table is anchored to the bottom-right corner of the chart, providing a quick glance at the current status of all five filters.
2. 🎨 Colour Logic
Each of the five indicators is assigned a colour based on its current directional signal. The more indicators that show the same colour (confluence), the stronger the signal and the higher the likelihood of a high-probability trade.
🟢 Green indicators are signaling UP/BUY (Bullish momentum or trend).
🔴 Red indicators are signaling DOWN/SELL (Bearish momentum or trend).
⚫ Gray indicators are signaling Mixed or flat directions (neutral or undecided).
Note: The dashboard's main header color is determined by a strict confluence logic (All four 4H filters must align for Green/Red), while individual indicator colors follow the simple rules above.
3. 📋 Indicator Breakdown and Logic
The dashboard provides the direction of five different filters.
3.1. Higher-Timeframe (HTF) Trend Indicators
These two signals determine the immediate slope and direction of the primary Moving Averages:
4H EMA 50:
Timeframe: 4-Hour (240 min)
Logic: Compares the current EMA value to the value two bars ago on the 4H chart.
Output: UP ↑, DOWN ↓, or FLAT ⏸
1H EMA 21:
Timeframe: 1-Hour (60 min)
Logic: Compares the current EMA value to the value two bars ago on the 1H chart.
Output: UP ↑, DOWN ↓, or FLAT ⏸
3.2. 4-Hour Confluence Filters
These three indicators provide supplementary confirmation on Volume, Price Position, and Momentum, all calculated on the 4-Hour (240 min) chart:
4H OBV (Smoothed):
Timeframe: 4-Hour (240 min)
Logic: Direction is based on the current value of the 21-bar smoothed On-Balance Volume (OBV) compared to its value nine bars ago.
Output: UP ↑, DOWN ↓, or FLAT ⏸
4H ATR DIR (EMA Proxy):
Timeframe: 4-Hour (240 min)
Logic: Determines the price position by comparing the current Close price against the 4H EMA 50.
Output: BUY 🟢 (Close > EMA 50), SELL 🔴 (Close < EMA 50), or FLAT ⏸️ (Close = EMA 50).
4H RSI (14):
Timeframe: 4-Hour (240 min)
Logic: Momentum check comparing the 14-period Relative Strength Index (RSI) value against the 50 level.
Output: BUY 🟢 (RSI > 50), SELL 🔴 (RSI < 50), or FLAT ⏸️ (RSI = 50).
版本注释
🧭HTF Bias Filter Indicator: 5 in 1 indicatorTechnical Overview
The Bias Filter is a comprehensive multi-timeframe tool designed to confirm directional bias using five key indicators before entering a trade. It plots higher-timeframe Moving Averages directly on the chart and provides an immediate status summary via a static dashboard.
The more confluence on the dashboard, the greater the probability of the direction of the trade.
1. 📊 Display Components
A. Plotted Lines
The indicator uses the request.security function to draw Moving Averages from higher timeframes onto your current chart:
1H EMA 21 (Purple): The 21-period Exponential Moving Average calculated on the 1-Hour (60 min) chart. Plotted using a step-line style.
4H EMA 50 (Red): The 50-period Exponential Moving Average calculated on the 4-Hour (240 min) chart. Plotted using a step-line style.
B. Directional Dashboard
A fixed-position summary table is anchored to the bottom-right corner of the chart, providing a quick glance at the current status of all five filters.
2. 🎨 Colour Logic
Each of the five indicators is assigned a colour based on its current directional signal. The more indicators that show the same colour (confluence), the stronger the signal and the higher the likelihood of a high-probability trade.
🟢 Green indicators are signaling UP/BUY (Bullish momentum or trend).
🔴 Red indicators are signaling DOWN/SELL (Bearish momentum or trend).
⚫ Gray indicators are signaling Mixed or flat directions (neutral or undecided).
Note: The dashboard's main header color is determined by a strict confluence logic (All four 4H filters must align for Green/Red), while individual indicator colors follow the simple rules above.
3. 📋 Indicator Breakdown and Logic
The dashboard provides the direction of five different filters.
3.1. Higher-Timeframe (HTF) Trend Indicators
These two signals determine the immediate slope and direction of the primary Moving Averages:
4H EMA 50:
Timeframe: 4-Hour (240 min)
Logic: Compares the current EMA value to the value two bars ago on the 4H chart.
Output: UP ↑, DOWN ↓, or FLAT ⏸
1H EMA 21:
Timeframe: 1-Hour (60 min)
Logic: Compares the current EMA value to the value two bars ago on the 1H chart.
Output: UP ↑, DOWN ↓, or FLAT ⏸
3.2. 4-Hour Confluence Filters
These three indicators provide supplementary confirmation on Volume, Price Position, and Momentum, all calculated on the 4-Hour (240 min) chart:
4H OBV (Smoothed):
Timeframe: 4-Hour (240 min)
Logic: Direction is based on the current value of the 21-bar smoothed On-Balance Volume (OBV) compared to its value nine bars ago.
Output: UP ↑, DOWN ↓, or FLAT ⏸
4H ATR DIR (EMA Proxy):
Timeframe: 4-Hour (240 min)
Logic: Determines the price position by comparing the current Close price against the 4H EMA 50.
Output: BUY 🟢 (Close > EMA 50), SELL 🔴 (Close < EMA 50), or FLAT ⏸️ (Close = EMA 50).
4H RSI (14):
Timeframe: 4-Hour (240 min)
Logic: Momentum check comparing the 14-period Relative Strength Index (RSI) value against the 50 level.
Output: BUY 🟢 (RSI > 50), SELL 🔴 (RSI < 50), or FLAT ⏸️ (RSI = 50).
开源脚本
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.
免责声明
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.
开源脚本
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.
免责声明
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.