OPEN-SOURCE SCRIPT
Cập nhật

Intraday Background Time Ranges

5 392
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.
Phát hành các Ghi chú
Minor fix: Now the table won't appear without any text.

Cleaned the code.
Phát hành các Ghi chú
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.
Phát hành các Ghi chú
UPDATE:

Added 17 additional time ranges, bringing the total to 30.
Phát hành các Ghi chú
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.
Phát hành các Ghi chú
MINOR UPDATE

- Fixed the code that displayed the table frame when the time range was selected even in the absence of text.

- Converted the code to v6.
Phát hành các Ghi chú
MAJOR UPDATE

- Added a new option that lets you choose how the indicator handles time zones:
· Exchange: Time ranges follow the time zone of the current symbol.
· Custom: Select a fixed time zone from a dropdown list to apply across any chart.
Let me know if your time zone is missing, so it can be added in the next update or once at least three requests are collected.
NOTE: If the chart is set to a time zone different from the exchange's, make sure time ranges start after the market opens in the chart’s time zone. Otherwise, they won’t be displayed.

- Time ranges can now be shown on selected weekdays only. The table updates accordingly.

- Improved the way time ranges are shown in advance, eliminating visual flickering.

- Refined the menu layout and made time range inputs more user-friendly.

- Cleaned up the code.
Phát hành các Ghi chú
Errata corrige:
If the chart is set to a time zone different from the exchange's, make sure time ranges end after the market opens in the chart's time zone. Ranges that start before the open will be partially visible if they end after the open.

Explanation:
For example, if the indicator is set with a custom time zone like "Australia/Sydney" on a US stock chart with extended hours enabled, 4 a.m. EST (the start of pre-market) corresponds to 6:00 p.m. in Sydney. Therefore, you need to set a range that starts at 18:00, or at least ends at 18:01 — in the latter case, only one minute of background will be colored.
Phát hành các Ghi chú
MAJOR FIX

Fixed the "Anticipate" parameter not working as expected.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.