Momentum
polars_ta.ta.momentum
Functions:
| Name | Description |
|---|---|
APO |
|
AROON |
下轨:(N-LLVBARS(L,N))/N*100,COLORGREEN; |
MACD |
MACD |
MOM |
MOM = (price - prevPrice) [Momentum] |
PPO |
|
ROC |
ROC = ((price/prevPrice)-1)*100 [Rate of change] |
ROCP |
ROCP = (price-prevPrice)/prevPrice [Rate of change Percentage] |
ROCR |
ROCR = (price/prevPrice) [Rate of change ratio] |
ROCR100 |
ROCR100 = (price/prevPrice)*100 [Rate of change ratio 100 Scale] |
RSI |
|
RSV |
RSV=STOCHF_FASTK |
STOCHF |
|
TRIX |
|
WILLR |
威廉指标 |
APO(close: Expr, fastperiod: int = 12, slowperiod: int = 26, matype: int = 0) -> Expr
AROON(high: Expr, low: Expr, timeperiod: int = 14) -> Expr
下轨:(N-LLVBARS(L,N))/N100,COLORGREEN; 上轨:(N-HHVBARS(H,N))/N100,COLORRED;
Notes
You cannot use pd.Series.rolling().arg_max() with reverse order, which leads to a larger result when there are two or more high points so we don't use pandas pd.Series.rolling().arg_max()没有逆序,导致出现两个及以上最高点时,结果偏大
MACD(close: Expr, fastperiod: int = 12, slowperiod: int = 26, signalperiod: int = 9) -> Expr
MACD
Notes
When counting how many data we have
we refer to slowperiod, while talib.MACD refers to fastperiod
talib.MACD有效数据按fastperiod,而本项目按slowperiod
MOM(close: Expr, timeperiod: int = 10) -> Expr
MOM = (price - prevPrice) [Momentum]
References
https://github.com/TA-Lib/ta-lib/blob/main/src/ta_func/ta_MOM.c#L200
PPO(close: Expr, fastperiod: int = 12, slowperiod: int = 26, matype: int = 0) -> Expr
ROC(close: Expr, timeperiod: int = 10) -> Expr
ROC = ((price/prevPrice)-1)*100 [Rate of change]
References
https://github.com/TA-Lib/ta-lib/blob/main/src/ta_func/ta_ROC.c#L200
ROCP(close: Expr, timeperiod: int = 10) -> Expr
ROCP = (price-prevPrice)/prevPrice [Rate of change Percentage]
References
https://github.com/TA-Lib/ta-lib/blob/main/src/ta_func/ta_ROCP.c#L202
ROCR(close: Expr, timeperiod: int = 10) -> Expr
ROCR = (price/prevPrice) [Rate of change ratio]
References
https://github.com/TA-Lib/ta-lib/blob/main/src/ta_func/ta_ROCR.c#L203
ROCR100(close: Expr, timeperiod: int = 10) -> Expr
ROCR100 = (price/prevPrice)*100 [Rate of change ratio 100 Scale]
References
https://github.com/TA-Lib/ta-lib/blob/main/src/ta_func/ta_ROCR100.c#L203
RSI(close: Expr, timeperiod: int = 14) -> Expr
RSV(high: Expr, low: Expr, close: Expr, timeperiod: int = 5) -> Expr
RSV=STOCHF_FASTK
(Today's Close - LowestLow)
FASTK(Kperiod) = --------------------------- * 100 (HighestHigh - LowestLow)
Notes
RSV = STOCHF_FASTK。没乘以100
References
https://github.com/TA-Lib/ta-lib/blob/main/src/ta_func/ta_STOCHF.c#L279
STOCHF(high: Expr, low: Expr, close: Expr, fastk_period: int = 5, fastd_period: int = 3) -> Expr
TRIX(close: Expr, timeperiod: int = 30) -> Expr
WILLR(high: Expr, low: Expr, close: Expr, timeperiod: int = 14) -> Expr
威廉指标
Notes
WILLR=1-RSV
References
- https://github.com/TA-Lib/ta-lib/blob/main/src/ta_func/ta_WILLR.c#L294
- https://www.investopedia.com/terms/w/williamsr.asp
- https://school.stockcharts.com/doku.php?id=technical_indicators:williams_r