Skip to content

[BUG] crossover function doesn't work anymore #445

@vimrc-sj

Description

@vimrc-sj

Hello,

The bot works well until last week, I met this problem when I enable the crossover function in config.yml, for example, as below:

crossovers:
  std_crossover:
    - enabled: true
      alert_enabled: true
      alert_frequency: once
      key_indicator: ema
      key_indicator_index: 0
      key_indicator_type: informants
      key_signal: ema
      crossed_indicator: ema
      crossed_indicator_index: 1
      crossed_indicator_type: informants
      crossed_signal: ema

I keep on getting the error messages:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "app_core.py", line 100, in run
    self.behaviour.run(self.market_data, self.settings['output_mode'])
  File "/home/pi/git/Crypto-Signal-Core/app/behaviour.py", line 66, in run
    new_result = self._test_strategies(market_data, output_mode)
  File "/home/pi/git/Crypto-Signal-Core/app/behaviour.py", line 164, in _test_strategies
    new_result[exchange][market_pair]
  File "/home/pi/git/Crypto-Signal-Core/app/behaviour.py", line 369, in _get_crossover_results
    'result': crossover_dispatcher[crossover](**dispatcher_args),
  File "/home/pi/git/Crypto-Signal-Core/app/analyzers/crossover.py", line 42, in analyze
    combined_data = pandas.concat([new_key_indicator, new_crossed_indicator], axis=1)
  File "/home/pi/.local/lib/python3.7/site-packages/pandas/core/reshape/concat.py", line 298, in concat
    return op.get_result()
  File "/home/pi/.local/lib/python3.7/site-packages/pandas/core/reshape/concat.py", line 516, in get_result
    indexers[ax] = obj_labels.get_indexer(new_labels)
  File "/home/pi/.local/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 3172, in get_indexer
    "Reindexing only valid with uniquely valued Index objects"
pandas.errors.InvalidIndexError: Reindexing only valid with uniquely valued Index objects

Could you help me check it? Thanks a bunch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions