Pine script 15 ORB仅适用于当日-pine脚本-交易视图平台

Pine script 15 ORB仅适用于当日-pine脚本-交易视图平台,pine-script,orb,Pine Script,Orb,15 ORB 下面的代码工作正常,但它在过去的所有日子里都在绘制ORB,有谁能帮我只绘制当天的ORB,而不是所有过去的一天 //@version=4 study("ORB", overlay = true) inputMax = input(15, title= "ORB total time (minutes)") sess = input("0915-0930", type=input.session, title="S

15 ORB

下面的代码工作正常,但它在过去的所有日子里都在绘制ORB,有谁能帮我只绘制当天的ORB,而不是所有过去的一天

//@version=4
study("ORB", overlay = true)

inputMax = input(15, title= "ORB total time (minutes)")
sess = input("0915-0930", type=input.session, title="Session Time") 
t = time(timeframe.period, sess + ":1234567")
hide = timeframe.isintraday and timeframe.multiplier <= inputMax

is_newbar(res) => change(time(res)) != 0
in_session = not na(t)
is_first = in_session and not in_session[1]

orb_high = float(na)
orb_low = float(na)

if is_first
    orb_high := high
    orb_low := low
else
    orb_high := orb_high[1]
    orb_low := orb_low[1]
if high > orb_high and in_session
    orb_high := high
if low < orb_low and in_session
    orb_low := low

plot(hide ? orb_high : na , style=plot.style_linebr, color=orb_high[1] != orb_high ? na : color.green, title="ORB High", linewidth=1)
plot(hide ? orb_low : na , style=plot.style_linebr, color=orb_low[1] != orb_low ? na : color.red, title="ORB Low", linewidth=1)
/@version=4
研究(“ORB”,叠加=真)
inputMax=输入(15,title=“ORB总时间(分钟)”)
sess=输入(“0915-0930”,类型=input.session,title=“会话时间”)
t=时间(timeframe.period,sess+“:1234567”)
隐藏=timeframe.isintraday和timeframe.乘数更改(时间(分辨率))!=0
in_session=非na(t)
is_first=在_会话中,而不是在_会话中[1]
orb_高=浮动(na)
orb_低=浮动(na)
如果你是第一个
orb_高:=高
orb_低:=低
其他的
球高:=球高[1]
orb_low:=orb_low[1]
如果high>orb\U high和in\U会话
orb_高:=高
如果低