diff --git a/README.md b/README.md index 40ecdeb..e341802 100644 --- a/README.md +++ b/README.md @@ -75,14 +75,14 @@ _Pandas Technical Analysis_ (**Pandas TA**) is an easy to use library that lever Stable ------ -The ```pip``` version is the last most stable release. +The ```pip``` version is the last most stable release. Version: *0.2.23b* ```sh $ pip install pandas_ta ``` Latest Version -------------- -Best choice! +Best choice! Version: *0.2.45b* ```sh $ pip install -U git+https://github.com/twopirllc/pandas-ta ``` @@ -656,7 +656,7 @@ Use parameter: cumulative=**True** for cumulative results.

-# **Performance Metrics** (BETA) +# **Performance Metrics**   _BETA_ _Performance Metrics_ are a **new** addition to the package and consequentially are likely unreliable. **Use at your own risk.** These metrics return a _float_ and are _not_ part of the _DataFrame_ Extension. They are called the Standard way. For Example: ```python @@ -722,8 +722,4 @@ article in the June, 1994 issue of Technical Analysis of Stocks & Commodities Ma
# **Sources** -* [Original TA-LIB](http://ta-lib.org/) -* [TradingView](http://www.tradingview.com) -* [Sierra Chart](https://search.sierrachart.com/?Query=indicators&submitted=true) -* [FM Labs](https://www.fmlabs.com/reference/default.htm) -* [User 42](https://user42.tuxfamily.org/chart/manual/index.html) +[Original TA-LIB](http://ta-lib.org/) | [TradingView](http://www.tradingview.com) | [Sierra Chart](https://search.sierrachart.com/?Query=indicators&submitted=true) | [MQL5](https://www.mql5.com) | [FM Labs](https://www.fmlabs.com/reference/default.htm) | [Pro Real Code](https://www.prorealcode.com/prorealtime-indicators) | [User 42](https://user42.tuxfamily.org/chart/manual/index.html) \ No newline at end of file diff --git a/pandas_ta/candles/cdl_doji.py b/pandas_ta/candles/cdl_doji.py index 37dabc8..67f4c9c 100644 --- a/pandas_ta/candles/cdl_doji.py +++ b/pandas_ta/candles/cdl_doji.py @@ -77,7 +77,8 @@ Args: Kwargs: naive (bool, optional): If True, prefills potential Doji less than - the length if less than a percentage of it's high-low range. Default: False + the length if less than a percentage of it's high-low range. + Default: False fillna (value, optional): pd.DataFrame.fillna(value) fill_method (value, optional): Type of fill method diff --git a/pandas_ta/cycles/ebsw.py b/pandas_ta/cycles/ebsw.py index 2a22a57..7c2d6c7 100644 --- a/pandas_ta/cycles/ebsw.py +++ b/pandas_ta/cycles/ebsw.py @@ -36,8 +36,7 @@ def ebsw(close, length=None, bars=None, offset=None, **kwargs): c3 = -1 * a1 * a1 c1 = 1 - c2 - c3 Filt = c1 * (HP + lastHP) / 2 + c2 * FilterHist[1] + c3 * FilterHist[0] - # Filt = float("{:.8f}".format(float(Filt))) # to fix for small scientific notations, the big ones fail - # print('Filt: ', Filt, 'FilterHist (list): ', FilterHist) + # Filt = float("{:.8f}".format(float(Filt))) # to fix for small scientific notations, the big ones fail # 3 Bar average of Wave amplitude and power Wave = (Filt + FilterHist[1] + FilterHist[0]) / 3 diff --git a/pandas_ta/momentum/ao.py b/pandas_ta/momentum/ao.py index 3d77822..7d8e971 100644 --- a/pandas_ta/momentum/ao.py +++ b/pandas_ta/momentum/ao.py @@ -57,9 +57,9 @@ Calculation: Args: high (pd.Series): Series of 'high's low (pd.Series): Series of 'low's - fast (int): The short period. Default: 5 - slow (int): The long period. Default: 34 - offset (int): How many periods to offset the result. Default: 0 + fast (int): The short period. Default: 5 + slow (int): The long period. Default: 34 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/apo.py b/pandas_ta/momentum/apo.py index 862165b..cac8845 100644 --- a/pandas_ta/momentum/apo.py +++ b/pandas_ta/momentum/apo.py @@ -40,7 +40,7 @@ apo.__doc__ = \ The Absolute Price Oscillator is an indicator used to measure a security's momentum. It is simply the difference of two Exponential Moving Averages -(EMA) of two different periods. Note: APO and MACD lines are equivalent. +(EMA) of two different periods. Note: APO and MACD lines are equivalent. Sources: https://www.tradingtechnologies.com/xtrader-help/x-study/technical-indicator-definitions/absolute-price-oscillator-apo/ @@ -53,9 +53,9 @@ Calculation: Args: close (pd.Series): Series of 'close's - fast (int): The short period. Default: 12 - slow (int): The long period. Default: 26 - offset (int): How many periods to offset the result. Default: 0 + fast (int): The short period. Default: 12 + slow (int): The long period. Default: 26 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/bias.py b/pandas_ta/momentum/bias.py index 8d4e1d8..26edfb6 100644 --- a/pandas_ta/momentum/bias.py +++ b/pandas_ta/momentum/bias.py @@ -50,10 +50,10 @@ Calculation: Args: close (pd.Series): Series of 'close's - length (int): The period. Default: 26 - mamode (str): Options: 'ema', 'hma', 'rma', 'sma', 'wma'. Default: 'sma' - drift (int): The short period. Default: 1 - offset (int): How many periods to offset the result. Default: 0 + length (int): The period. Default: 26 + mamode (str): Options: 'ema', 'hma', 'rma', 'sma', 'wma'. Default: 'sma' + drift (int): The short period. Default: 1 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/brar.py b/pandas_ta/momentum/brar.py index db82290..56efbec 100644 --- a/pandas_ta/momentum/brar.py +++ b/pandas_ta/momentum/brar.py @@ -85,10 +85,10 @@ Args: high (pd.Series): Series of 'high's low (pd.Series): Series of 'low's close (pd.Series): Series of 'close's - length (int): The period. Default: 26 - scalar (float): How much to magnify. Default: 100 - drift (int): The difference period. Default: 1 - offset (int): How many periods to offset the result. Default: 0 + length (int): The period. Default: 26 + scalar (float): How much to magnify. Default: 100 + drift (int): The difference period. Default: 1 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/cci.py b/pandas_ta/momentum/cci.py index 6456a1f..001fa67 100644 --- a/pandas_ta/momentum/cci.py +++ b/pandas_ta/momentum/cci.py @@ -62,9 +62,9 @@ Args: high (pd.Series): Series of 'high's low (pd.Series): Series of 'low's close (pd.Series): Series of 'close's - length (int): It's period. Default: 14 - c (float): Scaling Constant. Default: 0.015 - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 14 + c (float): Scaling Constant. Default: 0.015 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/cg.py b/pandas_ta/momentum/cg.py index ed99166..f83b304 100644 --- a/pandas_ta/momentum/cg.py +++ b/pandas_ta/momentum/cg.py @@ -46,8 +46,8 @@ Calculation: Args: close (pd.Series): Series of 'close's - length (int): The length of the period. Default: 10 - offset (int): How many periods to offset the result. Default: 0 + length (int): The length of the period. Default: 10 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/coppock.py b/pandas_ta/momentum/coppock.py index 0ae42ea..63a3b7f 100644 --- a/pandas_ta/momentum/coppock.py +++ b/pandas_ta/momentum/coppock.py @@ -58,10 +58,10 @@ Calculation: Args: close (pd.Series): Series of 'close's - length (int): WMA period. Default: 10 - fast (int): Fast ROC period. Default: 11 - slow (int): Slow ROC period. Default: 14 - offset (int): How many periods to offset the result. Default: 0 + length (int): WMA period. Default: 10 + fast (int): Fast ROC period. Default: 11 + slow (int): Slow ROC period. Default: 14 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/er.py b/pandas_ta/momentum/er.py index 26e6da3..693528e 100644 --- a/pandas_ta/momentum/er.py +++ b/pandas_ta/momentum/er.py @@ -79,8 +79,8 @@ Calculation: Args: close (pd.Series): Series of 'close's - length (int): It's period. Default: 1 - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 1 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/eri.py b/pandas_ta/momentum/eri.py index e2c3490..8447058 100644 --- a/pandas_ta/momentum/eri.py +++ b/pandas_ta/momentum/eri.py @@ -73,8 +73,8 @@ Args: high (pd.Series): Series of 'high's low (pd.Series): Series of 'low's close (pd.Series): Series of 'close's - length (int): It's period. Default: 14 - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 14 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/fisher.py b/pandas_ta/momentum/fisher.py index 197577a..7ce4780 100644 --- a/pandas_ta/momentum/fisher.py +++ b/pandas_ta/momentum/fisher.py @@ -102,9 +102,9 @@ Calculation: Args: high (pd.Series): Series of 'high's low (pd.Series): Series of 'low's - length (int): Fisher period. Default: 9 - signal (int): Fisher Signal period. Default: 1 - offset (int): How many periods to offset the result. Default: 0 + length (int): Fisher period. Default: 9 + signal (int): Fisher Signal period. Default: 1 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/inertia.py b/pandas_ta/momentum/inertia.py index 41cb6b9..3b50679 100644 --- a/pandas_ta/momentum/inertia.py +++ b/pandas_ta/momentum/inertia.py @@ -75,10 +75,10 @@ Args: high (pd.Series): Series of 'high's low (pd.Series): Series of 'low's close (pd.Series): Series of 'close's - length (int): It's period. Default: 20 - rvi_length (int): RVI period. Default: 14 - drift (int): The difference period. Default: 1 - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 20 + rvi_length (int): RVI period. Default: 14 + drift (int): The difference period. Default: 1 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/kdj.py b/pandas_ta/momentum/kdj.py index 88175c1..3570c94 100644 --- a/pandas_ta/momentum/kdj.py +++ b/pandas_ta/momentum/kdj.py @@ -86,7 +86,7 @@ Args: close (pd.Series): Series of 'close's length (int): Default: 9 signal (int): Default: 3 - offset (int): How many periods to offset the result. Default: 0 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/kst.py b/pandas_ta/momentum/kst.py index f91c84b..8d90c60 100644 --- a/pandas_ta/momentum/kst.py +++ b/pandas_ta/momentum/kst.py @@ -83,17 +83,17 @@ Calculation: Args: close (pd.Series): Series of 'close's - roc1 (int): ROC 1 period. Default: 10 - roc2 (int): ROC 2 period. Default: 15 - roc3 (int): ROC 3 period. Default: 20 - roc4 (int): ROC 4 period. Default: 30 - sma1 (int): SMA 1 period. Default: 10 - sma2 (int): SMA 2 period. Default: 10 - sma3 (int): SMA 3 period. Default: 10 - sma4 (int): SMA 4 period. Default: 15 - signal (int): It's period. Default: 9 - drift (int): The difference period. Default: 1 - offset (int): How many periods to offset the result. Default: 0 + roc1 (int): ROC 1 period. Default: 10 + roc2 (int): ROC 2 period. Default: 15 + roc3 (int): ROC 3 period. Default: 20 + roc4 (int): ROC 4 period. Default: 30 + sma1 (int): SMA 1 period. Default: 10 + sma2 (int): SMA 2 period. Default: 10 + sma3 (int): SMA 3 period. Default: 10 + sma4 (int): SMA 4 period. Default: 15 + signal (int): It's period. Default: 9 + drift (int): The difference period. Default: 1 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/macd.py b/pandas_ta/momentum/macd.py index d23f49b..fa7dd02 100644 --- a/pandas_ta/momentum/macd.py +++ b/pandas_ta/momentum/macd.py @@ -93,7 +93,7 @@ macd.__doc__ = \ The MACD is a popular indicator to that is used to identify a security's trend. While APO and MACD are the same calculation, MACD also returns two more series -called Signal and Histogram. The Signal is an EMA of MACD and the Histogram is +called Signal and Histogram. The Signal is an EMA of MACD and the Histogram is the difference of MACD and Signal. Sources: @@ -109,10 +109,10 @@ Calculation: Args: close (pd.Series): Series of 'close's - fast (int): The short period. Default: 12 - slow (int): The long period. Default: 26 - signal (int): The signal period. Default: 9 - offset (int): How many periods to offset the result. Default: 0 + fast (int): The short period. Default: 12 + slow (int): The long period. Default: 26 + signal (int): The signal period. Default: 9 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/mom.py b/pandas_ta/momentum/mom.py index ea1f950..a585b91 100644 --- a/pandas_ta/momentum/mom.py +++ b/pandas_ta/momentum/mom.py @@ -45,8 +45,8 @@ Calculation: Args: close (pd.Series): Series of 'close's - length (int): It's period. Default: 1 - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 1 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/pgo.py b/pandas_ta/momentum/pgo.py index 89912fc..7c72e7d 100644 --- a/pandas_ta/momentum/pgo.py +++ b/pandas_ta/momentum/pgo.py @@ -57,8 +57,8 @@ Args: high (pd.Series): Series of 'high's low (pd.Series): Series of 'low's close (pd.Series): Series of 'close's - length (int): It's period. Default: 14 - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 14 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/ppo.py b/pandas_ta/momentum/ppo.py index 829a62a..2a8e354 100644 --- a/pandas_ta/momentum/ppo.py +++ b/pandas_ta/momentum/ppo.py @@ -78,11 +78,11 @@ Calculation: Args: close(pandas.Series): Series of 'close's - fast(int): The short period. Default: 12 - slow(int): The long period. Default: 26 - signal(int): The signal period. Default: 9 - scalar (float): How much to magnify. Default: 100 - offset(int): How many periods to offset the result. Default: 0 + fast(int): The short period. Default: 12 + slow(int): The long period. Default: 26 + signal(int): The signal period. Default: 9 + scalar (float): How much to magnify. Default: 100 + offset(int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/psl.py b/pandas_ta/momentum/psl.py index 68b4468..2ba76d4 100644 --- a/pandas_ta/momentum/psl.py +++ b/pandas_ta/momentum/psl.py @@ -71,10 +71,10 @@ Calculation: Args: close (pd.Series): Series of 'close's open_ (pd.Series, optional): Series of 'open's - length (int): It's period. Default: 12 - scalar (float): How much to magnify. Default: 100 - drift (int): The difference period. Default: 1 - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 12 + scalar (float): How much to magnify. Default: 100 + drift (int): The difference period. Default: 1 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/pvo.py b/pandas_ta/momentum/pvo.py index bd98eeb..a1308da 100644 --- a/pandas_ta/momentum/pvo.py +++ b/pandas_ta/momentum/pvo.py @@ -76,11 +76,11 @@ Calculation: Args: volume (pd.Series): Series of 'volume's - fast (int): The short period. Default: 12 - slow (int): The long period. Default: 26 - signal (int): The signal period. Default: 9 - scalar (float): How much to magnify. Default: 100 - offset (int): How many periods to offset the result. Default: 0 + fast (int): The short period. Default: 12 + slow (int): The long period. Default: 26 + signal (int): The signal period. Default: 9 + scalar (float): How much to magnify. Default: 100 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/qqe.py b/pandas_ta/momentum/qqe.py index a5f2aea..5af1ae1 100644 --- a/pandas_ta/momentum/qqe.py +++ b/pandas_ta/momentum/qqe.py @@ -131,7 +131,6 @@ Sources: https://www.tradingview.com/script/IYfA9R2k-QQE-MT4/ https://www.tradingpedia.com/forex-trading-indicators/quantitative-qualitative-estimation https://www.prorealcode.com/prorealtime-indicators/qqe-quantitative-qualitative-estimation/ - Calculation: Default Inputs: @@ -142,7 +141,8 @@ Args: length (int): RSI period. Default: 14 smooth (int): RSI smoothing period. Default: 5 factor (float): QQE Factor. Default: 4.236 - mamode (str): Smoothing MA type: "ema", "hma", "rma", "sma" or "wma". Default: "ema" + mamode (str): Smoothing MA type: "ema", "hma", "rma", "sma" or "wma". + Default: "ema" drift (int): The difference period. Default: 1 offset (int): How many periods to offset the result. Default: 0 diff --git a/pandas_ta/momentum/roc.py b/pandas_ta/momentum/roc.py index 9fff0fc..67a9488 100644 --- a/pandas_ta/momentum/roc.py +++ b/pandas_ta/momentum/roc.py @@ -48,8 +48,8 @@ Calculation: Args: close (pd.Series): Series of 'close's - length (int): It's period. Default: 1 - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 1 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/rvgi.py b/pandas_ta/momentum/rvgi.py index 9816c1f..8b5a194 100644 --- a/pandas_ta/momentum/rvgi.py +++ b/pandas_ta/momentum/rvgi.py @@ -74,9 +74,9 @@ Args: high (pd.Series): Series of 'high's low (pd.Series): Series of 'low's close (pd.Series): Series of 'close's - length (int): It's period. Default: 14 - swma_length (int): It's period. Default: 4 - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 14 + swma_length (int): It's period. Default: 4 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/slope.py b/pandas_ta/momentum/slope.py index 36b6f30..fc90df8 100644 --- a/pandas_ta/momentum/slope.py +++ b/pandas_ta/momentum/slope.py @@ -39,7 +39,8 @@ def slope( close, length=None, as_angle=None, to_degrees=None, vertical=None, of slope.__doc__ = \ """Slope -Returns the slope of a series of length n. Can convert the slope to angle. Default: slope. +Returns the slope of a series of length n. Can convert the slope to angle. +Default: slope. Sources: Algebra I diff --git a/pandas_ta/momentum/squeeze.py b/pandas_ta/momentum/squeeze.py index 4f20773..a51944a 100644 --- a/pandas_ta/momentum/squeeze.py +++ b/pandas_ta/momentum/squeeze.py @@ -203,7 +203,7 @@ Args: mom_length (int): Momentum Period. Default: 12 mom_smooth (int): Smoothing Period of Momentum. Default: 6 mamode (str): Only "ema" or "sma". Default: "sma" - offset (int): How many periods to offset the result. Default: 0 + offset (int): How many periods to offset the result. Default: 0 Kwargs: tr (value, optional): Use True Range for Keltner Channels. Default: True diff --git a/pandas_ta/momentum/stoch.py b/pandas_ta/momentum/stoch.py index b08a84c..cb9a507 100644 --- a/pandas_ta/momentum/stoch.py +++ b/pandas_ta/momentum/stoch.py @@ -88,7 +88,7 @@ Args: k (int): The Fast %K period. Default: 14 d (int): The Slow %K period. Default: 3 smooth_k (int): The Slow %D period. Default: 3 - offset (int): How many periods to offset the result. Default: 0 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/stochrsi.py b/pandas_ta/momentum/stochrsi.py index 6fee6d4..28f2a26 100644 --- a/pandas_ta/momentum/stochrsi.py +++ b/pandas_ta/momentum/stochrsi.py @@ -90,7 +90,7 @@ Args: rsi_length (int): RSI period. Default: 14 k (int): The Fast %K period. Default: 3 d (int): The Slow %K period. Default: 3 - offset (int): How many periods to offset the result. Default: 0 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/trix.py b/pandas_ta/momentum/trix.py index 4745db0..8ae527a 100644 --- a/pandas_ta/momentum/trix.py +++ b/pandas_ta/momentum/trix.py @@ -68,11 +68,11 @@ Calculation: Args: close (pd.Series): Series of 'close's - length (int): It's period. Default: 18 - signal (int): It's period. Default: 9 - scalar (float): How much to magnify. Default: 100 - drift (int): The difference period. Default: 1 - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 18 + signal (int): It's period. Default: 9 + scalar (float): How much to magnify. Default: 100 + drift (int): The difference period. Default: 1 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/tsi.py b/pandas_ta/momentum/tsi.py index 9f997a6..ece4670 100644 --- a/pandas_ta/momentum/tsi.py +++ b/pandas_ta/momentum/tsi.py @@ -73,7 +73,7 @@ Args: slow (int): The long period. Default: 25 scalar (float): How much to magnify. Default: 100 drift (int): The difference period. Default: 1 - offset (int): How many periods to offset the result. Default: 0 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/uo.py b/pandas_ta/momentum/uo.py index 63640e4..878a677 100644 --- a/pandas_ta/momentum/uo.py +++ b/pandas_ta/momentum/uo.py @@ -90,14 +90,14 @@ Args: high (pd.Series): Series of 'high's low (pd.Series): Series of 'low's close (pd.Series): Series of 'close's - fast (int): The Fast %K period. Default: 7 - medium (int): The Slow %K period. Default: 14 - slow (int): The Slow %D period. Default: 28 - fast_w (float): The Fast %K period. Default: 4.0 - medium_w (float): The Slow %K period. Default: 2.0 - slow_w (float): The Slow %D period. Default: 1.0 - drift (int): The difference period. Default: 1 - offset (int): How many periods to offset the result. Default: 0 + fast (int): The Fast %K period. Default: 7 + medium (int): The Slow %K period. Default: 14 + slow (int): The Slow %D period. Default: 28 + fast_w (float): The Fast %K period. Default: 4.0 + medium_w (float): The Slow %K period. Default: 2.0 + slow_w (float): The Slow %D period. Default: 1.0 + drift (int): The difference period. Default: 1 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/momentum/willr.py b/pandas_ta/momentum/willr.py index f524aa6..36a4334 100644 --- a/pandas_ta/momentum/willr.py +++ b/pandas_ta/momentum/willr.py @@ -56,8 +56,8 @@ Args: high (pd.Series): Series of 'high's low (pd.Series): Series of 'low's close (pd.Series): Series of 'close's - length (int): It's period. Default: 14 - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 14 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/overlap/alma.py b/pandas_ta/overlap/alma.py index bdd52d3..6ec5328 100644 --- a/pandas_ta/overlap/alma.py +++ b/pandas_ta/overlap/alma.py @@ -15,7 +15,7 @@ def alma(close, length=None, sigma=None, distribution_offset=None, offset=None, offset = get_offset(offset) # Pre-Calculations - m = (distribution_offset * (length - 1)) + m = distribution_offset * (length - 1) s = length / sigma wtd = list(range(length)) for i in range(0, length): @@ -31,6 +31,7 @@ def alma(close, length=None, sigma=None, distribution_offset=None, offset=None, window_sum = window_sum + wtd[j] * close[i - j] cum_sum = cum_sum + wtd[j] almean = window_sum / cum_sum + if i == length: result.append(npNaN) # additional one bar NaN as pre-roll else: @@ -76,10 +77,9 @@ Args: close (pd.Series): Series of 'close's length (int): It's period, window size. Default: 10 sigma (float): Smoothing value. Default 6.0 - distribution_offset (float): - Value to offset the distribution min 0 (smoother), - max 1 (more responsive). Default 0.85 - offset (int): How many periods to offset the result. Default: 0 + distribution_offset (float): Value to offset the distribution min 0 + (smoother), max 1 (more responsive). Default 0.85 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/overlap/dema.py b/pandas_ta/overlap/dema.py index 03e7ef1..15dd591 100644 --- a/pandas_ta/overlap/dema.py +++ b/pandas_ta/overlap/dema.py @@ -46,8 +46,8 @@ Calculation: Args: close (pd.Series): Series of 'close's - length (int): It's period. Default: 10 - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 10 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/overlap/ema.py b/pandas_ta/overlap/ema.py index e3040a5..c5438ab 100644 --- a/pandas_ta/overlap/ema.py +++ b/pandas_ta/overlap/ema.py @@ -55,8 +55,8 @@ Calculation: Args: close (pd.Series): Series of 'close's - length (int): It's period. Default: 10 - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 10 + offset (int): How many periods to offset the result. Default: 0 Kwargs: adjust (bool, optional): Default: False diff --git a/pandas_ta/overlap/fwma.py b/pandas_ta/overlap/fwma.py index 8859217..724452d 100644 --- a/pandas_ta/overlap/fwma.py +++ b/pandas_ta/overlap/fwma.py @@ -47,9 +47,9 @@ Calculation: Args: close (pd.Series): Series of 'close's - length (int): It's period. Default: 10 - asc (bool): Recent values weigh more. Default: True - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 10 + asc (bool): Recent values weigh more. Default: True + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/overlap/hilo.py b/pandas_ta/overlap/hilo.py index 79016e6..80646c9 100644 --- a/pandas_ta/overlap/hilo.py +++ b/pandas_ta/overlap/hilo.py @@ -113,8 +113,8 @@ Args: close (pd.Series): Series of 'close's high_length (int): It's period. Default: 13 low_length (int): It's period. Default: 21 - mamode (str): Options: 'sma' or 'ema'. Default: 'sma' - offset (int): How many periods to offset the result. Default: 0 + mamode (str): Options: 'sma' or 'ema'. Default: 'sma' + offset (int): How many periods to offset the result. Default: 0 Kwargs: adjust (bool): Default: True diff --git a/pandas_ta/overlap/hma.py b/pandas_ta/overlap/hma.py index 44a41d7..f8fc6ba 100644 --- a/pandas_ta/overlap/hma.py +++ b/pandas_ta/overlap/hma.py @@ -52,8 +52,8 @@ Calculation: Args: close (pd.Series): Series of 'close's - length (int): It's period. Default: 10 - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 10 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/overlap/hwma.py b/pandas_ta/overlap/hwma.py index 142fa60..8107405 100644 --- a/pandas_ta/overlap/hwma.py +++ b/pandas_ta/overlap/hwma.py @@ -7,19 +7,18 @@ def hwma(close, na=None, nb=None, nc=None, offset=None, **kwargs): """Indicator: Holt-Winter Moving Average""" # Validate Arguments close = verify_series(close) - na = float(na) if na and na > 0 else 0.2 - nb = float(nb) if nb and nb > 0 else 0.1 - nc = float(nc) if nc and nc > 0 else 0.1 + na = float(na) if na and na > 0 and na < 1 else 0.2 + nb = float(nb) if nb and nb > 0 and nb < 1 else 0.1 + nc = float(nc) if nc and nc > 0 and nc < 1 else 0.1 offset = get_offset(offset) - # Initialize .. - m = close.size - last_f = close[0] - # last_a, last_v = 0, 0 - last_a = last_v = 0 - result = [] - # Calculate .. + # Calculate Result + last_a = last_v = 0 + last_f = close[0] + + result = [] + m = close.size for i in range(m): F = (1.0 - na) * (last_f + last_v + 0.5 * last_a) + na * close[i] V = (1.0 - nb) * (last_v + last_a) + nb * (F - last_f) @@ -70,9 +69,10 @@ Calculation: A[i] = (1-nc) * A[i-1] + nc * (V[i] - V[i-1]) Args: - na - parameter of the equation that describes a smoothed series (from 0 to 1) - nb - parameter of the equation to assess the trend (from 0 to 1) - nc - parameter of the equation to assess seasonality (from 0 to 1) + close (pd.Series): Series of 'close's + na (float): Smoothed series parameter (from 0 to 1). Default: 0.2 + nb (float): Trend parameter (from 0 to 1). Default: 0.1 + nc (float): Seasonality parameter (from 0 to 1). Default: 0.1 close (pd.Series): Series of 'close's Kwargs: diff --git a/pandas_ta/overlap/ichimoku.py b/pandas_ta/overlap/ichimoku.py index 537b536..65ced9f 100644 --- a/pandas_ta/overlap/ichimoku.py +++ b/pandas_ta/overlap/ichimoku.py @@ -115,10 +115,10 @@ Args: high (pd.Series): Series of 'high's low (pd.Series): Series of 'low's close (pd.Series): Series of 'close's - tenkan (int): Tenkan period. Default: 9 - kijun (int): Kijun period. Default: 26 - senkou (int): Senkou period. Default: 52 - offset (int): How many periods to offset the result. Default: 0 + tenkan (int): Tenkan period. Default: 9 + kijun (int): Kijun period. Default: 26 + senkou (int): Senkou period. Default: 52 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/overlap/kama.py b/pandas_ta/overlap/kama.py index 8b7de58..641e40b 100644 --- a/pandas_ta/overlap/kama.py +++ b/pandas_ta/overlap/kama.py @@ -66,11 +66,11 @@ Calculation: Args: close (pd.Series): Series of 'close's - length (int): It's period. Default: 10 - fast (int): Fast MA period. Default: 2 - slow (int): Slow MA period. Default: 30 - drift (int): The difference period. Default: 1 - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 10 + fast (int): Fast MA period. Default: 2 + slow (int): Slow MA period. Default: 30 + drift (int): The difference period. Default: 1 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/overlap/linreg.py b/pandas_ta/overlap/linreg.py index aa35cb9..9010090 100644 --- a/pandas_ta/overlap/linreg.py +++ b/pandas_ta/overlap/linreg.py @@ -105,12 +105,16 @@ Args: offset (int): How many periods to offset the result. Default: 0 Kwargs: - angle (bool, optional): If True, returns the angle of the slope in radians. Default: False. - degrees (bool, optional): If True, returns the angle of the slope in degrees. Default: False. - intercept (bool, optional): If True, returns the angle of the slope in radians. Default: False. - r (bool, optional): If True, returns it's correlation 'r'. Default: False. + angle (bool, optional): If True, returns the angle of the slope in radians. + Default: False. + degrees (bool, optional): If True, returns the angle of the slope in + degrees. Default: False. + intercept (bool, optional): If True, returns the angle of the slope in + radians. Default: False. + r (bool, optional): If True, returns it's correlation 'r'. Default: False. slope (bool, optional): If True, returns the slope. Default: False. - tsf (bool, optional): If True, returns the Time Series Forecast value. Default: False. + tsf (bool, optional): If True, returns the Time Series Forecast value. + Default: False. fillna (value, optional): pd.DataFrame.fillna(value) fill_method (value, optional): Type of fill method diff --git a/pandas_ta/overlap/pwma.py b/pandas_ta/overlap/pwma.py index 61c91a9..63c4296 100644 --- a/pandas_ta/overlap/pwma.py +++ b/pandas_ta/overlap/pwma.py @@ -29,8 +29,8 @@ def pwma(close, length=None, asc=None, offset=None, **kwargs): pwma.__doc__ = \ """Pascal's Weighted Moving Average (PWMA) -Pascal's Weighted Moving Average is similar to a symmetric triangular -window except PWMA's weights are based on Pascal's Triangle. +Pascal's Weighted Moving Average is similar to a symmetric triangular window +except PWMA's weights are based on Pascal's Triangle. Source: Kevin Johnson @@ -49,8 +49,8 @@ Calculation: Args: close (pd.Series): Series of 'close's length (int): It's period. Default: 10 - asc (bool): Recent values weigh more. Default: True - offset (int): How many periods to offset the result. Default: 0 + asc (bool): Recent values weigh more. Default: True + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/overlap/rma.py b/pandas_ta/overlap/rma.py index cc122e0..6dacbe9 100644 --- a/pandas_ta/overlap/rma.py +++ b/pandas_ta/overlap/rma.py @@ -27,7 +27,8 @@ def rma(close, length=None, offset=None, **kwargs): rma.__doc__ = \ """wildeR's Moving Average (RMA) -The WildeR's Moving Average is simply an Exponential Moving Average (EMA) with a modified alpha = 1 / length. +The WildeR's Moving Average is simply an Exponential Moving Average (EMA) with +a modified alpha = 1 / length. Sources: https://tlc.thinkorswim.com/center/reference/Tech-Indicators/studies-library/V-Z/WildersSmoothing @@ -42,8 +43,8 @@ Calculation: Args: close (pd.Series): Series of 'close's - length (int): It's period. Default: 10 - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 10 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/overlap/sinwma.py b/pandas_ta/overlap/sinwma.py index 37f1c98..90f06dd 100644 --- a/pandas_ta/overlap/sinwma.py +++ b/pandas_ta/overlap/sinwma.py @@ -32,8 +32,8 @@ def sinwma(close, length=None, offset=None, **kwargs): sinwma.__doc__ = \ """Sine Weighted Moving Average (SWMA) -A weighted average using sine cycles. The middle term(s) of the average have the highest -weight(s). +A weighted average using sine cycles. The middle term(s) of the average have the +highest weight(s). Source: https://www.tradingview.com/script/6MWFvnPO-Sine-Weighted-Moving-Average/ @@ -54,8 +54,8 @@ Calculation: Args: close (pd.Series): Series of 'close's - length (int): It's period. Default: 10 - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 10 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/overlap/sma.py b/pandas_ta/overlap/sma.py index b196f7e..1a87440 100644 --- a/pandas_ta/overlap/sma.py +++ b/pandas_ta/overlap/sma.py @@ -46,8 +46,8 @@ Calculation: Args: close (pd.Series): Series of 'close's - length (int): It's period. Default: 10 - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 10 + offset (int): How many periods to offset the result. Default: 0 Kwargs: adjust (bool): Default: True diff --git a/pandas_ta/overlap/supertrend.py b/pandas_ta/overlap/supertrend.py index d53653d..64a39d7 100644 --- a/pandas_ta/overlap/supertrend.py +++ b/pandas_ta/overlap/supertrend.py @@ -109,8 +109,9 @@ Args: low (pd.Series): Series of 'low's close (pd.Series): Series of 'close's length (int) : length for ATR calculation. Default: 7 - multiplier (float): Coefficient for upper and lower band distance to midrange. Default: 3.0 - offset (int): How many periods to offset the result. Default: 0 + multiplier (float): Coefficient for upper and lower band distance to + midrange. Default: 3.0 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/overlap/swma.py b/pandas_ta/overlap/swma.py index 4570064..2f59846 100644 --- a/pandas_ta/overlap/swma.py +++ b/pandas_ta/overlap/swma.py @@ -31,8 +31,9 @@ swma.__doc__ = \ """Symmetric Weighted Moving Average (SWMA) Symmetric Weighted Moving Average where weights are based on a symmetric -triangle. For example: n=3 -> [1, 2, 1], n=4 -> [1, 2, 2, 1], etc... This moving -average has variable length in contrast to TradingView's fixed length of 4. +triangle. For example: n=3 -> [1, 2, 1], n=4 -> [1, 2, 2, 1], etc... +This moving average has variable length in contrast to TradingView's fixed +length of 4. Source: https://www.tradingview.com/study-script-reference/#fun_swma @@ -51,9 +52,9 @@ Calculation: Args: close (pd.Series): Series of 'close's - length (int): It's period. Default: 10 - asc (bool): Recent values weigh more. Default: True - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 10 + asc (bool): Recent values weigh more. Default: True + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/overlap/t3.py b/pandas_ta/overlap/t3.py index 386abc2..ce40c1e 100644 --- a/pandas_ta/overlap/t3.py +++ b/pandas_ta/overlap/t3.py @@ -62,9 +62,9 @@ Calculation: Args: close (pd.Series): Series of 'close's - length (int): It's period. Default: 10 - a (float): 0 < a < 1. Default: 0.7 - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 10 + a (float): 0 < a < 1. Default: 0.7 + offset (int): How many periods to offset the result. Default: 0 Kwargs: adjust (bool): Default: True diff --git a/pandas_ta/overlap/tema.py b/pandas_ta/overlap/tema.py index cfd3e10..41c392f 100644 --- a/pandas_ta/overlap/tema.py +++ b/pandas_ta/overlap/tema.py @@ -46,8 +46,8 @@ Calculation: Args: close (pd.Series): Series of 'close's - length (int): It's period. Default: 10 - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 10 + offset (int): How many periods to offset the result. Default: 0 Kwargs: adjust (bool): Default: True diff --git a/pandas_ta/overlap/trima.py b/pandas_ta/overlap/trima.py index 0a06dc0..bac59f9 100644 --- a/pandas_ta/overlap/trima.py +++ b/pandas_ta/overlap/trima.py @@ -47,8 +47,8 @@ Calculation: Args: close (pd.Series): Series of 'close's - length (int): It's period. Default: 10 - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 10 + offset (int): How many periods to offset the result. Default: 0 Kwargs: adjust (bool): Default: True diff --git a/pandas_ta/overlap/vwma.py b/pandas_ta/overlap/vwma.py index 78b376e..a3ea052 100644 --- a/pandas_ta/overlap/vwma.py +++ b/pandas_ta/overlap/vwma.py @@ -44,8 +44,8 @@ Calculation: Args: close (pd.Series): Series of 'close's volume (pd.Series): Series of 'volume's - length (int): It's period. Default: 10 - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 10 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/overlap/wcp.py b/pandas_ta/overlap/wcp.py index 4bf71e8..90b13c9 100644 --- a/pandas_ta/overlap/wcp.py +++ b/pandas_ta/overlap/wcp.py @@ -40,7 +40,7 @@ Args: high (pd.Series): Series of 'high's low (pd.Series): Series of 'low's close (pd.Series): Series of 'close's - offset (int): How many periods to offset the result. Default: 0 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/overlap/wma.py b/pandas_ta/overlap/wma.py index 9c554ba..fd67093 100644 --- a/pandas_ta/overlap/wma.py +++ b/pandas_ta/overlap/wma.py @@ -62,9 +62,9 @@ Calculation: Args: close (pd.Series): Series of 'close's - length (int): It's period. Default: 10 - asc (bool): Recent values weigh more. Default: True - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 10 + asc (bool): Recent values weigh more. Default: True + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/overlap/zlma.py b/pandas_ta/overlap/zlma.py index 11e6eb1..f5344b3 100644 --- a/pandas_ta/overlap/zlma.py +++ b/pandas_ta/overlap/zlma.py @@ -60,9 +60,9 @@ Calculation: Args: close (pd.Series): Series of 'close's - length (int): It's period. Default: 10 - mamode (str): Options: 'ema', 'hma', 'sma', 'wma'. Default: 'ema' - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 10 + mamode (str): Options: 'ema', 'hma', 'sma', 'wma'. Default: 'ema' + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/performance/log_return.py b/pandas_ta/performance/log_return.py index f716a63..6bac6a9 100644 --- a/pandas_ta/performance/log_return.py +++ b/pandas_ta/performance/log_return.py @@ -50,9 +50,9 @@ Calculation: Args: close (pd.Series): Series of 'close's - length (int): It's period. Default: 20 - cumulative (bool): If True, returns the cumulative returns. Default: False - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 20 + cumulative (bool): If True, returns the cumulative returns. Default: False + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/performance/percent_return.py b/pandas_ta/performance/percent_return.py index 2c97083..d3a0384 100644 --- a/pandas_ta/performance/percent_return.py +++ b/pandas_ta/performance/percent_return.py @@ -43,9 +43,9 @@ Calculation: Args: close (pd.Series): Series of 'close's - length (int): It's period. Default: 20 - cumulative (bool): If True, returns the cumulative returns. Default: False - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 20 + cumulative (bool): If True, returns the cumulative returns. Default: False + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/statistics/median.py b/pandas_ta/statistics/median.py index 023dbcb..82bb57e 100644 --- a/pandas_ta/statistics/median.py +++ b/pandas_ta/statistics/median.py @@ -27,7 +27,7 @@ def median(close, length=None, offset=None, **kwargs): median.__doc__ = \ """Rolling Median -Rolling Median of over 'n' periods. Sibling of a Simple Moving Average. +Rolling Median of over 'n' periods. Sibling of a Simple Moving Average. Sources: https://www.incrediblecharts.com/indicators/median_price.php diff --git a/pandas_ta/trend/chop.py b/pandas_ta/trend/chop.py index e593030..106c62c 100644 --- a/pandas_ta/trend/chop.py +++ b/pandas_ta/trend/chop.py @@ -71,11 +71,11 @@ Args: high (pd.Series): Series of 'high's low (pd.Series): Series of 'low's close (pd.Series): Series of 'close's - length (int): It's period. Default: 14 - atr_length (int): Length for ATR. Default: 1 - scalar (float): How much to magnify. Default: 100 - drift (int): The difference period. Default: 1 - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 14 + atr_length (int): Length for ATR. Default: 1 + scalar (float): How much to magnify. Default: 100 + drift (int): The difference period. Default: 1 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/trend/cksp.py b/pandas_ta/trend/cksp.py index aa4fe55..019db28 100644 --- a/pandas_ta/trend/cksp.py +++ b/pandas_ta/trend/cksp.py @@ -75,10 +75,10 @@ Calculation: Args: close (pd.Series): Series of 'close's - p (int): ATR and first stop period. Default: 10 - x (float): ATR scalar. Default: 1 - q (int): Second stop period. Default: 9 - offset (int): How many periods to offset the result. Default: 0 + p (int): ATR and first stop period. Default: 10 + x (float): ATR scalar. Default: 1 + q (int): Second stop period. Default: 9 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/trend/decreasing.py b/pandas_ta/trend/decreasing.py index 695ac2f..8815b68 100644 --- a/pandas_ta/trend/decreasing.py +++ b/pandas_ta/trend/decreasing.py @@ -46,7 +46,10 @@ def decreasing(close, length=None, strict=None, asint=None, offset=None, **kwarg decreasing.__doc__ = \ """Decreasing -Returns True if the series is decreasing over a period, False otherwise. If the kwarg 'strict' is True, it returns True if it is continuously decreasing over the period. When using the kwarg 'asint', then it returns 1 for True or 0 for False. +Returns True if the series is decreasing over a period, False otherwise. +If the kwarg 'strict' is True, it returns True if it is continuously decreasing +over the period. When using the kwarg 'asint', then it returns 1 for True +or 0 for False. Calculation: if strict: diff --git a/pandas_ta/trend/dpo.py b/pandas_ta/trend/dpo.py index 2dccb45..aed3dfb 100644 --- a/pandas_ta/trend/dpo.py +++ b/pandas_ta/trend/dpo.py @@ -58,9 +58,9 @@ Calculation: Args: close (pd.Series): Series of 'close's - length (int): It's period. Default: 1 - centered (bool): Shift the dpo back by int(0.5 * length) + 1. Default: True - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 1 + centered (bool): Shift the dpo back by int(0.5 * length) + 1. Default: True + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/trend/increasing.py b/pandas_ta/trend/increasing.py index 73120a6..351c360 100644 --- a/pandas_ta/trend/increasing.py +++ b/pandas_ta/trend/increasing.py @@ -46,7 +46,10 @@ def increasing(close, length=None, strict=None, asint=None, offset=None, **kwarg increasing.__doc__ = \ """Increasing -Returns True if the series is increasing over a period, False otherwise. If the kwarg 'strict' is True, it returns True if it is continuously increasing over the period. When using the kwarg 'asint', then it returns 1 for True or 0 for False. +Returns True if the series is increasing over a period, False otherwise. +If the kwarg 'strict' is True, it returns True if it is continuously increasing +over the period. When using the kwarg 'asint', then it returns 1 for True +or 0 for False. Calculation: if strict: diff --git a/pandas_ta/trend/psar.py b/pandas_ta/trend/psar.py index 542c81b..d4a07b0 100644 --- a/pandas_ta/trend/psar.py +++ b/pandas_ta/trend/psar.py @@ -128,9 +128,9 @@ Args: high (pd.Series): Series of 'high's low (pd.Series): Series of 'low's close (pd.Series, optional): Series of 'close's. Optional - af (float): Acceleration Factor. Default: 0.02 - max_af (float): Maximum Acceleration Factor. Default: 0.2 - offset (int): How many periods to offset the result. Default: 0 + af (float): Acceleration Factor. Default: 0.02 + max_af (float): Maximum Acceleration Factor. Default: 0.2 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/trend/qstick.py b/pandas_ta/trend/qstick.py index 1d850c6..912f3ff 100644 --- a/pandas_ta/trend/qstick.py +++ b/pandas_ta/trend/qstick.py @@ -46,8 +46,8 @@ def qstick(open_, close, length=None, offset=None, **kwargs): qstick.__doc__ = \ """Q Stick -The Q Stick indicator, developed by Tushar Chande, attempts to quantify and identify -trends in candlestick charts. +The Q Stick indicator, developed by Tushar Chande, attempts to quantify and +identify trends in candlestick charts. Sources: https://library.tradingtechnologies.com/trade/chrt-ti-qstick.html @@ -61,9 +61,9 @@ Calculation: Args: open (pd.Series): Series of 'open's close (pd.Series): Series of 'close's - length (int): It's period. Default: 1 - ma (str): The type of moving average to use. Default: None, which is 'sma' - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 1 + ma (str): The type of moving average to use. Default: None, which is 'sma' + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/trend/ttm_trend.py b/pandas_ta/trend/ttm_trend.py index 3d5aec1..1d028e1 100644 --- a/pandas_ta/trend/ttm_trend.py +++ b/pandas_ta/trend/ttm_trend.py @@ -72,8 +72,8 @@ Args: high (pd.Series): Series of 'high's low (pd.Series): Series of 'low's close (pd.Series): Series of 'close's - length (int): It's period. Default: 6 - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 6 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) fill_method (value, optional): Type of fill method diff --git a/pandas_ta/trend/vortex.py b/pandas_ta/trend/vortex.py index 38a147e..44fcb28 100644 --- a/pandas_ta/trend/vortex.py +++ b/pandas_ta/trend/vortex.py @@ -78,9 +78,9 @@ Args: high (pd.Series): Series of 'high's low (pd.Series): Series of 'low's close (pd.Series): Series of 'close's - length (int): ROC 1 period. Default: 14 - drift (int): The difference period. Default: 1 - offset (int): How many periods to offset the result. Default: 0 + length (int): ROC 1 period. Default: 14 + drift (int): The difference period. Default: 1 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/volatility/aberration.py b/pandas_ta/volatility/aberration.py index 5a3e4e7..7a96a7e 100644 --- a/pandas_ta/volatility/aberration.py +++ b/pandas_ta/volatility/aberration.py @@ -86,9 +86,9 @@ Args: high (pd.Series): Series of 'high's low (pd.Series): Series of 'low's close (pd.Series): Series of 'close's - length (int): The short period. Default: 5 - atr_length (int): The short period. Default: 15 - offset (int): How many periods to offset the result. Default: 0 + length (int): The short period. Default: 5 + atr_length (int): The short period. Default: 15 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/volatility/accbands.py b/pandas_ta/volatility/accbands.py index 4c38aa4..639a4ac 100644 --- a/pandas_ta/volatility/accbands.py +++ b/pandas_ta/volatility/accbands.py @@ -89,11 +89,11 @@ Args: high (pd.Series): Series of 'high's low (pd.Series): Series of 'low's close (pd.Series): Series of 'close's - length (int): It's period. Default: 10 - c (int): Multiplier. Default: 4 - mamode (str): Two options: None or 'ema'. Default: 'ema' - drift (int): The difference period. Default: 1 - offset (int): How many periods to offset the result. Default: 0 + length (int): It's period. Default: 10 + c (int): Multiplier. Default: 4 + mamode (str): Two options: None or 'ema'. Default: 'ema' + drift (int): The difference period. Default: 1 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/volatility/atr.py b/pandas_ta/volatility/atr.py index 336ae5a..70fb46e 100644 --- a/pandas_ta/volatility/atr.py +++ b/pandas_ta/volatility/atr.py @@ -43,8 +43,8 @@ def atr(high, low, close, length=None, mamode=None, drift=None, offset=None, **k atr.__doc__ = \ """Average True Range (ATR) -Averge True Range is used to measure volatility, especially -volatility caused by gaps or limit moves. +Averge True Range is used to measure volatility, especially volatility caused by +gaps or limit moves. Sources: https://www.tradingview.com/wiki/Average_True_Range_(ATR) diff --git a/pandas_ta/volatility/hwc.py b/pandas_ta/volatility/hwc.py index e21b6c4..fe2e02e 100644 --- a/pandas_ta/volatility/hwc.py +++ b/pandas_ta/volatility/hwc.py @@ -31,7 +31,6 @@ def hwc(close, na=None, nb=None, nc=None, nd=None, scalar=None, channel_eval=Non chan_width = [] chan_pct_width = [] - print(channel_eval) # Calculate .. for i in range(m): F = (1.0 - na) * (last_f + last_v + 0.5 * last_a) + na * close[i] @@ -125,10 +124,12 @@ def hwc(close, na=None, nb=None, nc=None, nd=None, scalar=None, channel_eval=Non hwc.__doc__ = \ """HWC (Holt-Winter Channel) -Channel indicator HWC (Holt-Winters Channel) based on HWMA - a three-parameter moving average -calculated by the method of Holt-Winters. -This version has been implemented for Pandas TA by rengel8 based on a publication for MetaTrader 5 -extended by width and percentage price position against width of channel. +Channel indicator HWC (Holt-Winters Channel) based on HWMA - a three-parameter +moving average calculated by the method of Holt-Winters. + +This version has been implemented for Pandas TA by rengel8 based on a +publication for MetaTrader 5 extended by width and percentage price position +against width of channel. Sources: https://www.mql5.com/en/code/20857 @@ -139,7 +140,7 @@ Calculation: F[i] = (1-na) * (F[i-1] + V[i-1] + 0.5 * A[i-1]) + na * Price[i] V[i] = (1-nb) * (V[i-1] + A[i-1]) + nb * (F[i] - F[i-1]) A[i] = (1-nc) * A[i-1] + nc * (V[i] - V[i-1]) - + Top = HWMA + Multiplier * StDt Bottom = HWMA - Multiplier * StDt where.. @@ -152,7 +153,7 @@ Args: nc - parameter of the equation to assess seasonality (from 0 to 1) nd - parameter of the channel equation (from 0 to 1) scaler - multiplier for the width of the channel calculated - channel_eval - boolean to return width and percentage price position against price + channel_eval - boolean to return width and percentage price position against price close (pd.Series): Series of 'close's Kwargs: diff --git a/pandas_ta/volatility/massi.py b/pandas_ta/volatility/massi.py index 053be85..8259ea5 100644 --- a/pandas_ta/volatility/massi.py +++ b/pandas_ta/volatility/massi.py @@ -63,9 +63,9 @@ Calculation: Args: high (pd.Series): Series of 'high's low (pd.Series): Series of 'low's - fast (int): The short period. Default: 9 - slow (int): The long period. Default: 25 - offset (int): How many periods to offset the result. Default: 0 + fast (int): The short period. Default: 9 + slow (int): The long period. Default: 25 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/volatility/natr.py b/pandas_ta/volatility/natr.py index a5eca55..d663bdf 100644 --- a/pandas_ta/volatility/natr.py +++ b/pandas_ta/volatility/natr.py @@ -39,8 +39,7 @@ def natr(high, low, close, length=None, mamode=None, scalar=None, drift=None, of natr.__doc__ = \ """Normalized Average True Range (NATR) -Normalized Average True Range attempt to normalize the average -true range. +Normalized Average True Range attempt to normalize the average true range. Sources: https://www.tradingtechnologies.com/help/x-study/technical-indicator-definitions/normalized-average-true-range-natr/ @@ -55,9 +54,9 @@ Args: high (pd.Series): Series of 'high's low (pd.Series): Series of 'low's close (pd.Series): Series of 'close's - length (int): The short period. Default: 20 - scalar (float): How much to magnify. Default: 100 - offset (int): How many periods to offset the result. Default: 0 + length (int): The short period. Default: 20 + scalar (float): How much to magnify. Default: 100 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/volatility/pdist.py b/pandas_ta/volatility/pdist.py index 3f3422b..1a75439 100644 --- a/pandas_ta/volatility/pdist.py +++ b/pandas_ta/volatility/pdist.py @@ -47,8 +47,8 @@ Args: high (pd.Series): Series of 'high's low (pd.Series): Series of 'low's close (pd.Series): Series of 'close's - drift (int): The difference period. Default: 1 - offset (int): How many periods to offset the result. Default: 0 + drift (int): The difference period. Default: 1 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/volatility/rvi.py b/pandas_ta/volatility/rvi.py index bdeed7d..7bc28d2 100644 --- a/pandas_ta/volatility/rvi.py +++ b/pandas_ta/volatility/rvi.py @@ -72,10 +72,9 @@ def rvi(close, high=None, low=None, length=None, scalar=None, refined=None, thir rvi.__doc__ = \ """Relative Volatility Index (RVI) -The Relative Volatility Index (RVI) was created in 1993 and -revised in 1995. Instead of adding up price changes like RSI -based on price direction, the RVI adds up standard deviations -based on price direction. +The Relative Volatility Index (RVI) was created in 1993 and revised in 1995. +Instead of adding up price changes like RSI based on price direction, the RVI +adds up standard deviations based on price direction. Sources: https://www.tradingview.com/wiki/Keltner_Channels_(KC) @@ -99,12 +98,12 @@ Args: low (pd.Series): Series of 'low's close (pd.Series): Series of 'close's length (int): The short period. Default: 14 - scalar (float): A positive float to scale the bands. Default: 100 + scalar (float): A positive float to scale the bands. Default: 100 mamode (str): Options: 'sma' or 'ema'. Default: 'sma' refined (bool): Use 'refined' calculation which is the average of RVI(high) and RVI(low) instead of RVI(close). Default: False thirds (bool): Average of high, low and close. Default: False - offset (int): How many periods to offset the result. Default: 0 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/volatility/thermo.py b/pandas_ta/volatility/thermo.py index c4221a2..471a275 100644 --- a/pandas_ta/volatility/thermo.py +++ b/pandas_ta/volatility/thermo.py @@ -34,7 +34,7 @@ def thermo(high, low, length=None, long=None, short=None, mamode=None, drift=Non # Binary output, useful for signals if asint: - thermo_long = thermo_long.astype(int) + thermo_long = thermo_long.astype(int) thermo_short = thermo_short.astype(int) # Offset @@ -66,7 +66,12 @@ def thermo(high, low, length=None, long=None, short=None, mamode=None, drift=Non thermo.category = thermo_ma.category = thermo_long.category = thermo_short.category = "volatility" # Prepare Dataframe to return - data = {thermo.name: thermo, thermo_ma.name: thermo_ma, thermo_long.name: thermo_long, thermo_short.name: thermo_short} + data = { + thermo.name: thermo, + thermo_ma.name: thermo_ma, + thermo_long.name: thermo_long, + thermo_short.name: thermo_short + } df = DataFrame(data) df.name = f"THERMO{_props}" df.category = thermo.category diff --git a/pandas_ta/volatility/true_range.py b/pandas_ta/volatility/true_range.py index 9567fd4..2571aa1 100644 --- a/pandas_ta/volatility/true_range.py +++ b/pandas_ta/volatility/true_range.py @@ -56,8 +56,8 @@ Args: high (pd.Series): Series of 'high's low (pd.Series): Series of 'low's close (pd.Series): Series of 'close's - drift (int): The shift period. Default: 1 - offset (int): How many periods to offset the result. Default: 0 + drift (int): The shift period. Default: 1 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/volume/ad.py b/pandas_ta/volume/ad.py index 584271f..23a9d68 100644 --- a/pandas_ta/volume/ad.py +++ b/pandas_ta/volume/ad.py @@ -65,7 +65,7 @@ Args: close (pd.Series): Series of 'close's volume (pd.Series): Series of 'volume's open (pd.Series): Series of 'open's - offset (int): How many periods to offset the result. Default: 0 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/volume/adosc.py b/pandas_ta/volume/adosc.py index 3553a24..414b0fe 100644 --- a/pandas_ta/volume/adosc.py +++ b/pandas_ta/volume/adosc.py @@ -63,9 +63,9 @@ Args: close (pd.Series): Series of 'close's open (pd.Series): Series of 'open's volume (pd.Series): Series of 'volume's - fast (int): The short period. Default: 12 - slow (int): The long period. Default: 26 - offset (int): How many periods to offset the result. Default: 0 + fast (int): The short period. Default: 12 + slow (int): The long period. Default: 26 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/volume/cmf.py b/pandas_ta/volume/cmf.py index d5c1b08..93da569 100644 --- a/pandas_ta/volume/cmf.py +++ b/pandas_ta/volume/cmf.py @@ -70,8 +70,8 @@ Args: close (pd.Series): Series of 'close's volume (pd.Series): Series of 'volume's open_ (pd.Series): Series of 'open's. Default: None - length (int): The short period. Default: 20 - offset (int): How many periods to offset the result. Default: 0 + length (int): The short period. Default: 20 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/volume/efi.py b/pandas_ta/volume/efi.py index fcc3f92..a7761ea 100644 --- a/pandas_ta/volume/efi.py +++ b/pandas_ta/volume/efi.py @@ -59,10 +59,10 @@ Calculation: Args: close (pd.Series): Series of 'close's volume (pd.Series): Series of 'volume's - length (int): The short period. Default: 13 - drift (int): The diff period. Default: 1 - mamode (str): Two options: None or "sma". Default: None - offset (int): How many periods to offset the result. Default: 0 + length (int): The short period. Default: 13 + drift (int): The diff period. Default: 1 + mamode (str): Two options: None or "sma". Default: None + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/volume/eom.py b/pandas_ta/volume/eom.py index c32cb59..cc69d2e 100644 --- a/pandas_ta/volume/eom.py +++ b/pandas_ta/volume/eom.py @@ -67,9 +67,9 @@ Args: low (pd.Series): Series of 'low's close (pd.Series): Series of 'close's volume (pd.Series): Series of 'volume's - length (int): The short period. Default: 14 - drift (int): The diff period. Default: 1 - offset (int): How many periods to offset the result. Default: 0 + length (int): The short period. Default: 14 + drift (int): The diff period. Default: 1 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/volume/mfi.py b/pandas_ta/volume/mfi.py index e803e2d..77046a4 100644 --- a/pandas_ta/volume/mfi.py +++ b/pandas_ta/volume/mfi.py @@ -76,9 +76,9 @@ Args: low (pd.Series): Series of 'low's close (pd.Series): Series of 'close's volume (pd.Series): Series of 'volume's - length (int): The sum period. Default: 14 - drift (int): The difference period. Default: 1 - offset (int): How many periods to offset the result. Default: 0 + length (int): The sum period. Default: 14 + drift (int): The difference period. Default: 1 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/volume/nvi.py b/pandas_ta/volume/nvi.py index 90723b6..120a0a1 100644 --- a/pandas_ta/volume/nvi.py +++ b/pandas_ta/volume/nvi.py @@ -63,9 +63,9 @@ Calculation: Args: close (pd.Series): Series of 'close's volume (pd.Series): Series of 'volume's - length (int): The short period. Default: 13 - initial (int): The short period. Default: 1000 - offset (int): How many periods to offset the result. Default: 0 + length (int): The short period. Default: 13 + initial (int): The short period. Default: 1000 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/volume/obv.py b/pandas_ta/volume/obv.py index bd185e8..81b332c 100644 --- a/pandas_ta/volume/obv.py +++ b/pandas_ta/volume/obv.py @@ -48,7 +48,7 @@ Calculation: Args: close (pd.Series): Series of 'close's volume (pd.Series): Series of 'volume's - offset (int): How many periods to offset the result. Default: 0 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/volume/pvi.py b/pandas_ta/volume/pvi.py index 16475a7..9df4040 100644 --- a/pandas_ta/volume/pvi.py +++ b/pandas_ta/volume/pvi.py @@ -42,7 +42,8 @@ pvi.__doc__ = \ """Positive Volume Index (PVI) The Positive Volume Index is a cumulative indicator that uses volume change in -an attempt to identify where smart money is active. Used in conjunction with NVI. +an attempt to identify where smart money is active. +Used in conjunction with NVI. Sources: https://www.investopedia.com/terms/p/pvi.asp @@ -62,9 +63,9 @@ Calculation: Args: close (pd.Series): Series of 'close's volume (pd.Series): Series of 'volume's - length (int): The short period. Default: 13 - initial (int): The short period. Default: 1000 - offset (int): How many periods to offset the result. Default: 0 + length (int): The short period. Default: 13 + initial (int): The short period. Default: 1000 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/volume/pvol.py b/pandas_ta/volume/pvol.py index 485d1e5..8168943 100644 --- a/pandas_ta/volume/pvol.py +++ b/pandas_ta/volume/pvol.py @@ -47,8 +47,8 @@ Calculation: Args: close (pd.Series): Series of 'close's volume (pd.Series): Series of 'volume's - signed (bool): Keeps the sign of the difference in 'close's. Default: True - offset (int): How many periods to offset the result. Default: 0 + signed (bool): Keeps the sign of the difference in 'close's. Default: True + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/volume/pvt.py b/pandas_ta/volume/pvt.py index 3990dac..c8650bc 100644 --- a/pandas_ta/volume/pvt.py +++ b/pandas_ta/volume/pvt.py @@ -51,8 +51,8 @@ Calculation: Args: close (pd.Series): Series of 'close's volume (pd.Series): Series of 'volume's - drift (int): The diff period. Default: 1 - offset (int): How many periods to offset the result. Default: 0 + drift (int): The diff period. Default: 1 + offset (int): How many periods to offset the result. Default: 0 Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) diff --git a/pandas_ta/volume/vp.py b/pandas_ta/volume/vp.py index 73ced59..285648c 100644 --- a/pandas_ta/volume/vp.py +++ b/pandas_ta/volume/vp.py @@ -63,7 +63,8 @@ def vp(close, volume, width=None, **kwargs): vp.__doc__ = \ """Volume Profile (VP) -Calculates the Volume Profile by slicing price into ranges. Note: Value Area is not calculated. +Calculates the Volume Profile by slicing price into ranges. +Note: Value Area is not calculated. Sources: https://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:volume_by_price @@ -89,7 +90,8 @@ Args: Kwargs: fillna (value, optional): pd.DataFrame.fillna(value) fill_method (value, optional): Type of fill method - sort_close (value, optional): Whether to sort by close before splitting into ranges. Default: False + sort_close (value, optional): Whether to sort by close before splitting + into ranges. Default: False Returns: pd.DataFrame: New feature generated. diff --git a/setup.py b/setup.py index 53c8f6e..41eaa17 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ setup( "pandas_ta.volatility", "pandas_ta.volume" ], - version=".".join(("0", "2", "44b")), + version=".".join(("0", "2", "45b")), description=long_description, long_description=long_description, author="Kevin Johnson", diff --git a/tests/test_strategy.py b/tests/test_strategy.py index 9102ac5..a654be3 100644 --- a/tests/test_strategy.py +++ b/tests/test_strategy.py @@ -89,7 +89,6 @@ class TestStrategyMethods(TestCase): def test_cycles_category(self): self.category = "Cycles" self.data.ta.strategy(self.category, verbose=verbose, timed=strategy_timed) - print(f"\n{self.data}") # @skip def test_custom_a(self):