INNER CODE UNIT · Python
tf_sec
ibaihuo/chanvis · api/chanapi.py:121
tf_sec = 1440 * 7
else:
tf_sec = resolution
# 为回放设置的点
col_replay = conf_db[f'replay_config']
# 更新当前操作的币种和时间周期(为回测代码使用,作为前进的步伐依据)
col_replay.replace_one({'current_symbol': {'$exists': True}},
{'current_symbol': symbol, 'current_tf': tf},
True)
# 查找本周期最新的时间
rep_ct = col_replay.find_one({'current_ts': {'$exists': 1}})
# print(rep_ct)
# 默认的2030-04-04
current_ts = 1901523203