获取回测、实盘运行策略时在发明者量化交易平台网站页面上设置的K线周期,即调用exchange.GetRecords()函数不传参数时使用的默认K线周期。
K线周期的秒数,整数值,单位为秒。 number
exchange.GetPeriod()
function main() {
// 例如回测、实盘时发明者量化交易平台网站页面上设置的K线周期为1小时
var period = exchange.GetPeriod()
Log("K-line period:", period / (60 * 60), "hours")
}
def main():
period = exchange.GetPeriod()
Log("K-line period:", period / (60 * 60), "hours")
void main() {
auto period = exchange.GetPeriod();
Log("K-line period:", period / (60 * 60.0), "hours");
}
{@fun/Market/exchange.GetRecords exchange.GetRecords}