说明 / 示例
用法: ContextInfo.get_date_location(strdate)
释义: 获取给定日期对应的 K 线索引号,如给定日期小于当前图 K 线对应的最早的日期,结果返回 0;如给定日期大于当前图 K 线对应的最新日期,结果返回最新 K 线的索引号
参数: string:形式如 ‘yyyymmdd’ ,如 ‘20170711’
返回: number
示例:
```py
def handlebar(ContextInfo):
print(ContextInfo.get_date_location('20170711'))
```