valpatrad

Intraday Background Time Ranges

valpatrad Updated   
This simple script was written for studying recurring intraday behaviours of financial instruments. With it, you can highlight up to 13 customizable time ranges on your chart, filling the corresponding background space with colors you prefer. You can then write a note for each range and it will be shown in the optional related table.

The experience shows that every financial instrument has its own personality. With this in mind, the script can be useful to study intraday charts with the purpose of discovering recurring behaviours of specific instruments over a certain time range and under specific circumstances (normal days, earnings days, days with catalysts, etc.) This can help the trader to deeply understand the instrument personality, and therefore also to decide whether to enter or exit the market if its behaviour meets or not his expectations.

Please note that this script only works on minute/hourly charts.
Release Notes:
Minor fix: Now the table won't appear without any text.

Cleaned the code.
Release Notes:
Update:

1) Shortened the short title, which now is "Time Ranges".

2) Removed the seconds time frame limitation.

3) Cleaned, simplified and improved the overall appearance of the code.
Release Notes:
UPDATE:

Added 17 additional time ranges, bringing the total to 30.
Release Notes:
UPDATE:

This new version includes the option to choose whether to project the colors ahead of time, allowing you to see them even before the price reaches the specified time.
In order to achieve this purpose, I had to modify the input mode for the time ranges.
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 a publication is governed by House Rules. You can favorite it to use it on a chart.

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.

Want to use this script on a chart?