Pine script 第一蜡烛收盘价

Pine script 第一蜡烛收盘价,pine-script,Pine Script,当我输入close时,我想接近第一支早晨的蜡烛,它返回最后一支蜡烛的接近值。我怎样才能得到五分钟图表中第一支早晨蜡烛的收盘价?(9.15至9.20)下一个代码绘制会话的第一个条的关闭 //@version=4 study("Close of first bar of a day") // If start of the daily session changed, then it's first bar of the new session isNewDay = time("D") != tim

当我输入close时,我想接近第一支早晨的蜡烛,它返回最后一支蜡烛的接近值。我怎样才能得到五分钟图表中第一支早晨蜡烛的收盘价?(9.15至9.20)

下一个代码绘制会话的第一个条的
关闭

//@version=4
study("Close of first bar of a day")
// If start of the daily session changed, then it's first bar of the new session
isNewDay = time("D") != time("D")[1]
var firstBarCloseValue = close
if isNewDay
    firstBarCloseValue := close
plot(firstBarCloseValue)