OPEN-SOURCE SCRIPT
Key Daily Levels by Flip On Dip

Key Daily Levels marks the reference points most intraday traders watch: the previous day high and low, and the high and low of a session you choose.
Sessions cover New York, London, Tokyo and Sydney, plus a custom option for any other window. Each preset uses the session's local exchange hours and adjusts for daylight saving on its own, so the times stay correct through the year instead of drifting an hour twice a year.
When a session extreme sits at the same price as the previous day high or low, the two are combined into one line instead of being drawn twice. The label then reads something like PDH (NY High), so both are kept without doubling up on the chart.
Each level is drawn from the bar where it formed and runs until price takes it out. The line stops on the exact bar that crossed it. The wick counts, so it doesn't wait for a close. A level still holding is shown solid; once it gets taken it turns dashed and fades, and a small check is dropped on the bar that swept it. A small table in the corner lists each level and whether it has been swept.
Cross detection accounts for gaps, and the trading day is read from each symbol's own calendar rather than a fixed clock, so levels stay accurate on crypto, futures and stocks, on continuous charts and gapped ones alike.
Colors, line styles and width, label options, the sweep marker and the table are all configurable.
Open source, free to study or extend.
Sessions cover New York, London, Tokyo and Sydney, plus a custom option for any other window. Each preset uses the session's local exchange hours and adjusts for daylight saving on its own, so the times stay correct through the year instead of drifting an hour twice a year.
When a session extreme sits at the same price as the previous day high or low, the two are combined into one line instead of being drawn twice. The label then reads something like PDH (NY High), so both are kept without doubling up on the chart.
Each level is drawn from the bar where it formed and runs until price takes it out. The line stops on the exact bar that crossed it. The wick counts, so it doesn't wait for a close. A level still holding is shown solid; once it gets taken it turns dashed and fades, and a small check is dropped on the bar that swept it. A small table in the corner lists each level and whether it has been swept.
Cross detection accounts for gaps, and the trading day is read from each symbol's own calendar rather than a fixed clock, so levels stay accurate on crypto, futures and stocks, on continuous charts and gapped ones alike.
Colors, line styles and width, label options, the sweep marker and the table are all configurable.
Open source, free to study or extend.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。