def get_ATR(self):
     i = 0
     while i < 100:
         try:
             atrs = technical_fx_hilo2.HILO()
             result = atrs.getATR()
             # result = prediction.publish_current_limit_price(periods="1H")
             return (result)
         except Exception:
             print(Exception)
             predict.print_and_write('Try to get atr again')
             time.sleep(10)
             i += 1
             continue
 def get_hilo(self):
     i = 0
     while i < 30:
         try:
             hilos = technical_fx_hilo2.HILO()
             result = hilos.publish_current_hilo_price()
             # result = prediction.publish_current_limit_price(periods="1H")
             sell = float(result[1])
             buy = float(result[0])
             close = float(result[2])  # the close price of last hour
             return ([sell, buy, close])
         except Exception:
             print(Exception)
             predict.print_and_write('Try to get hilo again')
             time.sleep(10)
             i += 1
             continue