[PYTHON]為何用pel_history_bars取到的數(shù)據(jù)都是時(shí)間為毫秒的數(shù)據(jù)? [金字塔]
-
咨詢內(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的收盤價(jià)數(shù)據(jù),但實(shí)際出來的是毫秒數(shù)據(jù).仔細(xì)核對(duì)了一下,又發(fā)現(xiàn)數(shù)據(jù)其實(shí)是對(duì)的(也就是取出來的收盤價(jià)數(shù)據(jù)能和K線圖的數(shù)據(jù)對(duì)得上),只是時(shí)間不對(duì),請(qǐng)問我是哪里沒處理好?要怎么樣才能和3分鐘的K線時(shí)間對(duì)應(yīng)上?
?
?來源: CXH99.COM
-
金字塔客服:
這個(gè)不是時(shí)間,是你記錄log時(shí)候的電腦時(shí)間你輸出的是close價(jià)格并沒有輸出時(shí)間
?
- 用戶回復(fù): 明白了,謝謝!
有思路,想編寫各種指標(biāo)公式,交易模型,選股公式,還原公式的朋友
可聯(lián)系技術(shù)人員 QQ: 262069696 或微信號(hào):cxh99cxh99 進(jìn)行 有償收費(fèi) 編寫!
(怎么收費(fèi),代編流程等詳情請(qǐng)點(diǎn)擊閱讀!)
(注:由于人數(shù)限制,QQ或微信請(qǐng)選擇方便的一個(gè)聯(lián)系我們就行,加好友時(shí)請(qǐng)簡(jiǎn)單備注下您的需求,否則無法通過。謝謝您!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容