Matboom

Week designation

The script is primarily used for visualizing the beginning and end of the week. It is particularly helpful when working with time intervals shorter than one day. In a very simple and clear manner, you can see when a specific week has started. This makes it easier to assess the market sentiment in a short timeframe.

Here are the operating principles of this script:

Initialization:
The script begins with initialization, where basic parameters and settings such as line colors and line style are defined.

Determining the Session Start:
The startSession(hour, minute) function is used to calculate the starting time of a session on the chart. Sessions can be divided into different time intervals, such as the daily session (D), weekly session (W), and monthly session (M).

Checking for Session Start:
The script checks if a new session is starting. If so, a vertical line is inserted on the chart to mark the beginning of that session.
  • isSessionStart checks for the start of the daily session.
  • isSessionStart_2 checks for the start of the weekly session.
  • isSessionStart_3 checks for the start of the monthly session.

Marking Mondays:
The script checks if the current day is Monday (the day of the week number 2 represents Monday).
If the current session is starting or it is Monday, a vertical line is inserted on the chart with the day designation (color color_day).

Marking Lines on the Chart:
The lines inserted on the chart are vertical and have a specified style and color, which can be customized in the settings.

Skrip open-source

Dalam semangat TradingView, penulis dari skrip ini telah mempublikasikannya ke sumber-terbuka, maka trader dapat mengerti dan memverifikasinya. Semangat untuk penulis! Anda dapat menggunakannya secara gratis, namun penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk digunakan pada chart

Pernyataan Penyangkalan

Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.

Inggin menggunakan skrip ini pada chart?