OPEN-SOURCE SCRIPT

HTF Trend Filter

Trend filter based on higher timeframe candles. Can be used as entry filters.

Checks if last 3 higher timeframe candles are in fully ascending order or fully descending order. Additionally you can also check if close price is above min of last two highs or below max of last two lows.

Lime and Orange candles imply partial trend in higher timeframe. (only last 3 candles align)
Green and Red candles imply complete trend. (last 3 candles align along with current close price).

Just an experiment. Can be further improved,
highertimeframeHigh-Low IndexTrend Analysis

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer