def test_apz(): """test TA.APZ""" apz = TA.APZ(ohlc).round(decimals=8) assert isinstance(apz["UPPER"], series.Series) assert isinstance(apz["LOWER"], series.Series) assert apz["UPPER"].values[-1] == 7193.97725794
def test_apz(): """test TA.APZ""" apz = TA.APZ(ohlc) assert isinstance(apz["UPPER"], series.Series) assert isinstance(apz["LOWER"], series.Series) assert apz["UPPER"].values[-1] == 7193.9772579390283
def get_apz(data): if data is None: raise ValueError("Invalid data value") result = TA.APZ(data) if result is None: raise IndicatorException return result
def test_apz(): '''test TA.APZ''' apz = TA.APZ(ohlc) assert isinstance(apz['UPPER'], series.Series) assert isinstance(apz['LOWER'], series.Series) assert apz['UPPER'].values[-1] == 7193.9772579390283
def get_apz(data): """Calculate the adaptive price zone of given dataframe. :param data: a dataframe in OHLC format :return: a concatenated Pandas series """ if data is None: raise EmptyDataError("[!] Invalid data value") result = TA.APZ(data) if result is None: raise IndicatorException return result
def APZ(data, period=21, dev_factor=2, ma_type=None): """ Adaptive Price Zone APZ is as a volatility based indicator developed by Lee Leibfarth that appears as a set of bands placed over a price chart. Especially useful in non-trending, choppy markets, the APZ was created to help traders find potential turning points in the markets. :param pd.DataFrame data: pandas DataFrame with open, high, low, close data :param int period: period used for indicator calculation :param float dev_factor: standard derivation factor :param int ma_type: moving average type (0 simple, 1 exponential) :return pd.Series: with indicator data calculation results """ return TA.APZ(data, period, dev_factor, ma_type)
# Chande momentum oscillator range bounded +/- 100 prices["CMO"] = TA.CMO(ohlc) # Chandelier Exit sets a trailing stop loss based on ATR prices["C_Exit"] = TA.CHANDELIER(ohlc) # Qstick indicator - dominance of candlesticks prices["QSTICK"] = TA.QSTICK(ohlc) # One look equilibrium chart (ICHIMOKU) # indicator for support, resistance, trend direction, momentum and trading signals prices["tenkan_sen"], prices["kijun_sen"], prices["senkou_span_a"], prices["senkou_span_b"], prices["chikou_span"] = TA.ICHIMOKU(ohlc) # Adaptive price zone - help to find turning points in non-trending choppy markets prices["APZ"] = TA.APZ(ohlc) # Vector size indicator prices["VSI"] = TA.VR(ohlc) # Squeeze momentum indicator # Generally the market is in quiet consolidation or vertical price discovery, this helps to identify these calm periods prices["SQZMI"] = TA.SQZMI(ohlc) # Volume price trend prices["VPT"] = TA.VPT(ohlc) # Money flow indicator prices["FVE"] = TA.FVE(ohlc) # Volume based on the direction of price movements