你好,
我需要访问最近每周和每天的蜡烛价格(高-低-收盘价) 使用安全功能时,它会返回一个序列,但我只需要一个浮点数即可计算价格,然后使用它们。
我该怎么做?
我需要绘制每周和每天水平(高,低,收盘价)的线,还想计算这些水平的确切价格(简单的水平线)
我的代码:
//@version=4
study(title="Level", overlay = true)
closeHtf = security(syminfo.tickerid, "D", close)
cond = close > closeHtf
plot(Daily-price-level-should-be-here,title="High", color=#FFFFFF, linewidth=2, transp=0,offset=50)
var label1 = label.new(bar_index, Daily-price-level-should-be-here, text=tostring(closeHtf), color=#FFFFFF, size=size.small)
label.set_xloc(label1, time, xloc.bar_time)
//also do same for high,open,close of weekly levels and high and low of daily levels
//but I need to have access to the exact price number of those levels to do some calculation
谢谢