CryptoSignal / Crypto-Signal

Github.com/CryptoSignal - Trading & Technical Analysis Bot - 4,100+ stars, 1,100+ forks
https://www.linkedin.com/in/AbenezerMamo
MIT License
4.83k stars 1.25k forks source link

Exception in thread Thread X #381

Closed w1ld3r closed 3 years ago

w1ld3r commented 4 years ago

Using the develop branch with this configuration file:

settings:
  log_mode: standard
  log_level: INFO
  output_mode: cli
  enable_charts: false
  update_interval: 10

exchanges:
  kraken:
    required:
      enabled: true
    all_pairs:
      - EUR

indicators:
  rsi:
    - enabled: true
      alert_enabled: true
      alert_frequency: once
      signal:
        - rsi
      hot: 30
      cold: 70
      candle_period: 15m
      period_count: 14

I'm getting this error:

2020-07-18 18:04:30,891 - behaviour - INFO - Beginning analysis of STORJ/EUR
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "app.py", line 94, in run
    self.behaviour.run(self.market_data, self.settings['output_mode'])
  File "/app/behaviour.py", line 66, in run
    new_result = self._test_strategies(market_data, output_mode)
  File "/app/behaviour.py", line 152, in _test_strategies
    market_pair
  File "/app/behaviour.py", line 259, in _get_indicator_results
    market_pair
  File "/app/behaviour.py", line 421, in _get_analysis_result
    results = dispatcher[indicator](**dispatcher_args)
  File "/app/analyzers/indicators/ichimoku.py", line 83, in analyze
    ichimoku_values.at[date, 'is_hot'] = span_hot and close_hot
  File "/usr/local/lib/python3.6/site-packages/pandas/core/generic.py", line 1121, in __nonzero__
    .format(self.__class__.__name__))
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

Here is the full log before the crash:

2020-07-18 17:56:11,583 - __main__ - INFO - No configured markets, using all available on exchange.
2020-07-18 17:56:14,633 - exchange - INFO - Getting all ['EUR'] market pairs for kraken
2020-07-18 17:56:17,635 - notification - INFO - enabled notifers: []
2020-07-18 17:56:17,636 - __main__ - INFO - Starting Worker-1
2020-07-18 17:56:17,636 - behaviour - INFO - Starting default analyzer...
2020-07-18 17:56:17,637 - behaviour - INFO - Using the following exchange(s): ['kraken']
2020-07-18 17:56:17,637 - behaviour - INFO - Getting data for ['ADA/EUR', 'ALGO/EUR', 'ATOM/EUR', 'BAT/EUR', 'BCH/EUR', 'COMP/EUR', 'DAI/EUR', 'DASH/EUR', 'EOS/EUR', 'GNO/EUR', 'ICX/EUR', 'KAVA/EUR', 'KNC/EUR', 'LINK/EUR', 'LSK/EUR', 'NANO/EUR', 'OMG/EUR', 'OXT/EUR', 'PAXG/EUR', 'QTUM/EUR']
2020-07-18 17:57:17,698 - notification - INFO - enabled notifers: []
2020-07-18 17:57:17,699 - __main__ - INFO - Starting Worker-2
2020-07-18 17:57:17,699 - behaviour - INFO - Starting default analyzer...
2020-07-18 17:57:17,699 - behaviour - INFO - Using the following exchange(s): ['kraken']
2020-07-18 17:57:17,700 - behaviour - INFO - Getting data for ['SC/EUR', 'STORJ/EUR', 'TRX/EUR', 'USDC/EUR', 'USDT/EUR', 'WAVES/EUR', 'DOGE/EUR', 'ETC/EUR', 'ETH/EUR', 'ETHEUR.d', 'LTC/EUR', 'MLN/EUR', 'REP/EUR', 'XTZ/EUR', 'BTC/EUR', 'XBTEUR.d', 'XLM/EUR', 'XMR/EUR', 'XRP/EUR', 'ZEC/EUR']
2020-07-18 17:58:17,758 - __main__ - INFO - All workers are running!
2020-07-18 18:03:31,022 - behaviour - INFO - Beginning analysis of kraken
2020-07-18 18:03:31,022 - behaviour - INFO - Beginning analysis of ADA/EUR
ADA/EUR:    

indicators: momentum #0: -0.00716700    mfi #0: 44.92941327     obv #0: 357515055.75070262  rsi #0: 65.27788207     stoch_rsi #0: 1.21057789    macd #0: 0.00949120     ichimoku #0: 0.06356025/0.04852500  iiv #0: 0.00000000  
informants: lrsi #0: 0.31191009     lrsi #1: 0.47108880     vwap #0: 0.10471746     sma #0: 0.10624240  ema #0: 0.10441007  bollinger_bands #0: 0.12819412/0.09671090/0.06522769    ohlcv #0: 0.10775500    
crossovers: 

2020-07-18 18:03:32,443 - behaviour - INFO - Beginning analysis of ALGO/EUR
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "app.py", line 94, in run
    self.behaviour.run(self.market_data, self.settings['output_mode'])
  File "/app/behaviour.py", line 66, in run
    new_result = self._test_strategies(market_data, output_mode)
  File "/app/behaviour.py", line 152, in _test_strategies
    market_pair
  File "/app/behaviour.py", line 259, in _get_indicator_results
    market_pair
  File "/app/behaviour.py", line 421, in _get_analysis_result
    results = dispatcher[indicator](**dispatcher_args)
  File "/app/analyzers/indicators/ichimoku.py", line 83, in analyze
    ichimoku_values.at[date, 'is_hot'] = span_hot and close_hot
  File "/usr/local/lib/python3.6/site-packages/pandas/core/generic.py", line 1121, in __nonzero__
    .format(self.__class__.__name__))
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

2020-07-18 18:04:29,518 - behaviour - INFO - Beginning analysis of kraken
2020-07-18 18:04:29,518 - behaviour - INFO - Beginning analysis of SC/EUR
SC/EUR: 

indicators: momentum #0: -0.00038000    mfi #0: 29.13776729     obv #0: 1064331366.96531868     rsi #0: 49.34900125     stoch_rsi #0: 32.94991202   macd #0: 0.00007500     ichimoku #0: 0.00275500/0.00226000  iiv #0: 0.00000000  
informants: lrsi #0: 1.00000000     lrsi #1: 0.36635207     vwap #0: 0.00294777     sma #0: 0.00294667  ema #0: 0.00293687  bollinger_bands #0: 0.00332185/0.00281667/0.00231148    ohlcv #0: 0.00303000    
crossovers: 

2020-07-18 18:04:30,891 - behaviour - INFO - Beginning analysis of STORJ/EUR
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "app.py", line 94, in run
    self.behaviour.run(self.market_data, self.settings['output_mode'])
  File "/app/behaviour.py", line 66, in run
    new_result = self._test_strategies(market_data, output_mode)
  File "/app/behaviour.py", line 152, in _test_strategies
    market_pair
  File "/app/behaviour.py", line 259, in _get_indicator_results
    market_pair
  File "/app/behaviour.py", line 421, in _get_analysis_result
    results = dispatcher[indicator](**dispatcher_args)
  File "/app/analyzers/indicators/ichimoku.py", line 83, in analyze
    ichimoku_values.at[date, 'is_hot'] = span_hot and close_hot
  File "/usr/local/lib/python3.6/site-packages/pandas/core/generic.py", line 1121, in __nonzero__
    .format(self.__class__.__name__))
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
w1ld3r commented 4 years ago

Replacing the and by & in ichimoku.py lines 83 and 87 correct the error.