【发布时间】:2021-10-04 15:43:32
【问题描述】:
我是 pinescript 的新手,并尝试创建 ORB(开放范围突破) 15 分钟。 但是在这里我想保留 Heaiknashi 图表,但是当我保留 heaiknashi 图表时,它会绘制 heaiknashi 蜡烛的高低。但我想在 Heaiknashi 图表上绘制 5 分钟烛台的实际高低。 我搜索但没有成功,如果有人知道的话。这将是很大的帮助。提前致谢。 完整代码如下
study(title="ORB15 ", shorttitle="ORB15", overlay=true)
up15 = input(true, title="15 Minute Opening Range High")
down15 = 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, linewidth=2)
down15 = plot(down15on ? adopt('15', low_rangeL): na, color = #ff0000, linewidth=2)
trans15 = up15 ? 97 : 100
fill(up15, down15, color = white, transp=trans15)
【问题讨论】:
标签: pine-script algorithmic-trading