PROTECTED SOURCE SCRIPT
Aggiornato HTF Bias Detector

=== HUD DISPLAY ITEMS ===
1. **HTF (Timeframe Label)**
Shows the selected higher timeframe being monitored (e.g., "4h", "1D", "1W"). This confirms which timeframe data you're viewing above your current chart.
2. **Open, High, Low, Close (OHLC Values)**
Displays the candlestick values from the higher timeframe:
• Open: Entry price when the HTF candle opened
• High: Highest price reached during the HTF period
• Low: Lowest price during the HTF period
• Close: Most recent closing price on the HTF
Use these to identify key HTF price levels and support/resistance zones.
3. **TP (True Price Range)**
Shows the maximum price movement within the HTF candle. Calculated as: max(High - Low, |High - Previous Close|, |Low - Previous Close|)
Higher TP indicates greater volatility; lower TP suggests a consolidation period.
4. **ATR (Average True Range)**
Displays the average volatility over the last 14 HTF periods (customizable).
Use this to gauge typical price movement on the higher timeframe and set realistic profit targets and stop losses.
5. **MACD Value**
Shows the MACD momentum indicator (difference between 12 and 26-period EMAs) on the HTF.
Positive values suggest upward momentum; negative values indicate downward momentum on the higher timeframe.
6. **Signal Line**
The 9-period EMA of MACD on the HTF.
When MACD crosses above the signal line, it indicates bullish momentum confirmation on the higher timeframe.
7. **Histogram**
The difference between MACD and its Signal Line, visualized as bars.
Expanding bars show increasing momentum; shrinking bars show weakening momentum.
8. **Price Deviation**
Displays how far current price deviates from the HTF close in percentage terms.
Helps identify overbought/oversold conditions relative to the higher timeframe context.
---
=== HOW TO USE ===
• Select your chart timeframe (e.g., 5m, 15m, 1h)
• Set the HTF to a higher timeframe (e.g., 4h, 1D) in indicator settings
• Look for confluence: when both timeframes align, trades are stronger
• Use HTF volatility (ATR) to size positions appropriately
• Combine HTF MACD direction with your current chart setup for confirmation
---
=== SETTINGS ===
• HTF Period: Choose the higher timeframe to monitor
• ATR Length: Adjust sensitivity of volatility measurement (default: 14)
• MACD Settings: Customize fast/slow/signal periods for momentum analysis
1. **HTF (Timeframe Label)**
Shows the selected higher timeframe being monitored (e.g., "4h", "1D", "1W"). This confirms which timeframe data you're viewing above your current chart.
2. **Open, High, Low, Close (OHLC Values)**
Displays the candlestick values from the higher timeframe:
• Open: Entry price when the HTF candle opened
• High: Highest price reached during the HTF period
• Low: Lowest price during the HTF period
• Close: Most recent closing price on the HTF
Use these to identify key HTF price levels and support/resistance zones.
3. **TP (True Price Range)**
Shows the maximum price movement within the HTF candle. Calculated as: max(High - Low, |High - Previous Close|, |Low - Previous Close|)
Higher TP indicates greater volatility; lower TP suggests a consolidation period.
4. **ATR (Average True Range)**
Displays the average volatility over the last 14 HTF periods (customizable).
Use this to gauge typical price movement on the higher timeframe and set realistic profit targets and stop losses.
5. **MACD Value**
Shows the MACD momentum indicator (difference between 12 and 26-period EMAs) on the HTF.
Positive values suggest upward momentum; negative values indicate downward momentum on the higher timeframe.
6. **Signal Line**
The 9-period EMA of MACD on the HTF.
When MACD crosses above the signal line, it indicates bullish momentum confirmation on the higher timeframe.
7. **Histogram**
The difference between MACD and its Signal Line, visualized as bars.
Expanding bars show increasing momentum; shrinking bars show weakening momentum.
8. **Price Deviation**
Displays how far current price deviates from the HTF close in percentage terms.
Helps identify overbought/oversold conditions relative to the higher timeframe context.
---
=== HOW TO USE ===
• Select your chart timeframe (e.g., 5m, 15m, 1h)
• Set the HTF to a higher timeframe (e.g., 4h, 1D) in indicator settings
• Look for confluence: when both timeframes align, trades are stronger
• Use HTF volatility (ATR) to size positions appropriately
• Combine HTF MACD direction with your current chart setup for confirmation
---
=== SETTINGS ===
• HTF Period: Choose the higher timeframe to monitor
• ATR Length: Adjust sensitivity of volatility measurement (default: 14)
• MACD Settings: Customize fast/slow/signal periods for momentum analysis
Note di rilascio
HTF Bias Detector - TradingView Description═══════════════════════════════════════════════════════════════════════════════
📊 INDICATOR OVERVIEW
The HTF Bias Detector is an ICT (Inner Circle Trading) methodology-based
multi-timeframe bias detector. It identifies directional market structure
using swing analysis across three timeframes simultaneously, helping traders
align their entries with higher timeframe confluence.
The indicator locks bias to higher timeframe candle closes (non-repainting)
and compares zones, opens, and swing patterns to identify high-probability
trading opportunities.
═══════════════════════════════════════════════════════════════════════════════
🎯 HUD DISPLAY ITEMS EXPLAINED
1. HTF BIAS (Header)
├─ Displays selected timeframe and calculation method
└─ Example: "D (Confirmed)" = Daily bias from closed candles
2. HTF Bias [Primary]
├─ Main directional bias: Bullish | Bearish | Neutral
├─ Locked to HTF candle closes (non-repainting)
└─ Green = Bullish, Red = Bearish, Gray = Neutral
3. 4H Bias [Secondary]
├─ Confirmation timeframe (4-hour structure)
├─ When aligned with HTF = Strong confluence
└─ When divergent with HTF = Caution/Rejection signal
4. S Bias [Selectable]
├─ User-configurable tertiary timeframe (e.g., 15m, 60m, 240m)
├─ Use for intraday confluence or scalping confirmation
└─ Shows (S Bias) + timeframe in parentheses
5. MTF (Multi-Timeframe Status)
├─ Aligned = HTF and 4H bias same direction (STRONG)
├─ Divergent = HTF and 4H conflict (CAUTION)
└─ No Permission = Either timeframe is Neutral (NO BIAS)
6. Structure [ICT Pattern]
├─ Bullish = Higher Highs + Higher Lows detected
├─ Bearish = Lower Lows + Lower Highs detected
└─ None = Insufficient swing data or invalid pattern
NOTE: Based on swing highs/lows only—candle color irrelevant (ICT rule)
7. Reason [Why Current Bias]
├─ Shows confluence conditions for Bullish/Bearish
├─ Example: "Structure + EQ" = Correct zone + swing pattern
└─ Explains Neutral: "Large Range (>2x ATR)" | "No Clear Structure"
8. WO/DO [Weekly Open / Daily Open]
├─ ↑ = Close above level | ↓ = Close below level
├─ Example: "WO:↑ DO:↓ ⚠" = Above WO but below DO (mismatch)
└─ Aqua = Mismatch warning (potential reversal zone)
9. Zone [Current Price Position]
├─ DISCOUNT = Below equilibrium (Green - potential buy zone)
├─ PREMIUM = Above equilibrium (Red - potential sell zone)
└─ EQ = At exact equilibrium level (Gray)
10. HTF Swg [HTF Swing Pattern]
├─ ↑ HH+HL = Bullish structure (Higher Highs + Higher Lows)
├─ ↓ LH+LL = Bearish structure (Lower Highs + Lower Lows)
├─ ⇅ HH+LL = Range expansion (conflicting swings)
└─ ⇄ LH+HL = Range contraction (conflicting swings)
11. 4H Swg [4-Hour Swing Pattern]
└─ Same patterns as HTF Swg (shows 4H structure confirmation)
12. S Swg [Selectable Timeframe Swing Pattern]
└─ Same patterns as HTF Swg (shows S timeframe structure)
13. Warning [Market Alerts]
├─ Thu WO Cross = Thursday weekly open crossover (reversal risk)
├─ MTF Divergent = Timeframes conflict (be cautious)
├─ Extended Discount = Price in discount >threshold (stop coming)
├─ Extended Premium = Price in premium >threshold (stop coming)
└─ "-" = No active warnings
14. EQ Level [Equilibrium Price]
├─ 50% Fibonacci level of current range
├─ Orange = Key support/resistance level
└─ Price alternates between discount/premium around this
15. Dist EQ [Distance to Equilibrium]
├─ (+) Green = Price above EQ (premium zone)
├─ (-) Red = Price below EQ (discount zone)
└─ Shows pip distance for position sizing reference
16. Kill Zone [Trading Session]
├─ London KZ = 01:00-05:00 NY time (low volatility)
├─ NY KZ = 07:00-10:00 NY time (volatility building)
├─ ORB 09:30-10:30 = Opening Range Breakout window (US futures)
├─ AM Trend = Morning session trend-following (09:30-12:00)
├─ PM Trend = Afternoon reversal/momentum (13:00-16:00)
└─ 08:20 PIVOT = Pivot point window (convergence level)
═══════════════════════════════════════════════════════════════════════════════
⚙️ KEY SETTINGS
• Equilibrium Method:
- Chart Live (repaints), HTF Closed (non-repainting), TrueDP(US/UK)
• Structure Source:
- Confirmed (non-repainting), Live (repaints)
• HTF Timeframe:
- Main bias timeframe (typically Daily or 4H)
• Selectable Timeframe:
- Custom tertiary timeframe for confluence
• Weekly Open Source:
- Multiple definitions (TradingView W, Sunday 18:00 NY, etc)
• Equilibrium Level (Fib):
- Default 0.50 (50% midpoint)
═══════════════════════════════════════════════════════════════════════════════
💡 TRADING APPROACH
✓ Best Used When:
• HTF Bias = Bullish + 4H Bias = Bullish + Price in Discount Zone
• OR HTF Bias = Bearish + 4H Bias = Bearish + Price in Premium Zone
⚠ Caution When:
• MTF Status = Divergent (timeframes conflict)
• Warning shows Extended Discount/Premium (reversal incoming)
• Structure = None (no swing setup yet)
═══════════════════════════════════════════════════════════════════════════════
Note di rilascio
V3Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarle liberamente e senza alcuna limitazione – ulteriori informazioni qui.
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 protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarle liberamente e senza alcuna limitazione – ulteriori informazioni qui.
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.