OPEN-SOURCE SCRIPT
Trend Bias Table

Trend Bias Table — Indicator Description
Type: Overlay indicator (displays directly on the price chart, top-right corner)
What It Does
Trend Bias Table shows a multi-timeframe directional bias panel — Day, 4 Hour, 1 Hour, and 15 Minute — without using any moving averages. Each timeframe is scored independently as Bullish, Bearish, or Neutral based on pure price action.
How the Bias Is Calculated
For each timeframe, three independent factors are scored:
Market Structure — Detects swing pivot highs/lows (via ta.pivothigh / ta.pivotlow) and compares the two most recent pivots:
Higher High + Higher Low → bullish structure
Lower High + Lower Low → bearish structure
Momentum — A Rate of Change (ROC) calculation measures whether price has moved up or down over a smoothing period, with no lag-inducing moving average involved.
Price vs. Open — Checks whether the current close is trading above or below that timeframe's opening price.
Each factor contributes one point to either a bullish or bearish score. Whichever score is higher determines that timeframe's bias; a tie results in Neutral.
What's Displayed
A clean 2-column, 5-row table pinned to the top-right of the chart:
TIMEFRAME BIAS
Day ▲ BULL / ▼ BEAR / ● NEUT
4 Hour ▲ BULL / ▼ BEAR / ● NEUT
1 Hour ▲ BULL / ▼ BEAR / ● NEUT
15 Min ▲ BULL / ▼ BEAR / ● NEUT
Teal = Bullish
Red = Bearish
Grey = Neutral
Inputs
Swing Pivot Length (default 5) — sensitivity of pivot detection for structure analysis
ROC Smoothing (default 3) — lookback period for the momentum calculation
Use Case
Gives traders a fast, at-a-glance read on trend alignment across timeframes — useful for confirming whether a lower-timeframe setup agrees with the higher-timeframe trend, without cluttering the chart with moving average lines.
Type: Overlay indicator (displays directly on the price chart, top-right corner)
What It Does
Trend Bias Table shows a multi-timeframe directional bias panel — Day, 4 Hour, 1 Hour, and 15 Minute — without using any moving averages. Each timeframe is scored independently as Bullish, Bearish, or Neutral based on pure price action.
How the Bias Is Calculated
For each timeframe, three independent factors are scored:
Market Structure — Detects swing pivot highs/lows (via ta.pivothigh / ta.pivotlow) and compares the two most recent pivots:
Higher High + Higher Low → bullish structure
Lower High + Lower Low → bearish structure
Momentum — A Rate of Change (ROC) calculation measures whether price has moved up or down over a smoothing period, with no lag-inducing moving average involved.
Price vs. Open — Checks whether the current close is trading above or below that timeframe's opening price.
Each factor contributes one point to either a bullish or bearish score. Whichever score is higher determines that timeframe's bias; a tie results in Neutral.
What's Displayed
A clean 2-column, 5-row table pinned to the top-right of the chart:
TIMEFRAME BIAS
Day ▲ BULL / ▼ BEAR / ● NEUT
4 Hour ▲ BULL / ▼ BEAR / ● NEUT
1 Hour ▲ BULL / ▼ BEAR / ● NEUT
15 Min ▲ BULL / ▼ BEAR / ● NEUT
Teal = Bullish
Red = Bearish
Grey = Neutral
Inputs
Swing Pivot Length (default 5) — sensitivity of pivot detection for structure analysis
ROC Smoothing (default 3) — lookback period for the momentum calculation
Use Case
Gives traders a fast, at-a-glance read on trend alignment across timeframes — useful for confirming whether a lower-timeframe setup agrees with the higher-timeframe trend, without cluttering the chart with moving average lines.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.