OPEN-SOURCE SCRIPT

Timeframe Direction

221
This indicator automatically marks supply and demand zones across three timeframes — 1H, 4H, and Daily — and shows the trend bias (Buy / Sell / Flat) for each, all on a single chart.
Zone detection (classic method)
Zones are formed using the textbook supply/demand pattern: a small consolidation base (1–3 candles with tight bodies) followed by a strong departure candle measured against ATR. A bullish leg-out creates a green DEMAND zone; a bearish leg-out creates a red SUPPLY zone. Each zone is labeled with its source timeframe (1H, 4H, 1D), so you can instantly see which zones carry more weight.
Multi-timeframe trend bias
A corner table reads the EMA relationship (fast vs slow) on each timeframe and reports the directional bias as BUY, SELL, or FLAT — giving you 1H, 4H, and Daily context at a glance for top-down alignment.
Key features

Classic consolidation-plus-impulse zone logic, not just raw pivots
Simultaneous 1H, 4H, and Daily zones, each labeled
EMA-slope trend bias table for all three timeframes
Optional automatic removal of zones once price mitigates (returns into) them
Adjustable base-candle sensitivity, ATR leg multiple, EMA lengths, colors, and zone extension
Built-in alerts for 1H bias flips to Buy or Sell

How to use it
Look for trade setups where the lower-timeframe price reaches a higher-timeframe zone while the trend bias agrees — for example, price tapping a 4H/Daily demand zone while the 1H bias turns BUY. Tune the base body % and ATR multiple to match the volatility of your instrument.
This tool is for educational and analytical purposes only and is not financial advice. Always combine it with your own risk management.

Disclaimer

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.