OPEN-SOURCE SCRIPT

Custom Time Frame Background

This indicator allows you to highlight custom time frames on your chart with alternating background colors. It's particularly useful for visualizing specific intervals that are not standard on TradingView, such as 4-hour, 6-hour, or any other custom duration you choose. Features:

Customizable time frames: Set any combination of minutes, hours, and days
Fallback to daily/weekly coloring if no custom time frame is set
User-defined colors for alternating backgrounds

How to use:

Add the indicator to your chart
In the settings, input your desired custom time frame:
Set 'Custom Minutes' for intervals less than an hour
Use 'Custom Hours' for hourly intervals
Use 'Custom Days' for daily intervals
Adjust 'Color 1' and 'Color 2' to your preferred background colors

Examples:

For a 4-hour time frame: Set Custom Hours to 4
For a 6-hour time frame: Set Custom Hours to 6
For a 2-day time frame: Set Custom Days to 2

If all inputs are set to 0, the indicator will default to daily coloring for intraday charts and weekly coloring for higher timeframes. This indicator helps traders visually segment their charts into custom intervals, making it easier to identify patterns and trends over specific time periods.
Candlestick analysisCycleseducationalmulti-timeframeTIMEtimeframe

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?


更多:

免責聲明