Giter VIP home page Giter VIP logo

crypto-signal's Issues

[FEATURE] Avoiding Spam in Notifications from Conditionals

As is well known, you can mute the notification to the "frequency once" mode, which is excellent to avoid spam.

But could this feature be implemented from the conditional?

That is, if a pair analyzed at 15 minutes is notified from the conditional, it will be muted for at least 15 minutes or a time interval of the user's choice.

[BUG] ModuleNotFoundError: No module named 'telegram.utils'

Describe the bug
Getting this error when I run docker-compose up --build

app-1 | ModuleNotFoundError: No module named 'telegram.utils'
app-1 exited with code 1

To Reproduce
Steps to reproduce the behavior:

Install all dependencies as per requirements files
run docker-compose up --build

config.yml
Setup according to - https://github.com/w1ld3r/crypto-signal/blob/develop/docs/config.md


**Machine**
Windows 11 Pro
crypto-signal branch - Developer
Docker version v24.0.7

Problem with Worker interval and Notifications

Hello! I'm having problems with the "workers" because the second one starts working when the first one has not yet finished. Then, after a 30 or 45 minutes working well, I stop receiving notifications. Apparently workers overlap and this prevents them from working properly.

This is my configuration in "settings":

update_interval: 300
start_worker_interval: 60
market_data_chunk_size: 20

I also have tried several combinations with update_interval
, start_worker_interval and
market_data_chunk_size, but after a short period of time there is a lag and it goes out of control.

This is what the program looks like running, but it doesn't send any notifications:

Sleeping for 300 seconds
Beginning analysis of XLMDOWN/USDT
PPT/BTC:
Beginning analysis of XLM/BTC
CVC/BTC:
Beginning analysis of THETA/BTC
Beginning analysis of binance
Beginning analysis of BAR/USDT
Beginning analysis of binance
Beginning analysis of KEY/USDT
enabled notifers: ['telegram']
Starting Worker-27
Starting default analyzer...
Using the following exchange(s): ['binance']
Getting data for ['XVG/USDT', 'ATA/BTC', 'ATA/USDT', 'GTC/BTC', 'GTC/USDT', 'TORN/BTC', 'TORN/USDT', 'BAKE/BTC']
Starting Worker-5

Optimally, the next worker should start work when the first worker has completed the analysis and has notified, regardless of the time it takes to complete the analysis to avoid overlapping.

Need Help

Hi @w1ld3r i try to use this fork.
with conditional on i didn't got any notification, but when i turn off i got this error.

jinja2.exceptions.UndefinedError: 'dict object' has no attribute '1h'

Is it only work with conditional only ?

Thank you

[BUG] /usr/local/lib/python3.8/site-packages/pandas/core/indexing.py:1637: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame

Hi @w1ld3r
If I run with the app with "ma_crossover", I am getting the following message on output.
I don't know if it will cause a calculation or comparison error, but I wanted to let you know.

ERROR:
Starting Worker-209
Starting default analyzer...
Using the following exchange(s): ['binance']
Getting data for ['TLM/USDT']
/usr/local/lib/python3.8/site-packages/pandas/core/indexing.py:1637: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  self._setitem_single_block(indexer, value, name)
/usr/local/lib/python3.8/site-packages/pandas/core/indexing.py:1637: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame

[BUG] conditionals - not working

MY SETTINGS:
indicators:
stoch_rsi:
- enabled: true
alert_enabled: true
alert_frequency: always
signal:
- stoch_rsi
hot: 30
cold: 70
hot_label: 'Alış Zamanı! XX'
cold_label: 'Satış Zamanı! XX'
indicator_label: 'STOCH RSI Saatlik'
candle_period: 1h
period_count: 14
mute_cold: false

conditionals:

  • label: "Time to Buy"
    hot:
    • stoch_rsi: 1
  • label: "Time to Sell"
    cold:
    • stoch_rsi: 1

i can take notifications without conditionals but with this settings i cant.
i put some loggers on your code in notification.py on "notify_conditional" and i see the vales always changed together cold-cold, hot-hot and x always stay on "0", cause of that the code can not enter this if "if x == nb_conditions and x != 0:" and i cant recieve any notification. Have you any idea of bugfix about that @w1ld3r

Thanks for your help mate!

[BUG] Error using "Top Pairs" option when Binance Future is used

Using Binance Futures, when I use the "top_pairs" option, I get the following error:

_" File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\concurrent\futures_base.py", line 428, in result
return self.__get_result()
File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\concurrent\futures_base.py", line 384, in _get_result
raise self.exception
File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\tenacity_init.py", line 433, in call
result = fn(*args, **kwargs)
File "C:\Users\user\Documents\GitHub\crypto-signal-futures\app\exchange.py", line 151, in get_top_markets
values, dtype=[('market', 'U10'), ('volume', int)])
OverflowError: Python int too large to convert to C long"

This only happens when I use Windows 10 64 bits.

I don't use Docker either, only python 3.7.

[FEATURE] Config.YML

hi @w1ld3r
I've been looking for the setting that will produce the best signal for a long time, but I haven't found it yet. If you have a setting that I can base on and that can generate a useful signal, is it possible to share your config.yml?

Conditionals notifiers no charts attached

When I use conditional and enable chart in config.yml. But It sent notification without chart. How can I config it?
My config:
settings:
log_level: INFO
update_interval: 300
start_worker_interval: 2
market_data_chunk_size: 1
enable_charts: true
indicators:
candle_recognition:
- enabled: true
alert_enabled: true
alert_frequency: always
signal:
- doji
candle_check: 1
notification: hot
candle_period: 1d
hot: 0
cold: 0
chart: true
If i run without conditional. It send chart

Thanks

Multiple notifications

Hi, is there a way to stop recieving signals multiple times.?

I have RSI set at hot 70 cold 30
1h,4h,12h,1d timeframes
update_interval set at 1600
alert_frequency: once

I constantly recieve a lot of notifications in those timeframes while the RSI is hot or cold even though alert frequency is set to once. It is not just the RSI indicator.! I have tested with EMA crossovers and MACD crossovers too. Is there somewhere I can look in notification.py to stop this from happening.?

Thank You

[BUG] - conditional not working properly

Describe the bug
I set RSI, MFI, STOCHRSI
I set conditionals
I get those results for example 10 mins ago

APPC/BTC - - [{'mfi': '84.33'}] - -

STEEM/BTC - - [{'mfi': '84.60'}] - -

VIA/BTC - - [{'mfi': '92.34'}] - -

To Reproduce
Installation is ok. Just not getting accurate values for STOCHRSI and conditionals not working properly

Expected behavior
Conditionals to work, and stochrsi to let us give the 4 values like in TV and have accuracy

config.yml

settings:
  log_level: INFO
  update_interval: 3600
  timezone: Europe/Paris
  market_pairs:
    - THETA/BTC
    - UTK/USDT
    - VIA/BTC
    - POWR/BTC
    - NXS/BTC
    - NAV/BTC
    - STEEM/BTC
    - VIB/BTC
    - BCPT/BTC
    - DGB/BTC
    - APPC/BTC
    - SNX/USDT
    - KNC/USDT
    - ICX/USDT
    - HBAR/USDT

exchanges:
  binance:
    required:
      enabled: true

notifiers:
    telegram:
        required:
            token: xxxxx
            chat_id: yyyyyy
        optional:
            parse_mode: html
            template: "{{market}} - {{indicator_label}} - {{values}} - {{hot_cold_label}} - {{conditionals}} "
          
indicators:
    rsi:
        - enabled: true
          alert_enabled: true
          alert_frequency: always
          signal:
            - rsi
          hot: 40
          cold: 75
          hot_label: 'GOOD buy (below 40)'
          cold_label: 'GOOD sell (above 75)'
          indicator_label: 'RSI Daily'
          candle_period: 1d
          period_count: 14
          mute_cold: false
    mfi:
        - enabled: true
          alert_enabled: true
          alert_frequency: always
          signal:
            - mfi
          hot: 25
          cold: 75
          hot_label: 'GOOD buy (below 25)'
          cold_label: 'GOOD sell (above 75)'
          indicator_label: 'MFI Daily'
          candle_period: 1d
          period_count: 12
          mute_cold: false
  

    stoch_rsi:
        - enabled: true
          alert_enabled: true
          alert_frequency: once
          signal:
            - stoch_rsi
            - slow_k
            - slow_d
          hot: 25
          cold: 80
          hot_label: 'GOOD buy !'
          cold_label: 'GOOD sell !'
          indicator_label: 'STOCH Daily'
          candle_period: 1d
          period_count: 12
          mute_cold: false

    macd:
        - enabled: false
    momentum:
        - enabled: false
    obv:
        - enabled: false    
    ichimoku:
        - enabled: false
    iiv:
        - enabled: false

informants:
    lrsi:
        - enabled: false
    vwap:
        - enabled: false
    sma:
        - enabled: false
    ema:
        - enabled: false
    bollinger_bands:
        - enabled: false

conditionals:  
  - label: "2 CHECKMARKS for a GOOD sell (RSI/MFI)"
    cold:
      - rsi: 0
    cold:
      - mfi: 0

Desktop

  • OS name and version
    ubuntu 16.04
  • crypto-signal branch
    yours
  • Docker version
    don't know

Additional context
none

Wrong values for the STOCHRSI

I've set up the 3 infos. They are totally inaccurate when I compare to Tradingview.
Why using it then ? Is there a way to get the righ values ? To set up the config like in Tradingview (the 4 settings)

Thanks

Im set all_pairs: - USDT

My error:

Beginning analysis of HSR/BTC

No historical data provided returned by exchange.

Invalid data encountered while processing pair HSR/BTC, skipping

No historical data provided returned by exchange.

Invalid data encountered while processing pair HSR/BTC, skipping

No historical data provided returned by exchange.

Invalid data encountered while processing pair HSR/BTC, skipping

Traceback (most recent call last):

File "app.py", line 45, in

main()

File "app.py", line 39, in main

behaviour.run(settings['market_pairs'], settings['output_mode'])

File "/app/behaviour.py", line 63, in run

new_result = self._test_strategies(market_data, output_mode)

File "/app/behaviour.py", line 98, in _test_strategies

new_result[exchange][market_pair]

File "/app/behaviour.py", line 250, in _get_crossover_results

key_indicator = new_result[crossover_conf['key_indicator_type']][crossover_conf['key_indicator']][crossover_conf['key_indicator_index']]

IndexError: list index out of range

Can you help me to resolve this issue?

setup help

hi. I can't install. Where can I download the config.yml file ready? Can you upload the setup with pictures?

[BUG] Error trying to build docker image while building TA-lib

Describe the bug
Error trying to build docker image while building TA-lib

To Reproduce
Steps to reproduce the behavior:

  1. Clone this repo git clone https://github.com/w1ld3r/crypto-signal.git
  2. Enter to cripto-signal folder cd crypto-signal
  3. Switch to develop branch git checkout develop
  4. Create a config.yml file and put it into "app" folder.
    95.uBBuildyour own Docker image, for example, docker build -t dev/crypto-signals:latest .

Expected behavior

Image built

Additional context

CLI ERROR LOG

Collecting attrs>=17.3.0
  Downloading attrs-21.2.0-py2.py3-none-any.whl (53 kB)
Collecting cffi>=1.12
  Downloading cffi-1.14.5-cp38-cp38-manylinux1_x86_64.whl (411 kB)
Collecting pycparser
  Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
Building wheels for collected packages: twilio, python-json-logger, TA-lib, slackweb, webcord, tulipy
  Building wheel for twilio (setup.py): started
  Building wheel for twilio (setup.py): finished with status 'done'
  Created wheel for twilio: filename=twilio-6.60.0-py2.py3-none-any.whl size=1272036 sha256=09ef6e8196ebfb13cdbe1ec4b6b46ba5d9692eb0beb77d280e6df96ddeb066e3
  Stored in directory: /root/.cache/pip/wheels/34/38/f2/a6a656ad96b88f51a28edb65c96fbe80815f03b3ad3bb93d32
  Building wheel for python-json-logger (setup.py): started
  Building wheel for python-json-logger (setup.py): finished with status 'done'
  Created wheel for python-json-logger: filename=python_json_logger-2.0.1-py34-none-any.whl size=7386 sha256=4113837fb2c0743cf2db21e7d2183d6b4a8f67d19817feee5b2d2f048bcba1bb
  Stored in directory: /root/.cache/pip/wheels/17/25/e2/bc6585122b6e1b5b2bce42a9756143e0d85c317874abb5623e
  Building wheel for TA-lib (setup.py): started
  Building wheel for TA-lib (setup.py): still running...
  Building wheel for TA-lib (setup.py): finished with status 'error'
  Running setup.py clean for TA-lib
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3msed_e7/ta-lib_de8dd43e67fc49aa830070a6b8733248/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3msed_e7/ta-lib_de8dd43e67fc49aa830070a6b8733248/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-wjjitt2v
       cwd: /tmp/pip-install-3msed_e7/ta-lib_de8dd43e67fc49aa830070a6b8733248/
  Complete output (71 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.8
  creating build/lib.linux-x86_64-3.8/talib
  copying talib/test_abstract.py -> build/lib.linux-x86_64-3.8/talib
  copying talib/test_stream.py -> build/lib.linux-x86_64-3.8/talib
  copying talib/test_func.py -> build/lib.linux-x86_64-3.8/talib
  copying talib/stream.py -> build/lib.linux-x86_64-3.8/talib
  copying talib/abstract.py -> build/lib.linux-x86_64-3.8/talib
  copying talib/test_pandas.py -> build/lib.linux-x86_64-3.8/talib
  copying talib/deprecated.py -> build/lib.linux-x86_64-3.8/talib
  copying talib/test_data.py -> build/lib.linux-x86_64-3.8/talib
  copying talib/__init__.py -> build/lib.linux-x86_64-3.8/talib
  running build_ext
  skipping 'talib/_ta_lib.c' Cython extension (up-to-date)
  building 'talib._ta_lib' extension
  creating build/temp.linux-x86_64-3.8
  creating build/temp.linux-x86_64-3.8/talib
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/include -I/usr/local/include -I/opt/include -I/opt/local/include -I/opt/homebrew/include -I/opt/homebrew/opt/ta-lib/include -I/usr/local/lib/python3.8/site-packages/numpy/core/include -I/usr/local/include/python3.8 -c talib/_ta_lib.c -o build/temp.linux-x86_64-3.8/talib/_ta_lib.o
  In file included from /usr/local/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1969,
                   from /usr/local/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                   from /usr/local/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                   from talib/_ta_lib.c:620:
  /usr/local/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   #warning "Using deprecated NumPy API, disable it with " \
    ^~~~~~~
  talib/_ta_lib.c: In function ‘__pyx_pf_5talib_7_ta_lib_348_ta_getFuncInfo’:
  talib/_ta_lib.c:38240:104: warning: passing argument 2 of ‘TA_GetFuncInfo’ from incompatible pointer type [-Wincompatible-pointer-types]
     __pyx_v_retCode = TA_GetFuncInfo(__pyx_f_5talib_7_ta_lib___ta_getFuncHandle(__pyx_v_function_name), (&__pyx_v_info));
                                                                                                         ~^~~~~~~~~~~~~~
  In file included from talib/_ta_lib.c:615:
  /usr/include/ta-lib/ta_abstract.h:211:48: note: expected ‘const TA_FuncInfo **’ {aka ‘const struct TA_FuncInfo **’} but argument is of type ‘TA_FuncInfo **’ {aka ‘struct TA_FuncInfo **’}
                              const TA_FuncInfo **funcInfo );
                              ~~~~~~~~~~~~~~~~~~~~^~~~~~~~
  talib/_ta_lib.c: In function ‘__pyx_pf_5talib_7_ta_lib_350_ta_getInputParameterInfo’:
  talib/_ta_lib.c:38511:127: warning: passing argument 3 of ‘TA_GetInputParameterInfo’ from incompatible pointer type [-Wincompatible-pointer-types]
     __pyx_v_retCode = TA_GetInputParameterInfo(__pyx_f_5talib_7_ta_lib___ta_getFuncHandle(__pyx_v_function_name), __pyx_v_idx, (&__pyx_v_info));
                                                                                                                                ~^~~~~~~~~~~~~~
  In file included from talib/_ta_lib.c:615:
  /usr/include/ta-lib/ta_abstract.h:442:68: note: expected ‘const TA_InputParameterInfo **’ {aka ‘const struct TA_InputParameterInfo **’} but argument is of type ‘TA_InputParameterInfo **’ {aka ‘struct TA_InputParameterInfo **’}
                                        const TA_InputParameterInfo **info );
                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
  talib/_ta_lib.c: In function ‘__pyx_pf_5talib_7_ta_lib_352_ta_getOptInputParameterInfo’:
  talib/_ta_lib.c:38761:130: warning: passing argument 3 of ‘TA_GetOptInputParameterInfo’ from incompatible pointer type [-Wincompatible-pointer-types]
     __pyx_v_retCode = TA_GetOptInputParameterInfo(__pyx_f_5talib_7_ta_lib___ta_getFuncHandle(__pyx_v_function_name), __pyx_v_idx, (&__pyx_v_info));
                                                                                                                                   ~^~~~~~~~~~~~~~
  In file included from talib/_ta_lib.c:615:
  /usr/include/ta-lib/ta_abstract.h:446:74: note: expected ‘const TA_OptInputParameterInfo **’ {aka ‘const struct TA_OptInputParameterInfo **’} but argument is of type ‘TA_OptInputParameterInfo **’ {aka ‘struct TA_OptInputParameterInfo **’}
                                           const TA_OptInputParameterInfo **info );
                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
  talib/_ta_lib.c: In function ‘__pyx_pf_5talib_7_ta_lib_354_ta_getOutputParameterInfo’:
  talib/_ta_lib.c:39007:128: warning: passing argument 3 of ‘TA_GetOutputParameterInfo’ from incompatible pointer type [-Wincompatible-pointer-types]
     __pyx_v_retCode = TA_GetOutputParameterInfo(__pyx_f_5talib_7_ta_lib___ta_getFuncHandle(__pyx_v_function_name), __pyx_v_idx, (&__pyx_v_info));
                                                                                                                                 ~^~~~~~~~~~~~~~
  In file included from talib/_ta_lib.c:615:
  /usr/include/ta-lib/ta_abstract.h:450:70: note: expected ‘const TA_OutputParameterInfo **’ {aka ‘const struct TA_OutputParameterInfo **’} but argument is of type ‘TA_OutputParameterInfo **’ {aka ‘struct TA_OutputParameterInfo **’}
                                         const TA_OutputParameterInfo **info );
                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
  talib/_ta_lib.c: In function ‘__pyx_f_5talib_7_ta_lib___ta_getFuncHandle’:
  talib/_ta_lib.c:39606:126: warning: passing argument 2 of ‘TA_GetFuncHandle’ from incompatible pointer type [-Wincompatible-pointer-types]
     __pyx_t_1 = __pyx_f_5talib_7_ta_lib__ta_check_success(__pyx_n_s_TA_GetFuncHandle, TA_GetFuncHandle(__pyx_v_function_name, (&__pyx_v_handle)), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 720, __pyx_L1_error)
                                                                                                                               ~^~~~~~~~~~~~~~~~
  In file included from talib/_ta_lib.c:615:
  /usr/include/ta-lib/ta_abstract.h:155:52: note: expected ‘const TA_FuncHandle **’ {aka ‘const unsigned int **’} but argument is of type ‘TA_FuncHandle **’ {aka ‘unsigned int **’}
                                const TA_FuncHandle **handle );
                                ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
  gcc: fatal error: Killed signal terminated program cc1
  compilation terminated.
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for TA-lib
  Building wheel for slackweb (setup.py): started
  Building wheel for slackweb (setup.py): finished with status 'done'
  Created wheel for slackweb: filename=slackweb-1.0.5-py3-none-any.whl size=1848 sha256=21786b16fb49a08a14b6049d01b62dd9aa978bc073dc5745da6b373552a253f7
  Stored in directory: /root/.cache/pip/wheels/62/1c/6f/afaae701bc404c25b7fbe04e46647d0e370ecc046dc90d6ec2
  Building wheel for webcord (setup.py): started
  Building wheel for webcord (setup.py): finished with status 'done'
  Created wheel for webcord: filename=webcord-0.2-py3-none-any.whl size=13634 sha256=20ca6a8617c7c8fdca851534e24dea9682032405b2d62ed152ccf5996454c37a
  Stored in directory: /root/.cache/pip/wheels/1c/db/d1/c9b4e8bd008930d779414e5739abce9a584f198284fd8d1bfa
  Building wheel for tulipy (PEP 517): started
  Building wheel for tulipy (PEP 517): finished with status 'done'
  Created wheel for tulipy: filename=tulipy-0.4.0-cp38-cp38-linux_x86_64.whl size=304617 sha256=592d871bae98191c6b8b8debdb1a010deef49d424b74112bc81d37fc4e77725a
  Stored in directory: /root/.cache/pip/wheels/f0/40/48/d8ed314f73c9ea3837d65542df8b0b6b577428253cbc40c1b5
Successfully built twilio python-json-logger slackweb webcord tulipy
Failed to build TA-lib
Installing collected packages: pycparser, six, pytz, multidict, idna, cffi, yarl, urllib3, tzlocal, typing-extensions, python-dateutil, pycares, chardet, certifi, attrs, async-timeout, tornado, requests, pyparsing, PyJWT, pillow, pandas, MarkupSafe, kiwisolver, int-date, cycler, cryptography, cachetools, APScheduler, aiohttp, aiodns, webcord, twilio, tulipy, tenacity, tabulate, TA-lib, structlog, stockstats, slackweb, scipy, PyYAML, python-telegram-bot, python-json-logger, matplotlib, jinja2, ccxt
    Running setup.py install for TA-lib: started
    Running setup.py install for TA-lib: still running...
    Running setup.py install for TA-lib: finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3msed_e7/ta-lib_de8dd43e67fc49aa830070a6b8733248/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3msed_e7/ta-lib_de8dd43e67fc49aa830070a6b8733248/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-utsgqgjl/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/TA-lib
         cwd: /tmp/pip-install-3msed_e7/ta-lib_de8dd43e67fc49aa830070a6b8733248/
    Complete output (71 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.8
    creating build/lib.linux-x86_64-3.8/talib
    copying talib/test_abstract.py -> build/lib.linux-x86_64-3.8/talib
    copying talib/test_stream.py -> build/lib.linux-x86_64-3.8/talib
    copying talib/test_func.py -> build/lib.linux-x86_64-3.8/talib
    copying talib/stream.py -> build/lib.linux-x86_64-3.8/talib
    copying talib/abstract.py -> build/lib.linux-x86_64-3.8/talib
    copying talib/test_pandas.py -> build/lib.linux-x86_64-3.8/talib
    copying talib/deprecated.py -> build/lib.linux-x86_64-3.8/talib
    copying talib/test_data.py -> build/lib.linux-x86_64-3.8/talib
    copying talib/__init__.py -> build/lib.linux-x86_64-3.8/talib
    running build_ext
    skipping 'talib/_ta_lib.c' Cython extension (up-to-date)
    building 'talib._ta_lib' extension
    creating build/temp.linux-x86_64-3.8
    creating build/temp.linux-x86_64-3.8/talib
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/include -I/usr/local/include -I/opt/include -I/opt/local/include -I/opt/homebrew/include -I/opt/homebrew/opt/ta-lib/include -I/usr/local/lib/python3.8/site-packages/numpy/core/include -I/usr/local/include/python3.8 -c talib/_ta_lib.c -o build/temp.linux-x86_64-3.8/talib/_ta_lib.o
    In file included from /usr/local/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1969,
                     from /usr/local/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                     from /usr/local/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                     from talib/_ta_lib.c:620:
    /usr/local/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     #warning "Using deprecated NumPy API, disable it with " \
      ^~~~~~~
    talib/_ta_lib.c: In function ‘__pyx_pf_5talib_7_ta_lib_348_ta_getFuncInfo’:
    talib/_ta_lib.c:38240:104: warning: passing argument 2 of ‘TA_GetFuncInfo’ from incompatible pointer type [-Wincompatible-pointer-types]
       __pyx_v_retCode = TA_GetFuncInfo(__pyx_f_5talib_7_ta_lib___ta_getFuncHandle(__pyx_v_function_name), (&__pyx_v_info));
                                                                                                           ~^~~~~~~~~~~~~~
    In file included from talib/_ta_lib.c:615:
    /usr/include/ta-lib/ta_abstract.h:211:48: note: expected ‘const TA_FuncInfo **’ {aka ‘const struct TA_FuncInfo **’} but argument is of type ‘TA_FuncInfo **’ {aka ‘struct TA_FuncInfo **’}
                                const TA_FuncInfo **funcInfo );
                                ~~~~~~~~~~~~~~~~~~~~^~~~~~~~
    talib/_ta_lib.c: In function ‘__pyx_pf_5talib_7_ta_lib_350_ta_getInputParameterInfo’:
    talib/_ta_lib.c:38511:127: warning: passing argument 3 of ‘TA_GetInputParameterInfo’ from incompatible pointer type [-Wincompatible-pointer-types]
       __pyx_v_retCode = TA_GetInputParameterInfo(__pyx_f_5talib_7_ta_lib___ta_getFuncHandle(__pyx_v_function_name), __pyx_v_idx, (&__pyx_v_info));
                                                                                                                                  ~^~~~~~~~~~~~~~
    In file included from talib/_ta_lib.c:615:
    /usr/include/ta-lib/ta_abstract.h:442:68: note: expected ‘const TA_InputParameterInfo **’ {aka ‘const struct TA_InputParameterInfo **’} but argument is of type ‘TA_InputParameterInfo **’ {aka ‘struct TA_InputParameterInfo **’}
                                          const TA_InputParameterInfo **info );
                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
    talib/_ta_lib.c: In function ‘__pyx_pf_5talib_7_ta_lib_352_ta_getOptInputParameterInfo’:
    talib/_ta_lib.c:38761:130: warning: passing argument 3 of ‘TA_GetOptInputParameterInfo’ from incompatible pointer type [-Wincompatible-pointer-types]
       __pyx_v_retCode = TA_GetOptInputParameterInfo(__pyx_f_5talib_7_ta_lib___ta_getFuncHandle(__pyx_v_function_name), __pyx_v_idx, (&__pyx_v_info));
                                                                                                                                     ~^~~~~~~~~~~~~~
    In file included from talib/_ta_lib.c:615:
    /usr/include/ta-lib/ta_abstract.h:446:74: note: expected ‘const TA_OptInputParameterInfo **’ {aka ‘const struct TA_OptInputParameterInfo **’} but argument is of type ‘TA_OptInputParameterInfo **’ {aka ‘struct TA_OptInputParameterInfo **’}
                                             const TA_OptInputParameterInfo **info );
                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
    talib/_ta_lib.c: In function ‘__pyx_pf_5talib_7_ta_lib_354_ta_getOutputParameterInfo’:
    talib/_ta_lib.c:39007:128: warning: passing argument 3 of ‘TA_GetOutputParameterInfo’ from incompatible pointer type [-Wincompatible-pointer-types]
       __pyx_v_retCode = TA_GetOutputParameterInfo(__pyx_f_5talib_7_ta_lib___ta_getFuncHandle(__pyx_v_function_name), __pyx_v_idx, (&__pyx_v_info));
                                                                                                                                   ~^~~~~~~~~~~~~~
    In file included from talib/_ta_lib.c:615:
    /usr/include/ta-lib/ta_abstract.h:450:70: note: expected ‘const TA_OutputParameterInfo **’ {aka ‘const struct TA_OutputParameterInfo **’} but argument is of type ‘TA_OutputParameterInfo **’ {aka ‘struct TA_OutputParameterInfo **’}
                                           const TA_OutputParameterInfo **info );
                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
    talib/_ta_lib.c: In function ‘__pyx_f_5talib_7_ta_lib___ta_getFuncHandle’:
    talib/_ta_lib.c:39606:126: warning: passing argument 2 of ‘TA_GetFuncHandle’ from incompatible pointer type [-Wincompatible-pointer-types]
       __pyx_t_1 = __pyx_f_5talib_7_ta_lib__ta_check_success(__pyx_n_s_TA_GetFuncHandle, TA_GetFuncHandle(__pyx_v_function_name, (&__pyx_v_handle)), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 720, __pyx_L1_error)
                                                                                                                                 ~^~~~~~~~~~~~~~~~
    In file included from talib/_ta_lib.c:615:
    /usr/include/ta-lib/ta_abstract.h:155:52: note: expected ‘const TA_FuncHandle **’ {aka ‘const unsigned int **’} but argument is of type ‘TA_FuncHandle **’ {aka ‘unsigned int **’}
                                  const TA_FuncHandle **handle );
                                  ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
    gcc: fatal error: Killed signal terminated program cc1
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3msed_e7/ta-lib_de8dd43e67fc49aa830070a6b8733248/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3msed_e7/ta-lib_de8dd43e67fc49aa830070a6b8733248/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-utsgqgjl/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/TA-lib Check the logs for full command output.
The command '/bin/sh -c pip install -r requirements-step-2.txt' returned a non-zero code: 1

[BUG] not getting the right STOCHRSI values

Describe the bug
I've asked the bot to get the 3 STOCHRSI values (stochrsi, k, d) and all are wrong

To Reproduce
Easy. Just tell me if you have the right one yourself. It has nothing to do with installation.
Probably how we set up STOCH .. and WHAT we can set up to have accuracy.

Expected behavior
Check this.
When bot started. I get for example for HBAR/USDT on binance
stoch_rsi #0: 81.90397794/68.25484126/60.94965080
first = stoch, then k, then d

In tradingview
k = 56.30
d = 46.47

So, TOTALLY WRONG ... weird.... not even ONE value matches !

config.yml

# Copy this file to config.yml to get started and then add your own configuration.
# Full documentation here: https://github.com/CryptoSignal/crypto-signal/blob/master/docs/config.md

settings:
  log_level: INFO
  update_interval: 3600
  timezone: Europe/Paris
  market_pairs:
    - THETA/BTC
    - UTK/USDT
    - VIA/BTC
    - POWR/BTC
    - NXS/BTC
    - NAV/BTC
    - STEEM/BTC
    - VIB/BTC
    - BCPT/BTC
    - DGB/BTC
    - APPC/BTC
    - SNX/USDT
    - KNC/USDT
    - ICX/USDT
    - HBAR/USDT

exchanges:
  binance:
    required:
      enabled: true

notifiers:
    telegram:
        required:
            token: 
            chat_id: 
        optional:
            parse_mode: html
            template: "{{exchange}} - {{market}} - {{indicator_label}} - {{values}} - {{hot_cold_label}} - {{conditionals}}  "
          
indicators:
    rsi:
        - enabled: true
          alert_enabled: true
          alert_frequency: always
          signal:
            - rsi
          hot: 40
          cold: 75
          hot_label: 'GOOD buy opportunity!'
          cold_label: 'GOOD sell opportunity!'
          indicator_label: 'RSI Daily'
          candle_period: 1d
          period_count: 14
          mute_cold: false
  
    mfi:
        - enabled: true
          alert_enabled: true
          alert_frequency: always
          signal:
            - mfi
          hot: 25
          cold: 75
          hot_label: 'GOOD buy opportunity!'
          cold_label: 'GOOD sell opportunity!'
          indicator_label: 'MFI Daily'
          candle_period: 1d
          period_count: 12
          mute_cold: false
    
    stoch_rsi:
        - enabled: true
          alert_enabled: true
          alert_frequency: always
          signal:
            - stoch_rsi
            - slow_k
            - slow_d         
          hot: 25
          cold: 80
          hot_label: 'GOOD buy opportunity!'
          cold_label: 'GOOD sell opportunity!'
          indicator_label: 'STOCH Daily'
          candle_period: 1d
          period_count: 14
          mute_cold: false

    macd:
        - enabled: false
    momentum:
        - enabled: false
    obv:
        - enabled: false    
    ichimoku:
        - enabled: false
    iiv:
        - enabled: false

informants:
    lrsi:
        - enabled: false
    vwap:
        - enabled: false
    sma:
        - enabled: false
    ema:
        - enabled: false
    bollinger_bands:
        - enabled: false
    ohlcv:
        - enabled: false


conditionals:  
  - label: "2 CHECKMARKS for a GOOD sell"
    cold:
      - stoch_rsi: 0
    cold:
      - mfi: 0

Desktop

  • ubuntu 16.4
  • crypto-signal branch : yours !
  • Docker version : I don't know

DONE ! As you asked.
Hope you'll be able to help
thanks
PS: I just removed telgram info

[HELP] Getting AttributeError

why i alway getting

AttributeError: 'Notifier' object has no attribute 'conditional_mode'

I use the example config in config.md

conditionals - not working

It seems that "conditionals" rules are not working - or are not sending notifications - or I didn't understand how they are working.
If I run a docker image with a config.yml - I'm receiving notification for same coin - same indicators, but if I add those indicators in a "rule" in "conditionals" section, I'm not receiving anything:

STR:
defaults.yml(original project file, except that I've set everything to enabled; false)
config.yml - a have something like this:
`
indicators:
....
iiv:
- enabled: true
alert_enabled: true
alert_frequency: always
signal:
- iiv
hot: 1
cold: 0
candle_period: 1h
indicator_label: "IIV - STRATEGY"

ichimoku:
- enabled: true
alert_enabled: true
alert_frequency: always
signal:
- leading_span_a
- leading_span_b
hot: true
cold: true
candle_period: 1h
indicator_label: 'Ichimoku'
mute_cold: true

ma_ribbon:
- enabled: true
alert_enabled: true
alert_frequency: always
signal:
- pval
- corr
hot: 10
cold: -10
hot_label: 'Uptrend is coming'
cold_label: 'Downtred is coming'
candle_period: 1h
pval_th: 20
ma_series: 5, 15, 25, 35, 45
mute_cold: true

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

conditionals:

############### ichimoku & ma_ribbon #################

  • label: "1h - ichimoku && ma_ribbon"
    hot:
    • ichimoku: 0
    • ma_ribbon: 0

############### ichimoku & iiv #################

  • label: "1h - ichimoku && iiv"
    hot:
    • ichimoku: 0
    • iiv: 0

############### ma_ribbon #################

  • label: "1h - ma_ribbon && iiv"
    hot:

    • ma_ribbon: 0
    • iiv: 0
      `
      If i run:
      docker run --rm -i -v D:\DEV\test_notifications\crypto-signal\app:/app dev/crypto-signals:latest
  • I'm not receiving anything in telegram, but if I run same config.yml without rules in "conditionals" section, I'm receiving alerts(same time) for the same indicators used in rules, like;
    binance-WAVES/USDT-ichimoku-Ichimoku is hot!
    [1h] Prices: [ High: 12.6772 Low: 12.6282 Close: 12.6772]
    binance-WAVES/USDT-ma_ribbon- is hot!
    [1h] Prices: [ High: 12.6772 Low: 12.6282 Close: 12.6772]
    // => if I've understand how conditions work, this should have triggered first condition
    NoCondition

Running with docker on windows:
docker build -t dev/crypto-signals:latest .
docker run --rm -i -v D:\DEV\test_notifications\crypto-signal\app:/app dev/crypto-signals:latest

docker version
Client: Docker Engine - Community
Cloud integration: 1.0.7
Version: 20.10.2
API version: 1.41
Go version: go1.13.15
Git commit: 2291f61
Built: Mon Dec 28 16:14:16 2020
OS/Arch: windows/amd64
Context: default
Experimental: true

I really appreciate if you can point me in the right direction!
Thank you!


@w1ld3r - sorry for bad bug posting - attached the defaults.yml and config.yml into a zip file(cannot upload ymls)
configAndDefaultsYmls.zip
And yes - as MartijnvDijk said - if i remove analysis.config.candle_period i now receive the notifications - but without Price
image

Thank you guys!

Notifiers with Conditionals ( {{prices}} & {{prices_value}} )

Hello, I have problems when I use the Conditionals.

When I have the "prices_value" activated on the Template in the Notifiers section, I receive this error:

"price_value" is undefined on jinja2

Example:

File "/usr/local/lib/python3.8/site-packages/jinja2/compat.py", line 28, in reraise
raise value.with_traceback(tb)
File "", line 2, in top-level template code
File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 471, in getattr
return getattr(obj, attribute)
**jinja2.exceptions.UndefinedError: 'price_value' is undefined**

Without Conditionals "prices_value" is working good @w1ld3r

Also {{prices}} works, but with {{prices}} I can't format as I do with the variable "price_value".

Example:

notifiers:
telegram:
required:
token: xxxxxxxxAFssBkCdO3q5KZvgwxxxxxxx
chat_id: -1xxxxxxx
optional:
parse_mode: html
template: "Indicator: {{indicator_label}} {{ '\n' -}} Par: {{market}} {{ '\n' -}} {{ '\n' -}}
SIGNAL: {{ '\n' -}}
BUY: {{ decimal_format|format(price_value.close) }} {{ '\n' -}}
TP1: {{ decimal_format|format(price_value.close * 1.02) }} {{ '\n' -}}
TP2: {{ decimal_format|format(price_value.close * 1.04) }} {{ '\n' -}}
SL: {{ decimal_format|format(price_value.low * 0.985) }} "_

What can I do to solve this problem? Or how Can I get the price in the notification (I use Telegram).

Thanks

./config.guess: unable to guess system type

Describe the bug
config.guess is too old : 2006-07-02 to recognize my operating system

To Reproduce
Steps to reproduce the behavior:
2. docker build -t dev/crypto-signals:latest .

Desktop

  • OS name and version : Linux RPI4 5.10.44-v8+ #1429 SMP PREEMPT Fri Jun 25 10:03:37 BST 2021 aarch64 GNU/Linux
  • crypto-signal branch : w1ld3r
  • Docker version 20.10.7, build f0df350
    2021-06-26 04_25_14-pi@RPI4_ ~

Conditionals notifiers

Is your feature request related to a problem? Please describe.
Hello!

I am trying to enter some conditionals in config.yml. However, although the condition is met, I am not getting any notification. Is there any special syntax for conditionals? My config.yml is so simple and is just a test with one indicator (obviously, I can obtain the same result with only the indicators, but is a simple way to test conditionals). I would be very grateful if you could give me some indications. Please, find enclosed my config.yml:

settings:
    log_level: INFO
    update_interval: 60
    start_worker_interval: 2
    market_data_chunk_size: 1
    timezone: Europe/Paris
    enable_charts: true
    market_pairs:
        - ADA/USDT     

exchanges:
    binance:
        required:
            enabled: true

indicators:
    rsi:
        - enabled: false
    stoch_rsi:
        - enabled: true
          alert_enabled: true
          alert_frequency: always
          signal:
            - stoch_rsi
          hot: 20
          cold: 80
          candle_period: 5m
          period_count: 14
    momentum:
        - enabled: false
     macd:
        - enabled: false         
    obv:
        - enabled: false
    mfi:
        - enabled: false
    ichimoku:
        - enabled: false    
    bollinger:
    - enabled: false
    aroon_oscillator:
    - enabled: false

informants:
    lrsi:
        - enabled: false
    sma:
        - enabled: false       
    ema:
        - enabled: false
    vwap:
        - enabled: false
    bollinger_bands:
        - enabled: false
    ohlcv:
        - enabled: false

conditionals:
  - label: "Signal to buy"
    hot:
      - stoch_rsi: 0
      
  - label: "Shell"
    cold:
      - stoch_rsi: 0
          
notifiers:
    telegram:
        required:
            token: xxxxxxx
            chat_id: -xxxxxxx
        optional:
            parse_mode: html
            template: "[{{market}}] {{indicators}} {{status}} {{values}} {{ '\n' -}}" 

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

[FEATURE] ... I want to make it help me T T

Hello gentle guys?

I'm studying tradingview pine script source code.

I want to make some indicator like my picture below.

I'd like to mark when the close and leadline are cross eachother over or under only.

but I don't know why the gogo and nono mark are discoverd at all time.

pleae help me gentle guys!

//@Version=5
indicator("my Script", overlay=true)
laggingSpan2Periods = input.int(26, minval=1, title="Leading Span B Length")
donchian(len) => math.avg(ta.lowest(len), ta.highest(len))
leadline = donchian(laggingSpan2Periods)
displacement = input.int(26, minval=1, title="Displacement")

plot(close)
p2 = plot(leadline, offset = displacement - 1, color=color.red,
title="Leading Span B")

isOver = ta.crossover(close, leadline)
isUnder = ta.crossunder(close, leadline)

plotshape(isOver, text="gogo~", style=shape.arrowup, location=location.belowbar, size=size.large, color=color.green)
plotshape(isUnder, text="nono~", style=shape.arrowdown, location=location.abovebar, size=size.large, color=color.red)

20220222_161559
20220222_161630
f

first_run is not working ![BUG]

Describe the bug
i set first_run to true in config.yml
i want to skip first alert because its false .

config.yml
settings:
update_interval: 300
first_run: true
market_pairs:
- ETH/BTC
- LTC/BTC
- XMR/BTC

exchanges:
binance:
required:
enabled: true
indicators:
rsi:
- enabled: true
alert_enabled: true
alert_frequency: once
signal:
- rsi
hot: 30
cold: 70
candle_period: 5m
period_count: 14
hot_label: 'Buy Alert'
cold_label: 'Sell Alert'
indicator_label: 'RSI 1d 30/70'
mute_cold: false
notifiers:
webhook:
required:
url: https://webhook.site/68bcdd35-831a-49c8-b0ff-0b9cf5922270
optional:
username: null
password: null

Doesn't seem to run for me ERROR - no configuration file provided: not found

Describe the bug
Getting the below error, even after checking all the Python dependencies are satisfied. I have Docker with Docker Compose (built in) on Windows 11 Pro.

To Reproduce
Steps to reproduce the behavior:
PS C:\Users\Mojo\Desktop\PowerShell_Scripts> docker-compose up --build
no configuration file provided: not found

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

config.yml
copied and amended the pairs and telegram changed to Discord alerts - taken from here - https://github.com/w1ld3r/crypto-signal/blob/develop/docs/config.md

Machine

  • Windows 11 Pro
  • crypto-signal branch - Developer
  • Docker version v24.0.7

[BUG] defaults.yml in documentation

In documentation it's not stated that values from config.yml overwrite structure of defaults.yml.
So, if in defaults.yml some indicator is enabled, but in config.yml it's not defined (the expected behavior = disabled) value is taken from defaults.yml.
This, in turn leads to consequences - price_values for notification is calculated only if ohlcv for same period is explicitly enabled

Doubt about weight of the Binance Api request

Hi, I would like to know if you would be so kind to clarify this doubt regarding the weight of the request to the Binance Api.

In my case I analyze 240 USDT pairs (almost all Spot market) for 4 minutes. 60 pairs per minute. I do it in the following way:

Each worker analyze 20 pairs every 20 seconds and then sleep for 250 seconds.

I understand that the maximum weight per request is 40 for all symbols, but in your case I do not know what is the unit weight per request.

For the case of the setup I am using, what would be the weight of each request to the Binance Api? More specifically what would be the weight of the request per minute?

Problem with ichimoku

Hello
There's a problem when I change alert_frequency in Ichimoku indicator to once then I don't receive any signal at the moment of crossing Senko a and b. What's the problem?

Here is my config

settings:
    log_level: INFO
    update_interval: 60
    start_worker_interval: 1
    market_data_chunk_size: 1

exchanges:
    binance:
        required:
            enabled: true
        all_pairs:
            - USDT
        future: true            
        exclude:
            - USDC
            - PAX
            - BUSD
            - TUSD
            - EUR
            - SUSD
            - GBP
            - UTK
            
        
        
indicators:
    bbp:
        - enabled: false
    rsi:
        - enabled: false    
    ichimoku:
        - enabled: true
          alert_enabled: true
          alert_frequency: once
          signal:
            - leading_span_a
            - leading_span_b
          hot: true
          cold: true
          candle_period: 5m
    iiv:
        - enabled: false
    stoch_rsi:
        - enabled: false
    momentum:
        - enabled: false
    macd:
        - enabled: false
    obv:
        - enabled: false
    mfi:
        - enabled: false
informants:
    lrsi:
        - enabled: false
    vwap:
        - enabled: false
    sma:
        - enabled: false
    ema:
        - enabled: false
    bollinger_bands:
        - enabled: false
    ohlcv:
        - enabled: true
          signal:
            - high
            - low
            - close
            - open
            - volume
          candle_period: 5m
          period_count: 100
        - enabled: true
          signal:
            - high
            - low
            - close
            - open
            - volume
          candle_period: 1h
          period_count: 20  
        
conditionals:
  - label: "BUY Signal5"
    hot:
      - ichimoku: 0
  - label: "Sell Signal5"
    cold:
      - ichimoku: 0

[BUG] Failed to run

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

  • Ubuntu 21
  • crypto-signal branch Develop
  • Docker version 20.10.9

[BUG] CANDLE PERIODE SENT WRONG DATA

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. git clone 'https://github.com/w1ld3r/crypto-signal.git'
  2. docker build -t dev/crypto-signals:latest .
  3. docker run '--rm -ti -v $PWD/app:/app dev/crypto-signals:latest'
  4. Error : get message from webhook data but candle periode is wrong

Expected behavior
get message from webhook data but candle periode is wrong..

[{"values": {"macd_0": "183.93", "macdsignal_1": "235.09"}, "exchange": "binance", "market": "BTC/USDT", "base_currency": "BTC", "quote_currency": "USDT", "indicator": "std_crossover", "indicator_number": 1, "analysis": {"config": {"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", "candle_period": "macd0"}, "status": "cold"}, "status": "cold", "last_status": "cold", "prices": "", "lrsi": "", "creation_date": "2021-08-13 14:53:43", "hot_cold_label": "", "indicator_label": "", "price_value": {}, "decimal_format": "%.2f"}]

config.yml

settings:
    log_level: INFO
    update_interval: 500
    market_pairs:
        - BTC/USDT
        - ETH/USDT

exchanges:
    huobipro:
        required:
            enabled: true
    binance:
        required:
            enabled: true

indicators:
    rsi:
        - enabled: true
          alert_enabled: false
          alert_frequency: once
          signal:
            - rsi
          hot: 30
          cold: 70
          candle_period: 1h
          period_count: 50
        - enabled: true
          alert_enabled: true
          alert_frequency: once
          signal:
            - rsi
          hot: 30
          cold: 70
          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
    momentum:
        - enabled: true
          alert_enabled: false
          alert_frequency: once
          signal:
            - momentum
          hot: 0
          cold: 0
          candle_period: 1d
          period_count: 10
        - enabled: true
          alert_enabled: false
          alert_frequency: once
          signal:
            - momentum
          hot: 0
          cold: 0
          candle_period: 1h
          period_count: 12
    macd:
        - enabled: true
          alert_enabled: false
          alert_frequency: once
          signal:
            - macd
          hot: 0
          cold: 0
          candle_period: 15m
        - enabled: true
          alert_enabled: false
          alert_frequency: once
          signal:
            - macdsignal
          hot: 0
          cold: 0
          candle_period: 15m
    obv:
        - enabled: false
    mfi:
        - enabled: true
          alert_enabled: true
          alert_frequency: once
          signal:
            - mfi
          hot: 20
          cold: 80
          candle_period: 5m
          period_count: 14
    ichimoku:
        - enabled: false

informants:
    ema:
        - enabled: true
          signal:
            - ema
          candle_period: 1d
          period_count: 10
        - enabled: true
          signal:
            - ema
          candle_period: 1d
          period_count: 30

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
        - 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

notifiers:
    webhook:
        required:
            url: https://shiftcrypto.my.id/testbot/signal/testsignalV3.php
        optional:
            username: botku
            password: 

Machine

  • OS name and version : ubuntu1~18.04.1
  • crypto-signal branch
  • Docker version : Docker version 20.10.7, build 20.10.7-0ubuntu1~18.04.1

Additional context
Add any other context about the problem here.
For example if any modification of the code as been made

Label not printed

Hi,

Im trying to print the label as shown on this yaml code.
image

But this is the output. It just not able to discover the label. Is this a bug or Im missing a step?
image

[HELP] ABOUT CONDITIONAL

I'm still confuse about using conditional.. is there any other example or doc beside in config.md

[BUG] SyntaxError when trying to run docker

SyntaxError when trying to run docker after update branch to latest commit 72827f7

To Reproduce
Steps to reproduce the behavior:

  1. git clone '...'
  2. docker build -t dev/crypto-signals:latest .
  3. docker run '....'
  4. Error
    root@iZrj9auk43zyouqwlzay67Z:/crypto-signal# docker run --rm -ti -v $PWD/app:/app dev/crypto-signals:latest
    Traceback (most recent call last):
    File "app.py", line 14, in
    from behaviour import Behaviour
    File "/app/behaviour.py", line 17, in
    from analysis import StrategyAnalyzer
    File "/app/analysis.py", line 12, in
    from analyzers.indicators import *
    File "/app/analyzers/indicators/ichimoku.py", line 136
    <<<<<<< HEAD
    ^
    SyntaxError: invalid syntax
    root@iZrj9auk43zyouqwlzay67Z:
    /crypto-signal#

Expected behavior
Run docker container

Machine

  • OS Debian 10.9
  • crypto-signal develop
  • Docker version 20.10.7, build f0df350

Additional context
Docker imagen built without errors

[BUG] can't open file 'app.py': [Errno 2] No such file or directory

Describe the bug
Upon returning the terminal command to run, "docker run --rm -ti -v $PWD/app:/app dev/crypto-signals:latest", I'm receiving Traceback errors. Did steps all in order on my OSX, upgraded to python3, git, pip...

config.yml

settings:
  log_level: INFO
  update_interval: 100
  market_pairs:
    - BNB/USDT
    - SHIB/USDT
    - ONT/USDT

exchanges:
  Binance:
    required:
      enabled: true

indicators:
    momentum:
        - enabled: true
          alert_enabled: true
          alert_frequency: once
          signal:
            - momentum
          candle_period: 1h
          period_count: 18
    rsi:
        - enabled: true
          alert_enabled: true
          alert_frequency: once
          signal:
            - rsi
          hot: 32
          cold: 80
          candle_period: 1h 
          period_count: 18
          hot: 0
          cold: 0

Informants:
    ema:
	- enabled: true
	  signal:
	    - ema
	  candle_period: 1hr
	  period_count: 18
    vwap:
        - enabled: true
          signal:
            - vwap
          candle_period: 1d
          period_count: 15
    BOL_BAND:
        - enabled: true
          signal:
            - middleband
          candle_period: 1hr
          period_count: 18

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



notifiers:
    telegram:
        required:
            token: XXXX
            chat_id: XXXX
        optional:
            parse_mode: html
            template: "{{exchange}}-{{market}}-{{indicator}}-{{indicator_number}} is {{status}}!{{ '\n' -}}"

Machine

  • macOS Catalina, 10.15.3
  • crypto-signal branch
  • Docker version 4.1.1

Additional context
Only modifications have been done to the config.yml folder, I copied it directly into the "app" folder.
Within Dockers image itself, logs states "python: can't open file 'app.py': [Errno 2] No such file or directory".

support request :)

Hello w1ld3r,
Maybe you are busy but can you help me to setup the bot for volume growth detection?

Best regards

Volume per candle

Hello, Is there a possibility to obtain a variable for volume per candle or volume of the last 24 hours? Something like Price_Value variable.

[BUG]docker: Error response from demon

docker: Error response from demon when trying to run docker
To Reproduce
Steps to reproduce the behavior:

git clone '...'
docker build -t dev/crypto-signals:latest .
docker run '....'
Error
C:\Users\vetri\crypto-signal>docker run --rm -ti -v $PWD/app:/app dev/crypto-signals:latest
docker: Error response from daemon: create $PWD/app: "$PWD/app" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path.
See 'docker run --help'.
Expected behavior
Run docker container

Machine

OS Name:Microsoft Windows 10 Pro
OS Version:10.0.19042 N/A Build 19042
crypto-signal develop
Docker version 20.10.7, build f0df350

Additional context
Docker imagen built without errors

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.