def calculate_adx(self, period_name, close): adx = talib.ADX(self.highs, self.lows, close, timeperiod=14) self.current_indicators[period_name]['adx'] = adx[-1]