TA-Lib:修订间差异

无编辑摘要
无编辑摘要
第27行: 第27行:
{| class="wikitable sortable"  style="width: 100%;
{| class="wikitable sortable"  style="width: 100%;
! 函数名
! 函数名
! 英文名称
! 中文名称
! 描述
! 描述
! 代码
! 代码
|-
|-
| [[MA]]
| '''[[MA]]'''</code> <br \>Moving average
| Moving average
| 移动平均线<br \>按照计算方法可分多种,一般指简单移动平均(SMA)。<br \> 参数:<br \>matype:默认0(简单移动平均),0=SMA,1=EMA,2=WMA,3=DEMA,4=TEMA,5=TRIMA,6=KAMA,7=MAMA,8=T3  
| 移动平均线
| 简称均线。<br \>参数:<br \>matype:默认0(简单移动平均),0=SMA,1=EMA,2=WMA,3=DEMA,4=TEMA,5=TRIMA,6=KAMA,7=MAMA,8=T3  
| MA(close, timeperiod=30, matype=0)
| MA(close, timeperiod=30, matype=0)
|-
|-
| SMA
| '''SMA''' <br \>Simple Moving Average
| Simple Moving Average
| 简单移动平均  
| 简单移动平均
|
| SMA(close, timeperiod=30)
| SMA(close, timeperiod=30)
|-
|-
| [[EMA]]
| '''[[EMA]]''' <br \>Exponential Moving Average
| Exponential Moving Average
| 指数移动平均<br \>是以指数式递减加权的移动平均。
| 指数移动平均
| 是以指数式递减加权的移动平均。
| EMA(close, timeperiod=30)
| EMA(close, timeperiod=30)
|-
| '''WMA''' <br \>Weighted Moving Average
|
|WMA(close, timeperiod=30)
|-
| '''DEMA'''<br \>Double Exponential Moving Average
|
| DEMA(close, timeperiod=30)
|-
| '''TEMA''' <br \>Triple Exponential Moving Average
|
| TEMA(close, timeperiod=30)
|-
| '''TRIMA''' <br \>Triangular Moving Average
|
| TRIMA(close, timeperiod=30)
|-
| '''KAMA'''<br \>Kaufman Adaptive Moving Average
|
| KAMA(close, timeperiod=30)
|-
| '''MAMA'''<br \>MESA Adaptive Moving Average
|
| mama, fama = MAMA(close, fastlimit=0, slowlimit=0)
|-
| '''T3'''<br \>Triple Exponential Moving Average (T3)
|
| T3(close, timeperiod=5, vfactor=0)
|-
| '''BBANDS'''<br \>Bollinger Bands
|
| upperband, middleband, lowerband = BBANDS(close, timeperiod=5, nbdevup=2, nbdevdn=2, matype=0)
|-
| '''HT_TRENDLINE'''<br \>Hilbert Transform
|
| HT_TRENDLINE(close)
|-
| '''MAVP'''<br \>Moving average with variable period
|
| MAVP(close, periods, minperiod=2, maxperiod=30, matype=0)
|-
| '''MIDPOINT'''<br \>MidPoint over period
|
| MIDPOINT(close, timeperiod=14)
|-
| '''MIDPRICE'''<br \>Midpoint Price over period
|
| MIDPRICE(high, low, timeperiod=14)
|-
| '''[[SAR]]'''<br \>Parabolic SAR
|
| SAR(high, low, acceleration=0, maximum=0)
|-
| '''SAREXT'''<br \>Parabolic SAR
|
| SAREXT(high, low, startvalue=0, offsetonreverse=0, accelerationinitlong=0, accelerationlong=0, accelerationmaxlong=0, accelerationinitshort=0, accelerationshort=0, accelerationmaxshort=0)
|}
|}
{{了解更多
{{了解更多
|[https://mrjbq7.github.io/ta-lib/func_groups/overlap_studies.html mrjbq7/ta-lib 文档:Overlap Studies]
|[https://mrjbq7.github.io/ta-lib/func_groups/overlap_studies.html mrjbq7/ta-lib 文档:Overlap Studies]

2021年1月22日 (五) 16:54的版本

TA-Lib(Technical Analysis Library)是一个多平台的技术分析库,多种编程语言的开源API,包括C/C++JavaPerlPython版等。包含200多个技术指标,如ADXMACDRSI布林带等,还支持烛台模式识别。Ta-Lib使用BSD许可,允许将它集成到您自己的开源或商业应用程序中。

TA-Lib的Python版本是使用 SWIG 封装C/C++版本的API,难安装,速度稍慢。开源项目mrjbq7/ta-lib使用CythonNumpy封装TA-Lib的C/C++版,速度比TA-Lib的Python版快,所以在Python中一般使用该版本。

简介

时间轴

安装

使用pip安装

mrjbq7/ta-lib有发布在PyPI上,可以使用pip安装:

pip install TA-Lib

了解更多 >> mrjbq7/ta-lib:安装


故障排除

了解更多 >> mrjbq7/ta-lib:故障排除



函数

Overlap Studies 重叠指标

函数名 描述 代码
MA
Moving average
移动平均线
按照计算方法可分多种,一般指简单移动平均(SMA)。
参数:
matype:默认0(简单移动平均),0=SMA,1=EMA,2=WMA,3=DEMA,4=TEMA,5=TRIMA,6=KAMA,7=MAMA,8=T3
MA(close, timeperiod=30, matype=0)
SMA
Simple Moving Average
简单移动平均 SMA(close, timeperiod=30)
EMA
Exponential Moving Average
指数移动平均
是以指数式递减加权的移动平均。
EMA(close, timeperiod=30)
WMA
Weighted Moving Average
WMA(close, timeperiod=30)
DEMA
Double Exponential Moving Average
DEMA(close, timeperiod=30)
TEMA
Triple Exponential Moving Average
TEMA(close, timeperiod=30)
TRIMA
Triangular Moving Average
TRIMA(close, timeperiod=30)
KAMA
Kaufman Adaptive Moving Average
KAMA(close, timeperiod=30)
MAMA
MESA Adaptive Moving Average
mama, fama = MAMA(close, fastlimit=0, slowlimit=0)
T3
Triple Exponential Moving Average (T3)
T3(close, timeperiod=5, vfactor=0)
BBANDS
Bollinger Bands
upperband, middleband, lowerband = BBANDS(close, timeperiod=5, nbdevup=2, nbdevdn=2, matype=0)
HT_TRENDLINE
Hilbert Transform
HT_TRENDLINE(close)
MAVP
Moving average with variable period
MAVP(close, periods, minperiod=2, maxperiod=30, matype=0)
MIDPOINT
MidPoint over period
MIDPOINT(close, timeperiod=14)
MIDPRICE
Midpoint Price over period
MIDPRICE(high, low, timeperiod=14)
SAR
Parabolic SAR
SAR(high, low, acceleration=0, maximum=0)
SAREXT
Parabolic SAR
SAREXT(high, low, startvalue=0, offsetonreverse=0, accelerationinitlong=0, accelerationlong=0, accelerationmaxlong=0, accelerationinitshort=0, accelerationshort=0, accelerationmaxshort=0)

了解更多 >> mrjbq7/ta-lib 文档:Overlap Studies mrjbq7/ta-lib GitHub: ta-lib/talib/_common.pxi


资源

官网