[PYTHON]为何用pel_history_bars取到的数据都是时间为毫秒的数据? [金字塔]
-
咨询内容:
[PYTHON]为何用pel_history_bars取到的数据都是时间为毫秒的数据?
代码如下
def handle_bar(context): close = pel_history_bars(context.long_period+1 ,'close')
#调试打印输出
log_debug_info('d:\pel_test_log.txt',str(close[context.long_period:]))
pel_test_log.txt的文件内容截取如下:
2020-12-20 10:22:45.775 [] 2020-12-20 10:22:45.776 [] 2020-12-20 10:22:45.776 [] 2020-12-20 10:22:45.777 [] 2020-12-20 10:22:45.777 [] 2020-12-20 10:22:45.778 [2547.16357422] 2020-12-20 10:22:45.778 [2551.25708008] 2020-12-20 10:22:45.779 [2553.30371094] 2020-12-20 10:22:45.779 [2552.28051758] 2020-12-20 10:22:45.780 [2553.30371094] 2020-12-20 10:22:45.780 [2552.28051758] 2020-12-20 10:22:45.781 [2554.32714844] 2020-12-20 10:22:45.782 [2555.35058594] 2020-12-20 10:22:45.782 [2549.21020508] 2020-12-20 10:22:45.783 [2551.25708008] 2020-12-20 10:22:45.783 [2554.32714844] 2020-12-20 10:22:45.784 [2560.46728516] 2020-12-20 10:22:45.784 [2559.4440918] 2020-12-20 10:22:45.785 [2557.3972168] 2020-12-20 10:22:45.785 [2557.3972168] 2020-12-20 10:22:45.786 [2557.3972168] 2020-12-20 10:22:45.786 [2558.4206543] 2020-12-20 10:22:45.787 [2555.35058594] 2020-12-20 10:22:45.787 [2554.32714844] 2020-12-20 10:22:45.788 [2552.28051758] 2020-12-20 10:22:45.788 [2554.32714844] 2020-12-20 10:22:45.789 [2552.28051758] 2020-12-20 10:22:45.789 [2555.35058594] 2020-12-20 10:22:45.790 [2554.32714844] 2020-12-20 10:22:45.790 [2556.3737793] 2020-12-20 10:22:45.791 [2556.3737793] 2020-12-20 10:22:45.791 [2555.35058594] 2020-12-20 10:22:45.792 [2559.4440918] 2020-12-20 10:22:45.792 [2558.4206543] 2020-12-20 10:22:45.793 [2558.4206543] 2020-12-20 10:22:45.793 [2559.4440918] 2020-12-20 10:22:45.794 [2560.46728516] 2020-12-20 10:22:45.794 [2557.3972168] 2020-12-20 10:22:45.795 [2555.35058594]
设想中在PEL调用时,在3分钟界面应该出现的是每根3分钟K的收盘价数据,但实际出来的是毫秒数据.仔细核对了一下,又发现数据其实是对的(也就是取出来的收盘价数据能和K线图的数据对得上),只是时间不对,请问我是哪里没处理好?要怎么样才能和3分钟的K线时间对应上?
来源: CXH99.COM
-
金字塔客服:
这个不是时间,是你记录log时候的电脑时间你输出的是close价格并没有输出时间
- 用户回复: 明白了,谢谢!
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容