Session Breaks - All Timeframes Aligned

Gammeefx · study · 10 行 · 点赞 33 · TradingView 原页

本页源码来自 TradingView 公开发布的开源脚本,版权归原作者所有, 请遵循其原始许可(Pine 脚本常见 CC BY-NC-SA / MPL-2.0 / MIT)。 本项目仅用于研究检索与许可范围内的移植。

Pine Script

//@version=6
indicator("Session Breaks - All Timeframes Aligned", overlay=true)
 
// Detect the start of a new exchange trading session across all timeframes
new_session = ta.change(time("D", session.regular)) != 0
 
// Draw a vertical dashed line aligned with TradingView's standard session break
var line session_line = na
if (new_session)
    session_line := line.new(x1=bar_index, y1=low, x2=bar_index, y2=high, xloc=xloc.bar_index, extend=extend.both, color=color.blue, style=line.style_dashed, width=1)

← 返回列表