OPEN-SOURCE SCRIPT

Session High Low 2024

https://www.tradingview.com/x/oQ8qVUnU/

Overview of the Code:
Input for Session Times:

You set up inputs for the start and end times of the trading session, allowing you to customize them as needed.

Time Range Function:
A function isTimeInRange checks whether the current time falls within the specified session start and end times.

initialize High and Low:
indicator initialize session high, low, and their corresponding labels and lines.

Tracking Session High and Low:
Within the specified time range, continuously update session1High and session1Low based on the highest and lowest prices encountered.

Time of Session High/Low:
The High_Time and Low_Time are tracked using the ta.valuewhen() function to capture the exact times when the session high and low occur.

Notes Creation:
You format the high and low values along with their timestamps to create notes that will be displayed alongside the lines.
Drawing Lines and Labels:

After the session ends, you check if there is a new session high or low and draw lines and labels accordingly. If a line or label already exists, you delete it before drawing a new one.
Resetting for Next Session:

At the end of the session, the high and low values are reset for the next session.
Suggestions for Improvement:
Dynamic Line Extensions:

Clear Variable Names Used in Code:
Consider using more descriptive names for variables like Entry_Point and SL_Point to make the code easier to understand.

Commenting:
Although the code is well-commented, always ensure the comments explain the "why" behind the code rather than just the "what."

Example Output:
The output will show the highest and lowest prices during the specified session times and the times they occurred formatted correctly. This output is useful for quick reference during trading and aids in making informed decisions.

Added functionality tool tip Note:
Added a tooltip Note to Get All information of Session High Low & Range.

If you need further modifications, enhancements, or specific functionalities added to this script, please let me know!









Bands and Channels

สคริปต์โอเพนซอร์ซ

ด้วยเจตนารมณ์หลักของ TradingView ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถเข้าใจและตรวจสอบได้ ต้องขอบคุณผู้เขียน! ที่ให้คุณใช้ได้ฟรี แต่การนำโค้ดนี้ไปใช้ในการเผยแพร่ซ้ำจะต้องอยู่ภายใต้ กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?


และใน:

คำจำกัดสิทธิ์ความรับผิดชอบ