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/
Skrypt open-source

Zgodnie z prawdziwym duchem TradingView, autor tego skryptu opublikował go jako open-source, aby traderzy mogli go zrozumieć i zweryfikować. Brawo dla autora! Możesz używać go za darmo, ale ponowne wykorzystanie tego kodu w publikacji jest regulowane przez Dobre Praktyki. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.

Chcesz użyć tego skryptu na wykresie?