TR真實(shí)波幅指標(biāo)金字塔PYTHON碼源[系統(tǒng)交易]
?
TR真實(shí)波幅源碼公式
?
num = -1
close = history_bars(\'RB00\',100,\'1d\',\'close\',include_now=True)?
high = history_bars(\'RB00\',100,\'1d\',\'high\',include_now=True)??
low = history_bars(\'RB00\',100,\'1d\',\'low\',include_now=True)? ?
tr = talib.TRANGE(high,low,close)
print(tr)
#tr的均值就是我們常用的atr指標(biāo)。talib自帶的有atr不過計(jì)算出來的值和圖表不對,所以我這里計(jì)算tr然后均值得到的就一樣了
?
print(talib.SMA(tr,14))
?
?
注:在金融領(lǐng)域就有這樣一個標(biāo)準(zhǔn)庫叫TAlib集成了幾乎所有你會使用到的那些基于k線分析的指標(biāo)。TAlib官網(wǎng)是全英的,另外他的函數(shù)列表可以看這個鏈接http://www.ta-lib.org/function.html。只有簡單的說明
?
num = -1
close = history_bars(\'RB00\',100,\'1d\',\'close\',include_now=True)?
high = history_bars(\'RB00\',100,\'1d\',\'high\',include_now=True)??
low = history_bars(\'RB00\',100,\'1d\',\'low\',include_now=True)? ?
num = -1
close = history_bars(\'RB00\',100,\'1d\',\'close\',include_now=True)?
high = history_bars(\'RB00\',100,\'1d\',\'high\',include_now=True)??
low = history_bars(\'RB00\',100,\'1d\',\'low\',include_now=True)? ?
num = -1
close = history_bars(\'RB00\',100,\'1d\',\'close\',include_now=True)?
high = history_bars(\'RB00\',100,\'1d\',\'high\',include_now=True)??
low = history_bars(\'RB00\',100,\'1d\',\'low\',include_now=True)? ?
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 511411198 或微信:cxhjy888 進(jìn)行 有償 編寫!(不貴!點(diǎn)擊查看價格!)
- 上一篇:威廉指標(biāo)金字塔PYTHON源碼
- 下一篇:沒有了!
相關(guān)文章
-
沒有相關(guān)內(nèi)容