如何创建一个仅在当前每日蜡烛之内(即自蜡烛打开以来)为真的表达式?
dailyopentime = security(syminfo.prefix+":"+ syminfo.ticker, "D", time)
这给了我每天的开放时间,但是我只希望最近的每天开放以及更多时间
答案 0 :(得分:0)
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © adolgov
//@version=4
study("My Script")
raising = security(syminfo.tickerid, "D", open < close ? 1 : open > close ? -1 : 0)
plot(raising)
答案 1 :(得分:0)
lastDay = security(syminfo.tickerid, "D", barstate.islast, lookahead = barmerge.lookahead_on)
bgcolor(lastDay ? color.red : na)