[PYTHON]為何用pel_history_bars取到的數(shù)據(jù)都是時(shí)間為毫秒的數(shù)據(jù)?
作者:金字塔 來(lái)源:cxh99.com 發(fā)布時(shí)間:2021年01月23日
-
咨詢(xún)內(nèi)容:
[PYTHON]為何用pel_history_bars取到的數(shù)據(jù)都是時(shí)間為毫秒的數(shù)據(jù)?
代碼如下
def handle_bar(context):
? ? close = pel_history_bars(context.long_period+1 ,'close')
? ?#調(diào)試打印輸出
? ? log_debug_info('d:\pel_test_log.txt',str(close[context.long_period:]))
pel_test_log.txt的文件內(nèi)容截取如下:
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]
設(shè)想中在PEL調(diào)用時(shí),在3分鐘界面應(yīng)該出現(xiàn)的是每根3分鐘K的收盤(pán)價(jià)數(shù)據(jù),但實(shí)際出來(lái)的是毫秒數(shù)據(jù).仔細(xì)核對(duì)了一下,又發(fā)現(xiàn)數(shù)據(jù)其實(shí)是對(duì)的(也就是取出來(lái)的收盤(pán)價(jià)數(shù)據(jù)能和K線(xiàn)圖的數(shù)據(jù)對(duì)得上),只是時(shí)間不對(duì),請(qǐng)問(wèn)我是哪里沒(méi)處理好?要怎么樣才能和3分鐘的K線(xiàn)時(shí)間對(duì)應(yīng)上?
?
?來(lái)源: CXH99.COM
-
金字塔客服:
這個(gè)不是時(shí)間,是你記錄log時(shí)候的電腦時(shí)間你輸出的是close價(jià)格并沒(méi)有輸出時(shí)間
?
-
用戶(hù)回復(fù):
明白了,謝謝!