def technical_indicators(candles): indicators = {} open_prices = [candle[1] for candle in candles] high_prices = [candle[2] for candle in candles] low_prices = [candle[3] for candle in candles] close_prices = [candle[4] for candle in candles] indicators.update({'macd': TI.get_MACD(close_prices)}) return (indicators)
def technical_indicators(candles): indicators = {} open_prices = [candle[1] for candle in candles] high_prices = [candle[2] for candle in candles] low_prices = [candle[3] for candle in candles] close_prices = [candle[4] for candle in candles] indicators.update({'MACD':TI.get_MACD(close_prices)}) indicators.update({'MFI':TI.get_MFI(candles)}) indicators.update({'MA_50':TI.get_SMA(close_prices, 50)}) return(indicators)
def technical_indicators(candles): indicators = {} time_values = [candle[0] for candle in candles] open_prices = [candle[1] for candle in candles] high_prices = [candle[2] for candle in candles] low_prices = [candle[3] for candle in candles] close_prices = [candle[4] for candle in candles] indicators.update({ 'macd': TI.get_MACD(close_prices, time_values=time_values, map_time=True) }) indicators.update({'ema': {}}) indicators['ema'].update({ 'ema200': TI.get_EMA(close_prices, 200, time_values=time_values, map_time=True) }) return (indicators)