(一)获取当前 K线 对应时间的时间戳函数ContextInfo.get_ bar_timetag()
用法: ContextInfo.get_bar_timetag (index)。
释义:获取当前K线对应时间的时间戳。
参数:number:K线索引号。
返回:number。
示例:
def handlebar(ContextInfo):
index = ContextInfo.barpos
print(ContextInfo.get_bar_timetag (index))