This indicator is designed to highlight the night session, from 20:00 to 07:00 in the morning. The purpose is to study the congestion ranges. This is a useful condition to anticipate the volatility break out that occurs in the morning, driven by the European markets.

Below is the logic I have applied:

First of all, I defined a directive to activate the highlighter. I had to activate a highlighter for today's session and another one for yesterday's session, and I included fields to potentially modify the time range. I also added the possibility to change the time zone, as I did not understand the time zone of the TradingView server.

Then, I added a directive to color the night bars in white, from 20:00 to 07:00. For this function too, I added fields to modify the range. Finally, I inserted labels to count the range of the bars in pips, but only for bars over 20 pips. However, I was not able to correct the position to prevent the label from overlapping with the bars. If you have any suggestions on this issue, I would be grateful.

Scarica l'eBook in PDF "Trend Following" per studiare la basi del Business e per Scoprire la Community, Clicca Quì: trendfollowingtraders.com/blog/
Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

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.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?