本页源码来自 TradingView 公开发布的开源脚本,版权归原作者所有, 请遵循其原始许可(Pine 脚本常见 CC BY-NC-SA / MPL-2.0 / MIT)。 本项目仅用于研究检索与许可范围内的移植。
study(title="ORB 15 Min By EquityDurai", shorttitle="ORB15Min", overlay=true)
up15on = input(true, title="15 Minute Opening Range High")
down15on = input(true, title="15 Minute Opening Range Low")
is_newbar(res) => change(time(res)) != 0
adopt(r, s) => security(tickerid, r, s)
high_range = valuewhen(is_newbar('D'),high,0)
low_range = valuewhen(is_newbar('D'),low,0)
high_rangeL = valuewhen(is_newbar('D'),high,0)
low_rangeL = valuewhen(is_newbar('D'),low,0)
up15 = plot(up15on ? adopt('15', high_rangeL): na, color = #009900, style=line, linewidth=2)
down15 = plot(down15on ? adopt('15', low_rangeL): na, color = #ff0000, style=line, linewidth=2)
trans15 = up15on ? 97 : 100
fill(up15, down15, color = white, transp=trans15)