Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //@version=5
- indicator('Opening high/low', overlay=true)
- highTimeFrame = input.timeframe('D')
- sessSpec = input.session('0930-1600')
- is_newbar(res, sess) =>
- t = time(res, sess)
- na(t[1]) and not na(t) or t[1] < t
- newbar = is_newbar('1440', sessSpec)
- var float s1 = na
- var float s2 = na
- if newbar
- s1 := low
- s2 := high
- s2
- plot(s1, style=plot.style_circles, linewidth=3, color=color.new(color.red, 0))
- plot(s2, style=plot.style_circles, linewidth=3, color=color.new(color.lime, 0))
Advertisement
Add Comment
Please, Sign In to add comment