mirror of
https://github.com/wassname/pandas-ta.git
synced 2026-07-14 01:10:34 +08:00
all momentum indicators fully typed.
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pandas_ta.overlap import sma
|
||||
from pandas_ta.utils import get_offset, verify_series
|
||||
from pandas import Series
|
||||
|
||||
|
||||
def ao(high, low, fast=None, slow=None, offset=None, **kwargs):
|
||||
def ao(high: Series, low: Series, fast: int = None, slow: int = None, offset: int = None, **kwargs) -> Series:
|
||||
"""Awesome Oscillator (AO)
|
||||
|
||||
The Awesome Oscillator is an indicator used to measure a security's momentum.
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
from pandas_ta import Imports
|
||||
from pandas_ta.overlap import ma
|
||||
from pandas_ta.utils import get_offset, tal_ma, verify_series
|
||||
from pandas import Series
|
||||
|
||||
|
||||
def apo(close, fast=None, slow=None, mamode=None, talib=None, offset=None, **kwargs):
|
||||
def apo(close: Series, fast: int = None, slow: int = None, mamode: str = None, talib: bool = None,
|
||||
offset: int = None, **kwargs) -> Series:
|
||||
"""Absolute Price Oscillator (APO)
|
||||
|
||||
The Absolute Price Oscillator is an indicator used to measure a security's
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pandas_ta.overlap import ma
|
||||
from pandas_ta.utils import get_offset, verify_series
|
||||
from pandas import Series
|
||||
|
||||
|
||||
def bias(close, length=None, mamode=None, offset=None, **kwargs):
|
||||
def bias(close: Series, length: int = None, mamode: str = None, offset: int = None, **kwargs) -> Series:
|
||||
"""Bias (BIAS)
|
||||
|
||||
Rate of change between the source and a moving average.
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pandas_ta import Imports
|
||||
from pandas_ta.utils import get_offset, non_zero_range, verify_series
|
||||
from pandas import Series
|
||||
|
||||
|
||||
def bop(open_, high, low, close, scalar=None, talib=None, offset=None, **kwargs):
|
||||
def bop(open_: Series, high: Series, low: Series, close: Series, scalar: float = None, talib: bool = None,
|
||||
offset: int = None, **kwargs) -> Series:
|
||||
"""Balance of Power (BOP)
|
||||
|
||||
Balance of Power measure the market strength of buyers against sellers.
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pandas import DataFrame
|
||||
from pandas import DataFrame, Series
|
||||
from pandas_ta.utils import get_drift, get_offset, non_zero_range, verify_series
|
||||
|
||||
|
||||
def brar(open_, high, low, close, length=None, scalar=None, drift=None, offset=None, **kwargs):
|
||||
def brar(open_: Series, high: Series, low: Series, close: Series, length: int = None, scalar: float = None,
|
||||
drift: int = None, offset: int = None, **kwargs) -> DataFrame:
|
||||
"""BRAR (BRAR)
|
||||
|
||||
BR and AR
|
||||
|
||||
@@ -3,9 +3,11 @@ from pandas_ta import Imports
|
||||
from pandas_ta.overlap import hlc3, sma
|
||||
from pandas_ta.statistics.mad import mad
|
||||
from pandas_ta.utils import get_offset, verify_series
|
||||
from pandas import Series
|
||||
|
||||
|
||||
def cci(high, low, close, length=None, c=None, talib=None, offset=None, **kwargs):
|
||||
def cci(high: Series, low: Series, close: Series, length: int = None, c: float = None,
|
||||
talib: bool = None, offset: int = None, **kwargs) -> Series:
|
||||
"""Commodity Channel Index (CCI)
|
||||
|
||||
Commodity Channel Index is a momentum oscillator used to primarily identify
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pandas_ta.overlap import linreg
|
||||
from pandas_ta.utils import get_drift, get_offset, verify_series
|
||||
from pandas import Series
|
||||
|
||||
|
||||
def cfo(close, length=None, scalar=None, drift=None, offset=None, **kwargs):
|
||||
def cfo(close: Series, length: int = None, scalar: float = None, drift: int = None, offset: int = None,
|
||||
**kwargs) -> Series:
|
||||
"""Chande Forcast Oscillator (CFO)
|
||||
|
||||
The Forecast Oscillator calculates the percentage difference between the actual
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pandas_ta.utils import get_offset, verify_series, weights
|
||||
from pandas import Series
|
||||
|
||||
|
||||
def cg(close, length=None, offset=None, **kwargs):
|
||||
def cg(close: Series, length: int = None, offset: int = None, **kwargs) -> Series:
|
||||
"""Center of Gravity (CG)
|
||||
|
||||
The Center of Gravity Indicator by John Ehlers attempts to identify turning
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
from pandas_ta import Imports
|
||||
from pandas_ta.overlap import rma
|
||||
from pandas_ta.utils import get_drift, get_offset, verify_series
|
||||
from pandas import Series
|
||||
|
||||
|
||||
def cmo(close, length=None, scalar=None, talib=None, drift=None, offset=None, **kwargs):
|
||||
def cmo(close: Series, length: int = None, scalar: float = None, talib: bool = None, drift: int = None,
|
||||
offset: int = None, **kwargs) -> Series:
|
||||
"""Chande Momentum Oscillator (CMO)
|
||||
|
||||
Attempts to capture the momentum of an asset with overbought at 50 and
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
from .roc import roc
|
||||
from pandas_ta.overlap import wma
|
||||
from pandas_ta.utils import get_offset, verify_series
|
||||
from pandas import Series
|
||||
|
||||
|
||||
def coppock(close, length=None, fast=None, slow=None, offset=None, **kwargs):
|
||||
def coppock(close: Series, length: int = None, fast: int = None, slow: int = None, offset: int = None,
|
||||
**kwargs) -> Series:
|
||||
"""Coppock Curve (COPC)
|
||||
|
||||
Coppock Curve (originally called the "Trendex Model") is a momentum indicator
|
||||
|
||||
@@ -4,7 +4,7 @@ from pandas_ta.overlap import linreg
|
||||
from pandas_ta.utils import get_offset, verify_series
|
||||
|
||||
|
||||
def cti(close, length=None, offset=None, **kwargs) -> Series:
|
||||
def cti(close: Series, length: int = None, offset: int = None, **kwargs) -> Series:
|
||||
"""Correlation Trend Indicator (CTI)
|
||||
|
||||
The Correlation Trend Indicator is an oscillator created by John Ehler in 2020.
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pandas import DataFrame
|
||||
from pandas import DataFrame, Series
|
||||
from pandas_ta import Imports
|
||||
from pandas_ta.overlap import ma
|
||||
from pandas_ta.utils import get_offset, verify_series, get_drift, zero
|
||||
|
||||
|
||||
def dm(high, low, length=None, mamode=None, talib=None, drift=None, offset=None, **kwargs):
|
||||
def dm(high: Series, low: Series, length: int = None, mamode: str = None, talib: bool = None, drift: int = None,
|
||||
offset: int = None, **kwargs) -> DataFrame:
|
||||
"""Directional Movement (DM)
|
||||
|
||||
The Directional Movement was developed by J. Welles Wilder in 1978 attempts to
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pandas import DataFrame, concat
|
||||
from pandas import DataFrame, concat, Series
|
||||
from pandas_ta.utils import get_drift, get_offset, verify_series, signals
|
||||
|
||||
|
||||
def er(close, length=None, drift=None, offset=None, **kwargs):
|
||||
def er(close: Series, length: int = None, drift: int = None, offset: int = None, **kwargs) -> Series:
|
||||
"""Efficiency Ratio (ER)
|
||||
|
||||
The Efficiency Ratio was invented by Perry J. Kaufman and presented in his book "New Trading Systems and Methods". It is designed to account for market noise or volatility.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pandas import DataFrame
|
||||
from pandas import DataFrame, Series
|
||||
from pandas_ta.overlap import ema
|
||||
from pandas_ta.utils import get_offset, verify_series
|
||||
|
||||
|
||||
def eri(high, low, close, length=None, offset=None, **kwargs):
|
||||
def eri(high: Series, low: Series, close: Series, length: int = None, offset: int = None, **kwargs) -> DataFrame:
|
||||
"""Elder Ray Index (ERI)
|
||||
|
||||
Elder's Bulls Ray Index contains his Bull and Bear Powers. Which are useful ways
|
||||
|
||||
@@ -6,7 +6,8 @@ from pandas_ta.overlap import hl2
|
||||
from pandas_ta.utils import get_offset, high_low_range, verify_series
|
||||
|
||||
|
||||
def fisher(high, low, length=None, signal=None, offset=None, **kwargs):
|
||||
def fisher(high: Series, low: Series, length: int = None, signal: int = None, offset: int = None,
|
||||
**kwargs) -> Series:
|
||||
"""Fisher Transform (FISHT)
|
||||
|
||||
Attempts to identify significant price reversals by normalizing prices over a
|
||||
|
||||
@@ -2,9 +2,12 @@
|
||||
from pandas_ta.overlap import linreg
|
||||
from pandas_ta.volatility import rvi
|
||||
from pandas_ta.utils import get_drift, get_offset, verify_series
|
||||
from pandas import Series
|
||||
|
||||
|
||||
def inertia(close=None, high=None, low=None, length=None, rvi_length=None, scalar=None, refined=None, thirds=None, mamode=None, drift=None, offset=None, **kwargs):
|
||||
def inertia(close: Series, high: Series, low: Series, length: int = None, rvi_length: int = None, scalar: float = None,
|
||||
refined: bool = None, thirds: bool = None, mamode: str = None, drift: int = None, offset: int = None,
|
||||
**kwargs) -> Series:
|
||||
"""Inertia (INERTIA)
|
||||
|
||||
Inertia was developed by Donald Dorsey and was introduced his article
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pandas import DataFrame
|
||||
from pandas import DataFrame, Series
|
||||
from pandas_ta.utils import get_offset, non_zero_range, rma_pandas, verify_series
|
||||
|
||||
|
||||
def kdj(high=None, low=None, close=None, length=None, signal=None, offset=None, **kwargs):
|
||||
def kdj(high: Series, low: Series, close: Series, length: int = None, signal: int = None, offset: int = None,
|
||||
**kwargs) -> Series:
|
||||
"""KDJ (KDJ)
|
||||
|
||||
The KDJ indicator is actually a derived form of the Slow
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pandas import DataFrame
|
||||
from pandas import DataFrame, Series
|
||||
from .roc import roc
|
||||
from pandas_ta.utils import get_drift, get_offset, verify_series
|
||||
|
||||
|
||||
def kst(close, roc1=None, roc2=None, roc3=None, roc4=None, sma1=None, sma2=None, sma3=None, sma4=None, signal=None, drift=None, offset=None, **kwargs):
|
||||
def kst(close: Series, roc1: int = None, roc2: int = None, roc3: int = None, roc4: int = None, sma1: int = None,
|
||||
sma2: int = None, sma3: int = None, sma4: int = None, signal: int = None, drift: int = None,
|
||||
offset: int = None, **kwargs) -> DataFrame:
|
||||
"""'Know Sure Thing' (KST)
|
||||
|
||||
The 'Know Sure Thing' is a momentum based oscillator and based on ROC.
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pandas import concat, DataFrame
|
||||
from pandas import concat, DataFrame, Series
|
||||
from pandas_ta import Imports
|
||||
from pandas_ta.overlap import ema
|
||||
from pandas_ta.utils import get_offset, verify_series, signals
|
||||
|
||||
|
||||
def macd(close, fast=None, slow=None, signal=None, talib=None, offset=None, **kwargs):
|
||||
def macd(close: Series, fast: int = None, slow: int = None, signal: int = None, talib: bool = None,
|
||||
offset: int = None, **kwargs) -> DataFrame:
|
||||
"""Moving Average Convergence Divergence (MACD)
|
||||
|
||||
The MACD is a popular indicator to that is used to identify a security's trend.
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pandas_ta import Imports
|
||||
from pandas_ta.utils import get_offset, verify_series
|
||||
from pandas import Series
|
||||
|
||||
|
||||
def mom(close, length=None, talib=None, offset=None, **kwargs):
|
||||
def mom(close: Series, length: int = None, talib: bool = None, offset: int = None, **kwargs) -> Series:
|
||||
"""Momentum (MOM)
|
||||
|
||||
Momentum is an indicator used to measure a security's speed (or strength) of
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
from pandas_ta.overlap import ema, sma
|
||||
from pandas_ta.volatility import atr
|
||||
from pandas_ta.utils import get_offset, verify_series
|
||||
from pandas import Series
|
||||
|
||||
|
||||
def pgo(high, low, close, length=None, offset=None, **kwargs):
|
||||
def pgo(high: Series, low: Series, close: Series, length: int = None, offset: int = None, **kwargs) -> Series:
|
||||
"""Pretty Good Oscillator (PGO)
|
||||
|
||||
The Pretty Good Oscillator indicator was created by Mark Johnson to measure the distance of the current close from its N-day Simple Moving Average, expressed in terms of an average true range over a similar period. Johnson's approach was to
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pandas import DataFrame
|
||||
from pandas import DataFrame, Series
|
||||
from pandas_ta import Imports
|
||||
from pandas_ta.overlap import ma
|
||||
from pandas_ta.utils import get_offset, tal_ma, verify_series
|
||||
|
||||
|
||||
def ppo(close, fast=None, slow=None, signal=None, scalar=None, mamode=None, talib=None, offset=None, **kwargs):
|
||||
def ppo(close: Series, fast: int = None, slow: int = None, signal: int = None, scalar: float = None,
|
||||
mamode: str = None, talib: bool = None, offset: int = None, **kwargs) -> DataFrame:
|
||||
|
||||
"""Percentage Price Oscillator (PPO)
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from numpy import sign as npSign
|
||||
from pandas_ta.utils import get_drift, get_offset, verify_series
|
||||
from pandas import Series
|
||||
|
||||
|
||||
def psl(close, open_=None, length=None, scalar=None, drift=None, offset=None, **kwargs):
|
||||
def psl(close: Series, open_: Series = None, length: int = None, scalar: float = None, drift: int = None,
|
||||
offset: int = None, **kwargs) -> Series:
|
||||
"""Psychological Line (PSL)
|
||||
|
||||
The Psychological Line is an oscillator-type indicator that compares the
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pandas import DataFrame
|
||||
from pandas import DataFrame, Series
|
||||
from pandas_ta.overlap import ema
|
||||
from pandas_ta.utils import get_offset, verify_series
|
||||
|
||||
|
||||
def pvo(volume, fast=None, slow=None, signal=None, scalar=None, offset=None, **kwargs):
|
||||
def pvo(volume: Series, fast: int = None, slow: int = None, signal: int = None, scalar: float = None,
|
||||
offset: int = None, **kwargs) -> DataFrame:
|
||||
"""Percentage Volume Oscillator (PVO)
|
||||
|
||||
Percentage Volume Oscillator is a Momentum Oscillator for Volume.
|
||||
|
||||
@@ -9,7 +9,8 @@ from pandas_ta.overlap import ma
|
||||
from pandas_ta.utils import get_drift, get_offset, verify_series
|
||||
|
||||
|
||||
def qqe(close, length=None, smooth=None, factor=None, mamode=None, drift=None, offset=None, **kwargs):
|
||||
def qqe(close: Series, length: int = None, smooth: int = None, factor: float = None, mamode: str = None,
|
||||
drift: int = None, offset: int = None, **kwargs) -> DataFrame:
|
||||
"""Quantitative Qualitative Estimation (QQE)
|
||||
|
||||
The Quantitative Qualitative Estimation (QQE) is similar to SuperTrend but uses a Smoothed RSI with an upper and lower bands. The band width is a combination of a one period True Range of the Smoothed RSI which is double smoothed using Wilder's smoothing length (2 * rsiLength - 1) and multiplied by the default factor of 4.236. A Long trend is determined when the Smoothed RSI crosses the previous upperband and a Short trend when the Smoothed RSI crosses the previous lowerband.
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
from .mom import mom
|
||||
from pandas_ta import Imports
|
||||
from pandas_ta.utils import get_offset, verify_series
|
||||
from pandas import Series
|
||||
|
||||
|
||||
def roc(close, length=None, scalar=None, talib=None, offset=None, **kwargs):
|
||||
def roc(close: Series, length: int = None, scalar: float = None, talib: bool = None, offset: int = None,
|
||||
**kwargs) -> Series:
|
||||
"""Rate of Change (ROC)
|
||||
|
||||
Rate of Change is an indicator is also referred to as Momentum (yeah, confusingly).
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pandas import DataFrame, concat
|
||||
from pandas import DataFrame, concat, Series
|
||||
from pandas_ta import Imports
|
||||
from pandas_ta.overlap import rma
|
||||
from pandas_ta.utils import get_drift, get_offset, verify_series, signals
|
||||
|
||||
|
||||
def rsi(close, length=None, scalar=None, talib=None, drift=None, offset=None, **kwargs):
|
||||
def rsi(close: Series, length: int = None, scalar: float = None, talib: bool = None, drift: int = None,
|
||||
offset: int = None, **kwargs) -> Series:
|
||||
"""Relative Strength Index (RSI)
|
||||
|
||||
The Relative Strength Index is popular momentum oscillator used to measure the
|
||||
|
||||
@@ -4,7 +4,7 @@ from pandas import concat, DataFrame, Series
|
||||
from pandas_ta.utils import get_drift, get_offset, verify_series, signals
|
||||
|
||||
|
||||
def rsx(close, length=None, drift=None, offset=None, **kwargs):
|
||||
def rsx(close: Series, length: int = None, drift: int = None, offset: int = None, **kwargs) -> Series:
|
||||
"""Relative Strength Xtra (rsx)
|
||||
|
||||
The Relative Strength Xtra is based on the popular RSI indicator and inspired
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pandas import DataFrame
|
||||
from pandas import DataFrame, Series
|
||||
from pandas_ta.overlap import swma
|
||||
from pandas_ta.utils import get_offset, non_zero_range, verify_series
|
||||
|
||||
|
||||
def rvgi(open_, high, low, close, length=None, swma_length=None, offset=None, **kwargs):
|
||||
def rvgi(open_: Series, high: Series, low: Series, close: Series, length: int = None, swma_length: int = None,
|
||||
offset: int = None, **kwargs) -> Series:
|
||||
"""Relative Vigor Index (RVGI)
|
||||
|
||||
The Relative Vigor Index attempts to measure the strength of a trend relative to
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
from numpy import arctan as npAtan
|
||||
from numpy import pi as npPi
|
||||
from pandas_ta.utils import get_offset, verify_series
|
||||
from pandas import Series
|
||||
|
||||
|
||||
def slope( close, length=None, as_angle=None, to_degrees=None, vertical=None, offset=None, **kwargs):
|
||||
def slope( close: Series, length: int = None, as_angle=None, to_degrees=None, vertical=None,
|
||||
offset: int = None, **kwargs) -> Series:
|
||||
"""Slope
|
||||
|
||||
Returns the slope of a series of length n. Can convert the slope to angle.
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pandas import DataFrame
|
||||
from pandas import DataFrame, Series
|
||||
from .tsi import tsi
|
||||
from pandas_ta.overlap import ema
|
||||
from pandas_ta.utils import get_offset, verify_series
|
||||
|
||||
|
||||
def smi(close, fast=None, slow=None, signal=None, scalar=None, offset=None, **kwargs):
|
||||
def smi(close: Series, fast: int = None, slow: int = None, signal: int = None, scalar: float = None,
|
||||
offset: int = None, **kwargs) -> DataFrame:
|
||||
"""SMI Ergodic Indicator (SMI)
|
||||
|
||||
The SMI Ergodic Indicator is the same as the True Strength Index (TSI) developed
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from numpy import nan as npNaN
|
||||
from pandas import DataFrame
|
||||
from pandas import DataFrame, Series
|
||||
from pandas_ta.momentum import mom
|
||||
from pandas_ta.overlap import ema, linreg, sma
|
||||
from pandas_ta.trend import decreasing, increasing
|
||||
@@ -9,7 +9,9 @@ from pandas_ta.utils import get_offset
|
||||
from pandas_ta.utils import unsigned_differences, verify_series
|
||||
|
||||
|
||||
def squeeze(high, low, close, bb_length=None, bb_std=None, kc_length=None, kc_scalar=None, mom_length=None, mom_smooth=None, use_tr=None, mamode=None, offset=None, **kwargs):
|
||||
def squeeze(high: Series, low: Series, close: Series, bb_length: int = None, bb_std: float = None,
|
||||
kc_length: int = None, kc_scalar: float = None, mom_length: int = None, mom_smooth: int = None,
|
||||
use_tr=None, mamode: str = None, offset: int = None, **kwargs) -> DataFrame:
|
||||
"""Squeeze (SQZ)
|
||||
|
||||
The default is based on John Carter's "TTM Squeeze" indicator, as discussed
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from numpy import NaN as npNaN
|
||||
from pandas import DataFrame
|
||||
from pandas import DataFrame, Series
|
||||
from pandas_ta.momentum import mom
|
||||
from pandas_ta.overlap import ema, sma
|
||||
from pandas_ta.trend import decreasing, increasing
|
||||
@@ -9,7 +9,10 @@ from pandas_ta.utils import get_offset
|
||||
from pandas_ta.utils import unsigned_differences, verify_series
|
||||
|
||||
|
||||
def squeeze_pro(high, low, close, bb_length=None, bb_std=None, kc_length=None, kc_scalar_wide=None, kc_scalar_normal=None, kc_scalar_narrow=None, mom_length=None, mom_smooth=None, use_tr=None, mamode=None, offset=None, **kwargs):
|
||||
def squeeze_pro(high: Series, low: Series, close: Series, bb_length: int = None, bb_std: float = None,
|
||||
kc_length: int = None, kc_scalar_wide: float = None, kc_scalar_normal: float = None,
|
||||
kc_scalar_narrow: float = None, mom_length: int = None, mom_smooth: int = None, use_tr=None,
|
||||
mamode: str = None, offset: int = None, **kwargs) -> DataFrame:
|
||||
"""Squeeze PRO(SQZPRO)
|
||||
|
||||
This indicator is an extended version of "TTM Squeeze" from John Carter.
|
||||
|
||||
@@ -4,7 +4,8 @@ from pandas_ta.overlap import ema
|
||||
from pandas_ta.utils import get_offset, non_zero_range, verify_series
|
||||
|
||||
|
||||
def stc(close, tclength=None, fast=None, slow=None, factor=None, offset=None, **kwargs):
|
||||
def stc(close: Series, tclength: int = None, fast: int = None, slow: int = None, factor: float = None,
|
||||
offset: int = None, **kwargs) -> DataFrame:
|
||||
"""Schaff Trend Cycle (STC)
|
||||
|
||||
The Schaff Trend Cycle is an evolution of the popular MACD incorportating two
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pandas import DataFrame
|
||||
from pandas import DataFrame, Series
|
||||
from pandas_ta import Imports
|
||||
from pandas_ta.overlap import ma
|
||||
from pandas_ta.utils import get_offset, non_zero_range, tal_ma, verify_series
|
||||
|
||||
|
||||
def stoch(high, low, close, k=None, d=None, smooth_k=None, mamode=None, talib=None, offset=None, **kwargs):
|
||||
def stoch(high: Series, low: Series, close: Series, k: int = None, d: int = None, smooth_k: int = None,
|
||||
mamode: str = None, talib: bool = None, offset: int = None, **kwargs) -> DataFrame:
|
||||
"""Stochastic (STOCH)
|
||||
|
||||
The Stochastic Oscillator (STOCH) was developed by George Lane in the 1950's.
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pandas import DataFrame
|
||||
from pandas import DataFrame, Series
|
||||
from pandas_ta import Imports
|
||||
from pandas_ta.overlap import ma
|
||||
from pandas_ta.utils import get_offset, non_zero_range, tal_ma, verify_series
|
||||
|
||||
|
||||
def stochf(high, low, close, k=None, d=None, mamode=None, talib=None, offset=None, **kwargs):
|
||||
def stochf(high: Series, low: Series, close: Series, k: int = None, d: int = None, mamode: str = None,
|
||||
talib: bool = None, offset: int = None, **kwargs) -> DataFrame:
|
||||
"""Fast Stochastic (STOCHF)
|
||||
|
||||
The Fast Stochastic Oscillator (STOCHF) was developed by George Lane in the
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pandas import DataFrame
|
||||
from pandas import DataFrame, Series
|
||||
from .rsi import rsi
|
||||
from pandas_ta.overlap import ma
|
||||
from pandas_ta.utils import get_offset, non_zero_range, verify_series
|
||||
|
||||
|
||||
def stochrsi(close, length=None, rsi_length=None, k=None, d=None, mamode=None, offset=None, **kwargs):
|
||||
def stochrsi(close: Series, length: int = None, rsi_length: int = None, k: int = None, d: int = None,
|
||||
mamode: str = None, offset: int = None, **kwargs) -> DataFrame:
|
||||
"""Stochastic (STOCHRSI)
|
||||
|
||||
"Stochastic RSI and Dynamic Momentum Index" was created by Tushar Chande and Stanley Kroll and published in Stock & Commodities V.11:5 (189-199)
|
||||
|
||||
@@ -5,7 +5,7 @@ from pandas import DataFrame, Series
|
||||
from pandas_ta.utils import get_offset, verify_series
|
||||
|
||||
|
||||
def td_seq(close, asint=None, offset=None, **kwargs):
|
||||
def td_seq(close: Series, asint: bool = None, offset: int = None, **kwargs) -> DataFrame:
|
||||
"""TD Sequential (TD_SEQ)
|
||||
|
||||
Tom DeMark's Sequential indicator attempts to identify a price point where an
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pandas import DataFrame
|
||||
from pandas import DataFrame, Series
|
||||
from pandas_ta.overlap.ema import ema
|
||||
from pandas_ta.utils import get_drift, get_offset, verify_series
|
||||
|
||||
|
||||
def trix(close, length=None, signal=None, scalar=None, drift=None, offset=None, **kwargs):
|
||||
def trix(close: Series, length: int = None, signal: int = None, scalar: float = None, drift: int = None,
|
||||
offset: int = None, **kwargs) -> Series:
|
||||
"""Trix (TRIX)
|
||||
|
||||
TRIX is a momentum oscillator to identify divergences.
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pandas import DataFrame
|
||||
from pandas import DataFrame, Series
|
||||
from pandas_ta.overlap import ema, ma
|
||||
from pandas_ta.utils import get_drift, get_offset, verify_series
|
||||
|
||||
|
||||
def tsi(close, fast=None, slow=None, signal=None, scalar=None, mamode=None, drift=None, offset=None, **kwargs):
|
||||
def tsi(close: Series, fast: int = None, slow: int = None, signal: int = None, scalar: float = None,
|
||||
mamode: str = None, drift: int = None, offset: int = None, **kwargs) -> DataFrame:
|
||||
"""True Strength Index (TSI)
|
||||
|
||||
The True Strength Index is a momentum indicator used to identify short-term
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pandas import DataFrame
|
||||
from pandas import DataFrame, Series
|
||||
from pandas_ta import Imports
|
||||
from pandas_ta.utils import get_drift, get_offset, verify_series
|
||||
|
||||
|
||||
def uo(high, low, close, fast=None, medium=None, slow=None, fast_w=None, medium_w=None, slow_w=None, talib=None, drift=None, offset=None, **kwargs):
|
||||
def uo(high: Series, low: Series, close: Series, fast: int = None, medium: int = None, slow: int = None,
|
||||
fast_w: float = None, medium_w: float = None, slow_w: float = None, talib: bool = None, drift: int = None,
|
||||
offset: int = None, **kwargs) -> Series:
|
||||
"""Ultimate Oscillator (UO)
|
||||
|
||||
The Ultimate Oscillator is a momentum indicator over three different
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pandas_ta import Imports
|
||||
from pandas_ta.utils import get_offset, verify_series
|
||||
from pandas import Series
|
||||
|
||||
|
||||
def willr(high, low, close, length=None, talib=None, offset=None, **kwargs):
|
||||
def willr(high: Series, low: Series, close: Series, length: int = None, talib: bool = None, offset: int = None,
|
||||
**kwargs) -> Series:
|
||||
"""William's Percent R (WILLR)
|
||||
|
||||
William's Percent R is a momentum oscillator similar to the RSI that
|
||||
|
||||
Reference in New Issue
Block a user