Beyond Meat, Inc.

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

72
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提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。