当点差符号出现时NSE:BANKNIFTY1!/NSE:NIFTY1!
,系统应该使用标准open
, high
,low
和close
在其他情况下,它应该根据代码使用提到的关闭。
我正在使用syminfo.prefix+":"+syminfo.ticker
而不是,syminfo.tickerid
因为我想要烛台open
,high
和low
; close
当我更改为 HA、Renko、Kagi、Line、Point & Figure 时。
但是尽管代码是准确的,我还是得到了一个错误。
我该如何解决?我已经尝试了一切
//@version=4
study("spread", overlay=true)
var float close_lock = na
var float open_lock = na
var float high_lock = na
var float low_lock = na
var bool normal_ticker_check = na
normal_ticker_check := syminfo.type != 'spread'
[o, h, l, c] = security(syminfo.prefix+":"+syminfo.ticker , timeframe.period , [open, high, low, close] ,barmerge.gaps_off, barmerge.lookahead_on)
if (normal_ticker_check)
close_lock := c
open_lock := o
high_lock := h
low_lock := l
else
close_lock := close
open_lock := open
high_lock := high
low_lock := low
plot(close_lock)
错误:无法获得点差符号的“代码”