Beyond Meat, Inc.

Why wont this script actually plot the open and close prices?

69
As you can see on the chart, the open and close prices are not where the lines are. Please help.
Thank you

// This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org/MPL/2.0/
// © bradchris24

//version=4

study("Short Term Levels me", shorttitle="STL", overlay=true)
t = time("1440", "0000-0930")

dclose = security(syminfo.tickerid, "D", close[1])
dopen = security(syminfo.tickerid, "D", open)

is_first = na(t[1]) and not na(t) or t[1] < t
ending_hour = input(defval=9, title="Ending Hour", type=input.integer)
ending_minute = input(defval=30, title="Ending Minute", type=input.integer)

day_high = float(na)

if is_first and barstate.isnew and (hour < ending_hour or hour >= 16 or hour == ending_hour and minute < ending_minute)
day_high := high
else
day_high := day_high[1]

if high > day_high and ((hour < ending_hour or hour >= 16) and hour < 16 or hour == ending_hour and minute < ending_minute)
day_high := high
day_high


plot(day_high, style=plot.style_line, color=color.yellow, linewidth=1)
plot(dclose, style=plot.style_line, color=color.green, linewidth=1)
plot(dopen, style=plot.style_line, color=color.red, linewidth=1)

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.