OPEN-SOURCE SCRIPT
Time-based levels

Script to plot time-based levels such as yearly/quarterly/monthly/Monday open, Monday range, previous month/week/day range.
This script does NOT handle sessions, therefore it's better suited for crypto which is 24/7.
There are various display options.
- Monday open is displayed immediately, but Monday High / Low / Mid 50% are displayed from Tuesday (i.e. when Monday closes and H/L are set for good)
This behaviour can be overridden using the appropriate option within the indicator's inputs parameters
- Levels are time-frame dependant (for instance, a daily level such as "Monday open" only shows on D1 TF and lower TF)
- To avoid redundancies:
* Yearly open is not displayed on January (redundant with monthly open)
* Quarterly open is not displayed on January, April, July and October (redundant with monthly open), neither on Feb. and March (redundant with yearly open)
* Previous day High / Low / Mid 50% are not displayed on Tuesday (redundant with Monday open / High / Low / Mid 50%)
* Daily open is not displayed on Monday (redundant with Monday open)
- Alerts can be created when prices crosses levels such as yearly/quarterly/monthly/Monday open, Monday range, previous month/week/day range
Known issue (TradingView ticket opened as issue is on their side):
On the W1 TF, if the current week spans over 2 months, the monthly open will be incorrect and still use the previous month open instead.
Once the week closes, the monthly open will be displayed correctly. This issue is not present on other TF.
Example: on Feb. 2nd 2023, when W1 TF is selected, monthly open shows January open instead of February open.
This script does NOT handle sessions, therefore it's better suited for crypto which is 24/7.
There are various display options.
- Monday open is displayed immediately, but Monday High / Low / Mid 50% are displayed from Tuesday (i.e. when Monday closes and H/L are set for good)
This behaviour can be overridden using the appropriate option within the indicator's inputs parameters
- Levels are time-frame dependant (for instance, a daily level such as "Monday open" only shows on D1 TF and lower TF)
- To avoid redundancies:
* Yearly open is not displayed on January (redundant with monthly open)
* Quarterly open is not displayed on January, April, July and October (redundant with monthly open), neither on Feb. and March (redundant with yearly open)
* Previous day High / Low / Mid 50% are not displayed on Tuesday (redundant with Monday open / High / Low / Mid 50%)
* Daily open is not displayed on Monday (redundant with Monday open)
- Alerts can be created when prices crosses levels such as yearly/quarterly/monthly/Monday open, Monday range, previous month/week/day range
Known issue (TradingView ticket opened as issue is on their side):
On the W1 TF, if the current week spans over 2 months, the monthly open will be incorrect and still use the previous month open instead.
Once the week closes, the monthly open will be displayed correctly. This issue is not present on other TF.
Example: on Feb. 2nd 2023, when W1 TF is selected, monthly open shows January open instead of February open.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน