How to display a cross-valued variable in array form

Author: pu330619672, Created: 2020-03-31 15:17:48, Updated: 2020-03-31 15:40:43

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.


More

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.