def analyze_rsi(self, market_pair, period_count=1000, time_unit='1h'): rsi_analyzer = RelativeStrengthIndex() historical_data = self.exchange_interface.get_historical_data( market_pair=market_pair, period_count=period_count, time_unit=time_unit) rsi_value = rsi_analyzer.find_rsi(historical_data, period_count) return rsi_value
def analyze_rsi(self, coin_pair, period_count=18, time_unit='1h'): rsi_analyzer = RelativeStrengthIndex() historical_data = self.exchange_aggregator.get_historical_data( coin_pair=coin_pair, period_count=period_count, time_unit=time_unit ) rsi_value = rsi_analyzer.find_rsi(historical_data) return rsi_value
def analyze_rsi(self, market_pair, exchange, hot_thresh=0, cold_thresh=0): rsi_analyzer = RelativeStrengthIndex() period_count = 14 historical_data = self.day_historical_data[0:period_count] rsi_value = rsi_analyzer.get_rsi_value(historical_data, period_count) is_overbought = rsi_value >= cold_thresh is_oversold = rsi_value <= hot_thresh rsi_data = { 'values': (rsi_value,), 'is_cold': is_overbought, 'is_hot': is_oversold } return rsi_data
def analyze_rsi(self, market_pair, exchange): rsi_analyzer = RelativeStrengthIndex() historical_data = self.__exchange_interface.get_historical_data( market_pair=market_pair, exchange=exchange, period_count=self.rsi_config['period_count'], time_unit=self.rsi_config['time_unit']) rsi_value = rsi_analyzer.get_rsi_value(historical_data, self.rsi_config['period_count']) is_overbought = rsi_value >= self.rsi_config['overbought'] is_oversold = rsi_value <= self.rsi_config['oversold'] rsi_data = { 'value': rsi_value, 'is_overbought': is_overbought, 'is_oversold': is_oversold } return rsi_data