PROTECTED SOURCE SCRIPT

MaxAlgo - HTF Bias Table

884
HTF Bias Tracker
Overview
The HTF Bias Tracker is a custom indicator designed to help traders monitor higher time frame (HTF) market biases while trading on lower time frames. It provides a clear visual table displaying the bias (bullish, bearish, mixed, or neutral) based on whether the current HTF candle has broken the high or low of the previous HTF candle. Additionally, it shows the current candle's condition (bullish or bearish based on close relative to open). This tool is particularly useful for multi-timeframe analysis, allowing traders to align lower time frame entries with higher time frame trends without switching charts.
The indicator does not generate buy/sell signals but offers contextual bias information to inform trading decisions. It is built for flexibility, supporting up to 5 customizable time frames (default: 1H, 4H, Daily, Weekly, Monthly) and can be used on any chart time frame.
How It Works
For each selected higher time frame (HTF):

Bias Calculation (H/L Break Column):

The indicator checks if the current HTF candle's high has exceeded the previous HTF candle's high (bullish break) or if the low has fallen below the previous HTF candle's low (bearish break).
Bullish: Current high > previous high (no low break).
Bearish: Current low < previous low (no high break).
Mixed: Both high and low breaks occur.
Neutral: No breaks yet. In this case, the text is colored based on the last completed break from the prior candle (green for bullish, red for bearish, orange for mixed) to maintain context.


Candle Condition (Candle Column):

Determines if the current HTF candle is bullish (close > open) or bearish (close <= open).


The results are displayed in a table with arrows (↑ for bullish, ↓ for bearish, ↔ for mixed) and color-coded text for quick readability.
The bias updates in real-time as the HTF candle develops, but final confirmation occurs at the HTF candle close.

This logic is rooted in price action principles: breaking a previous candle's extreme often indicates momentum. For example, historical data across various markets shows that when a candle takes the low of the previous candle, there's approximately a 70% probability it closes bearish (and vice versa for highs closing bullish). This can help gauge the likelihood of trend continuation, but results vary by asset, time frame, and market conditions—always backtest for your setup.
Features

Customizable Time Frames: Select up to 5 HTFs via inputs (e.g., "60" for 1H, "D" for Daily). Leave blank to disable.
Table Display: A compact table shows TF, H/L Break bias, and Candle condition. Includes headers for clarity.
Visual Enhancements: Color-coded text (green for bullish, red for bearish, orange for mixed, gray for neutral without prior bias). Arrows provide at-a-glance direction.
User Options:

Table Background Color: Adjust transparency and color for better visibility.
Table Position: Choose from 9 positions (e.g., Bottom Right default).
Border Width (Padding): Increase for more spacing around the table (min 0).


No Overlays: The indicator appears as a non-overlay pane, keeping your chart clean.
Supports all symbols and time frames, but best on lower TFs (e.g., 1m-15m) for monitoring HTFs.

How to Use It

Add to Chart: Search for "HTF Bias Tracker" in TradingView's indicator library and add it to your chart.
Configure Inputs: Set your desired HTFs, position, and colors.
Interpret the Table:

Look for alignment across multiple HTFs (e.g., multiple "Bullish ↑" biases suggest upward momentum).
Use the H/L Break as a directional filter: Enter long trades only when HTF bias is bullish or neutral with a prior bull break.
Combine with Candle Condition for confirmation: A bearish bias with a bearish candle might signal short opportunities.


Trading Example:

On a 1m chart, if the 1H bias shows "Bearish ↓" (low of previous 1H broken), there's ~70% chance the 1H closes lower. Wait for lower TF pullbacks to enter shorts, aligning with the HTF downtrend.
For scalping: If Daily is "Bullish ↑" but 4H is "Neutral ↓" (prior bear break), consider fading minor pullbacks but avoid counter-trend trades.
Risk Management: Always use stop-losses based on recent highs/lows and position size appropriately. This indicator aids bias assessment but should be combined with other tools like support/resistance or oscillators.


Strategy Ideas:

Trend Alignment: Trade in the direction of the majority HTF biases.
Breakout Confirmation: When a break occurs, monitor for volume or price action confirmation on your trading TF.
Reversion Plays: In ranging markets, a "Mixed ↔" bias might signal indecision—avoid trades until resolution.
Backtest the probability edge (e.g., via Pine Script strategies) to quantify performance in your markets.



Limitations and Disclaimer

The ~70% probability mentioned is a general observation from historical price action studies (e.g., across forex and indices); it is not a guarantee and should be verified with your own data. No backtesting results are provided here—users are encouraged to test independently.
The indicator relies on request.security() for HTF data, which may have minor delays in real-time.
This is not financial advice. Trading involves risk, and past performance does not predict future results. Use at your own discretion and consult a professional advisor if needed.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.