OPEN-SOURCE SCRIPT
HTF Levels | 1H 4H Daily

HTF Levels | 1H 4H Daily
Plots the current and previous High, Low, and Midpoint for the 1-Hour, 4-Hour, and Daily timeframes directly on your chart — regardless of which timeframe you are trading on.
What makes this original:
Most HTF level tools simply draw static lines from request.security() on every bar, cluttering historical price action. This script draws only on the current bar (barstate.islast), keeping the chart clean. It also includes an automatic level merging algorithm — when levels from different timeframes fall within a configurable percentage threshold of each other, they are averaged into a single line with a combined label (e.g. 4H H | Prv D H), visually identifying high-confluence zones without requiring manual comparison.
Levels plotted:
Current period: High, Midpoint ((H+L)/2), Low — lines extend across the full chart
Previous period: High, Midpoint, Low — lines extend left only for visual separation
Confluence Merging:
When two or more levels are within the merge threshold (default 0.05%), they collapse into one averaged line with a merged label. Adjust the threshold in settings to suit your instrument's tick size.
Alerts:
Every level has its own named alert condition. Use individual alerts (e.g. "4H High", "Prev Daily Low") or the master "Any HTF Level" alert to get notified when price enters proximity of any key zone. The alert buffer % is fully adjustable.
Settings:
Toggle each timeframe independently
Custom color per timeframe
Line width and label size controls
Merge threshold % — how close levels must be to combine
Alert buffer % — how close price must be to trigger
Best used on intraday timeframes (1m–30m) where 1H, 4H, and Daily levels act as key support and resistance.
Plots the current and previous High, Low, and Midpoint for the 1-Hour, 4-Hour, and Daily timeframes directly on your chart — regardless of which timeframe you are trading on.
What makes this original:
Most HTF level tools simply draw static lines from request.security() on every bar, cluttering historical price action. This script draws only on the current bar (barstate.islast), keeping the chart clean. It also includes an automatic level merging algorithm — when levels from different timeframes fall within a configurable percentage threshold of each other, they are averaged into a single line with a combined label (e.g. 4H H | Prv D H), visually identifying high-confluence zones without requiring manual comparison.
Levels plotted:
Current period: High, Midpoint ((H+L)/2), Low — lines extend across the full chart
Previous period: High, Midpoint, Low — lines extend left only for visual separation
Confluence Merging:
When two or more levels are within the merge threshold (default 0.05%), they collapse into one averaged line with a merged label. Adjust the threshold in settings to suit your instrument's tick size.
Alerts:
Every level has its own named alert condition. Use individual alerts (e.g. "4H High", "Prev Daily Low") or the master "Any HTF Level" alert to get notified when price enters proximity of any key zone. The alert buffer % is fully adjustable.
Settings:
Toggle each timeframe independently
Custom color per timeframe
Line width and label size controls
Merge threshold % — how close levels must be to combine
Alert buffer % — how close price must be to trigger
Best used on intraday timeframes (1m–30m) where 1H, 4H, and Daily levels act as key support and resistance.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
profitgang
haze
haze
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
profitgang
haze
haze
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。