OPEN-SOURCE SCRIPT
Aggiornato 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).
Note di rilascio
🧭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).
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.