w1ld3r / crypto-signal

The #1 Automated Technical Analysis (TA) & Algo. Trading tool for Coinbase, Bittrex, Binance, and more! (Track over 500+ coins)
http://cryptosignal.dev
MIT License
76 stars 37 forks source link

[BUG] Failed to run #48

Closed asmyshlyaev177 closed 2 years ago

asmyshlyaev177 commented 2 years ago

Describe the bug Trying to run with docker run --rm -v $PWD/app:/app dev/crypto-signals:latest

Got error

Traceback (most recent call last):
  File "app.py", line 108, in <module>
    main()
  File "app.py", line 24, in main
    config = Configuration()
  File "/app/conf.py", line 68, in __init__
    if exchange not in self.exchanges:
TypeError: argument of type 'NoneType' is not iterable

Config that worked with original Crypto-Signal, config in root directory.

To Reproduce Steps to reproduce the behavior:

  1. Clone repo
  2. docker build -t dev/crypto-signals:latest .
  3. Add config.yml
  4. docker run docker run --rm -v $PWD/app:/app dev/crypto-signals:latest
  5. Error

Expected behavior A clear and concise description of what you expected to happen.

config.yml

settings:
    log_level: WARN
    update_interval: 90
    # enable_charts: true
    market_pairs:
        - BTC/USDT

exchanges:
    binance:
        required:
            enabled: true

indicators:
    macd_cross:
        - enabled: true
          candle_period: 5m
          alert_enabled: true
          alert_frequency: always
          signal:
            - macd
            - signal
          hot_label: 'Uptrend is coming'
          cold_label: 'Downtred is coming'
          indicator_label: 'MACD Cross 5m'
          mute_cold: false
    mfi:
        - enabled: true
          alert_enabled: true
          alert_frequency: once
          signal:
            - mfi
          hot: 25
          cold: 80
          candle_period: 5m
          period_count: 14
    stoch_rsi:
        - enabled: true
          alert_enabled: true
          alert_frequency: once
          signal:
            - stoch_rsi
          hot: 20
          cold: 80
          candle_period: 5m
          period_count: 14
    iiv:
        - enabled: true
          alert_enabled: true
          alert_frequency: always
          signal:
            - iiv
          hot: 8
          cold: 0
          candle_period: 1m

crossovers:
    std_crossover:
        - enabled: true
          alert_enabled: true
          alert_frequency: once
          key_indicator: macd
          key_indicator_index: 0
          key_indicator_type: indicators
          key_signal: macd
          crossed_indicator: macd
          crossed_indicator_index: 1
          crossed_indicator_type: indicators
          crossed_signal: macdsignal

informants:
    ohlcv:
        - enabled: true
          signal:
            - high
            - low
            - close
          candle_period: 5m
          period_count: 14
        - enabled: true
          signal:
            - high
            - low
            - close
          candle_period: 1m
          period_count: 14  

notifiers:
    telegram:
        required:
            token: 20855*****
            chat_id: 192*****
        optional:
            parse_mode: html
            template: "Prices: [{{prices}}] {{market}}-{{indicator}}-{{indicator_number}} is {{status}}! ({{values}}){{ '\n' -}}" 
    stdout:
        required:
            enable: true
        optional:
            template: "{{exchange}}-{{market}}-{{indicator}}-{{indicator_number}} is {{status}}!{{ '\n' -}}"

# template: "Prices: [{{prices}}] {{analysis.config.candle_period}} {{market}}-{{indicator}}-{{indicator_number}} is {{status}}! ({{values}}){{ '\n' -}}" 

Machine

w1ld3r commented 2 years ago

Hey, trying to reproduce your bug, I'm getting another error:

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "app.py", line 100, 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 163, in _test_strategies
    new_result[exchange][market_pair]['crossovers'] = self._get_crossover_results(
  File "/app/behaviour.py", line 353, in _get_crossover_results
    crossed_indicator = new_result[crossover_conf['crossed_indicator_type']
IndexError: list index out of range
asmyshlyaev177 commented 2 years ago

Saw that one too.

w1ld3r commented 2 years ago

Actually you should not use crossovers. It has been replaced by ma_crossover (https://github.com/w1ld3r/crypto-signal#moving-average-crossover) and macd_cross that you are using.

w1ld3r commented 2 years ago

For the other error, are you really having it with the config upper ?

asmyshlyaev177 commented 2 years ago

For the other error, are you really having it with the config upper ?

Also tried copy config to app.

Will check again later.