function main() { exchange.SetContractType(“swap”) for(var i = 0; i < records.length; i++) Log(exchanges[i].GetRecords()) }
按照视频教程写返回的是 错误 ReferenceError: records is not defined at main (FILE:3)
ktrader # 获取数据 exchange.IO("currency", symbol + '_' + 'USDT') exchange.SetContractType('swap') recs = exchange.GetRecords(PERIOD_M30) # 获取K线数组
小草 先获取records,再循环引用