var crss = [] //存储 交叉死叉的值
var records = _C(exchange.GetRecords,PERIOD_M30);
var bar = records[records.length -1]
var strsi = talib.STOCHRSI(records, 14, 14, 3, 3) //获取StochRSI指标数据
if (strsi) {
var stoc = strsi[0]
var mast = strsi[1]
var cross = _Cross(stoc,mast)
}
if (bar.Time > mtb) {
crss.push(cross)
}
Log(crss)
The problem is that when I add an index to the CSS, it only shows one value anyway.
pu330619672I want to convert the value of the cross into an array.
The grassI don't know what you mean, but the _Cross function documentation has instructions that you can look at to determine the current number of cross cycles.