OPEN-SOURCE SCRIPT

B A N K $ - Opening Lines / Daily Separators

업데이트됨
This is a simple indicator that aids the trader in being able to visualise each trading day of the week;

Key Features
  • Weekly Open Line
  • Daily Open Line
  • Option for Background Lines




Weekly & Daily Open Lines
Information ℹ️
These are vertical lines that are anchored to the hour of the Weekly Open and the hour of each Daily Candle Open. The settings are customisable, allowing to you edit the Width, Style & Colour. You can also select Monday as the Weekly Open if Monday is a no-trade day for you.

Settings ⚙️
1h Toggle - by default Daily Open Lines are only visible under the 1h, you can select to also make them visible on the 1h.
Background Lines - you can replace the chart lines with background lines, this can improve performance and allow you to load more lines on the chart when going back in price.
Show Days of Week - this prints the current day on the chart.
릴리즈 노트
New Features
  • Show Week Separator on 4h Chart
  • Show Only Last 2 Weekly Opens
  • Weekly & Daily Line Offset




Show Week Separator on 4h Chart
This is a toggle option that allows you so show Week Separators on the 4h chart. By default all vertical lines are invisible on any timeframe above the 1h. This toggle is disabled by default.


Show Only Last 2 Weekly Opens
I have added this option to make only the last 2 weekly opens visible, I have added this to make the charts more minimalistic if desired by the trader.


Weekly & Daily Line Offset
The original code only worked on instruments that had 24 hourly candles within the day. Instruments like DXY or XAUUSD wouldn't show the lines. I have added an offset option for both the Weekly & Daily lines to allow the trader to adjust the hour the lines are anchored to, this allows you to adjust the lines and make them visible across all instruments.


(I have changed isStartTime to adjusted_new_day_start_time and made some adjustments to the code to allow the trader to offset the lines)
릴리즈 노트
New Feature
  • Show Daily Close


Information ℹ️
This adds a new toggle option that displays a vertical line at the current days closing price so you can visualise how long until the end of the current trading day.

This is the code that adds the toggle option to the settings list


This is the code that ensures the Daily Close line is shown on timeframes under the 1h unless the 'Show Day Separator on 1h Chart' is selected. This code also calculates where the line is displayed. By default it is set to the hour that the Daily candle closes / a new one opens
릴리즈 노트
New Features
  • Show Weekly Close
  • Tidied up the Settings + Code


Show Weekly Close
This adds a new toggle option that allows you to see the current week close. Below is the additional code for this;



I have also tidied up the code to make the settings page tidy & minimal.
릴리즈 노트
Weekly Open on Higher Timeframes
I have adjusted the option that allows you to display the Weekly Open lines above the 1h. Now this option displays the lines on the 2h & 4h timeframes when selected.



Bug Fix - Lines Wouldn't Display on 5m
I encountered an issue where the indicator wouldn't show when on the 5 minute timeframe. The indicator is drawing lines into the future but there is a limitation where lines can only be drawn 500 bars into the future. When a line is drawn beyond this, the indicator breaks. I've added the following code to only draw within 500 lines;
릴리즈 노트
Bug Fix

I encountered a bug where the Daily & Weekly lines were being deleted when a new candle would print.

I have added new code that re-prints these candles when they are removed.
dailyopenopeningPine utilitiesseperateverticallineweeklyopen

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?


또한 다음에서도:

면책사항