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.

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?