我试图通过使用数组来存储代码值来简化我的代码。但是,当我使用该数组的元素作为符号参数调用安全函数时,出现错误:
Cannot call 'request.security' with argument 'symbol'='ticker'. An argument of 'series string' type was used but a 'simple string' is expected
这是代码的样子
period = timeframe.period
arr = str.split("FB AAPL TSLA MSFT AMZN NFLX GOOG NVDA", " ")
for i = 0 to array.size(arr) -1
ticker = array.get(arr, i)
series = request.security(ticker, period)
plot(series)
有谁知道处理这个问题的推荐方法?