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/
Script de código aberto

Dentro do verdadeiro espírito TradingView, o autor deste script publicou ele como um script de código aberto, para que os traders possam compreender e checar ele. Um viva ao autor! Você pode usá-lo gratuitamente, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.

Quer usar esse script no gráfico?