Giter Site home page Giter Site logo

w1ld3r / crypto-signal Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cryptosignal/crypto-signal

75.0 6.0 37.0 7.5 MB

The #1 Automated Technical Analysis (TA) & Algo. Trading tool for Coinbase, Bittrex, Binance, and more! (Track over 500+ coins)

Home Page: http://cryptosignal.dev

License: MIT License

Python 99.52% Makefile 0.23% Dockerfile 0.25%

crypto-signal's Introduction

Crypto Signals

Development branch to testing new features. This develop version has a lot of improvements and fixes over master branch. The recommendation is that you use the code in this branch.

Notable Changes

  • It creates candle bar charts with MAs, RSI and MACD. These images can be sent as part of a Telegram notification or a Webhook call.
  • It allows to include prices as part of the notification message.
  • New configuration to easily add many coins. Check bellow for "all_pairs".
  • New config var to use a custom "indicator_label" for each configured indicator and crossovers. Mainly useful for std_crossover.
  • New indicator iiv (Increase In Volume) to try to identify a pump/dump.
  • New indicator MA Ribbon
  • New config values "hot_label" and "cold_label" for each indicator setup to set custom texts instead of the typical "hot" and "cold".
  • New indicator ADX (Average Directional Index)
  • New indicator Klinger Oscillator
  • New indicator MACD Cross
  • New indicator StochRSI Cross
  • New indicator Sqzmon - Squeeze Momentum Indicator
  • New option to customize ichimoku strategies and added chikou span

Installing And Running

The commands listed below are intended to be run in a terminal.

Be sure you have git installed in your system.

  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.

  5. Build and run the docker container: docker-compose up --build

Configuring config.yml

All possible options for config.yml are almost the same for original CryptoSignal, so look here

However there are some aditional options to use.

Mute cold

If the indicator you are using dispatch notifications for hot/cold signals you can use the "mute_cold" option to silence (mute) cold messages. Example:

indicators:
  rsi:
    - enabled: true
      alert_enabled: true
      alert_frequency: once
      signal:
        - rsi
      hot: 30
      cold: 70
      candle_period: 1d
      period_count: 14      
      mute_cold: true

Charts

You can enable/disable charts creation.

settings:
    log_level: INFO
    update_interval: 600
    enable_charts: true
    market_pairs:
        - XRP/USDT
        - ETH/USDT
        - BTC/USDT
        ....

All pairs

It is very useful to process all symbols of a specific base market (BTC, ETH, USD, USDT). In this way you can avoid to write pair by pair in settings.market_pairs option.

The all_pairs option must be specified by each exchange and base market. Example:

exchanges:
    binance:
        required:
            enabled: true
        all_pairs:
            - USDT
    bittrex:
        required:
            enabled: false
        all_pairs:
            - ETH
            - BTC
        ....

When using all_pairs we can exclude some pairs in particular. For example, in the following config, we are tracking all USDT pairs in Binance, except the other stable coins.

exchanges:
    binance:
        required:
            enabled: true
        all_pairs:
            - USDT
        exclude: 
          - USDC
          - PAX
          - BUSD            
    bittrex:
        required:
            enabled: false
        all_pairs:
            - ETH
        ....

Show me the price!

If you want prices in your notification messages, you can use the "prices" variable or "price_value".

notifiers:
    telegram:
        required:
            token: 791615820:AAGFgGSumWUrb-CyXtGxzAuYaabababababababa
            chat_id: 687950000
        optional:
            parse_mode: html
            template: "[{{analysis.config.candle_period}}] {{market}} {{values}} Prices: [{{prices}}]"
notifiers:
    telegram:
        required:
            token: 791615820:AAGFgGSumWUrb-CyXtGxzAuYaabababababababa
            chat_id: 687950000
        optional:
            parse_mode: html
            template: "[{{analysis.config.candle_period}}] {{market}} {{values}} Price 15m low: [{{price_value['15m'].low}}]"

By the way, to have this feature you need to configure "ohlcv" informant for each candle period of your indicators.

informants:
    ....
    bollinger_bands:
        - enabled: false
    ohlcv:
        - enabled: true
          signal:
            - high
            - low
            - close
          candle_period: 1h
          period_count: 14
        - enabled: true
          signal:
            - high
            - low
            - close
          candle_period: 4h
          period_count: 14

Candlestick Pattern Recognition - candle_recognition

Uses TA-LIB for candlestick pattern recognition https://github.com/mrjbq7/ta-lib

  • Set up signal for all candle patterns you want to check.
  • Set up candle_check for how many candles you want to check. (default = 1 = checks last candle for pattern) For example your bot runs every 4 hours, but you want to check the candles of 1 hour, you can set it to trigger if the pattern happened on the last 4 candles
  • Set up notification for what kind of notification you want when triggered, depending on what candle you check for. (default = hot)
  • Possible to enable coloring on candle chart: allows for 5 different candles, priority coloring from up to down
  • Candle_check allows for checking multiple candles for a pattern. [1=last candle, 2=last 2 candles etc] For example, if the program runs every 4 hours but you setup a candle recognition for 1 hour you can get a notification if there was a candle found in the last 4 candles by setting candle_check:4.
possible signals
'two_crows': talib.CDLTRISTAR
'three_black_crows': talib.CDL3BLACKCROWS
'three_inside_up_down': talib.CDL3INSIDE
'three_line_strike': talib.CDL3LINESTRIKE
'thee_stars_in_the_south': talib.CDL3OUTSIDE
'three_advancing_white_soldiers': talib.CDL3WHITESOLDIERS
'abandoned_baby': talib.CDLABANDONEDBABY
'advance_block': talib.CDLADVANCEBLOCK
'belt_hold': talib.CDLADVANCEBLOCK
'breakaway': talib.CDLBREAKAWAY
'closing_marubozu': talib.CDLCLOSINGMARUBOZU
'concealing_baby_swallow': talib.CDLCONCEALBABYSWALL
'counterattack': talib.CDLCOUNTERATTACK
'dark_cloud_cover': talib.CDLDARKCLOUDCOVER
'doji': talib.CDLDOJI
'doji_star': talib.CDLDOJISTAR
'dragonfly_doji': talib.CDLDRAGONFLYDOJI
'engulfing_pattern': talib.CDLENGULFING
'evening_doji_star': talib.CDLEVENINGDOJISTAR
'evening_star': talib.CDLEVENINGSTAR
'gap_sidesidewhite': talib.CDLGAPSIDESIDEWHITE
'gravestone_doji': talib.CDLGRAVESTONEDOJI
'hammer': talib.CDLHAMMER
'hanging_man': talib.CDLHANGINGMAN
'harami_pattern': talib.CDLHARAMI
'harami_cross_patern': talib.CDLHARAMICROSS
'high_wave_candle': talib.CDLHIGHWAVE
'modified_hikkake_pattern': talib.CDLHIKKAKEMOD
'homing_pigeon': talib.CDLHOMINGPIGEON
'identical_three_crows': talib.CDLIDENTICAL3CROWS
'in_neck_pattern': talib.CDLINNECK
'inverted_hammer': talib.CDLINVERTEDHAMMER
'kicking': talib.CDLKICKING
'kicking_bb': talib.CDLKICKINGBYLENGTH
'ladder_bottom': talib.CDLLADDERBOTTOM
'long_legged_doji': talib.CDLLONGLEGGEDDOJI
'long_line_candle': talib.CDLLONGLINE
'marubozu': talib.CDLMARUBOZU
'matching_low': talib.CDLMATCHINGLOW
'mat_hold': talib.CDLMATHOLD
'morning_doji_star': talib.CDLMORNINGDOJISTAR
'morning_star': talib.CDLMORNINGSTAR
'on_neck_pattern': talib.CDLONNECK
'piercing_pattern': talib.CDLPIERCING
'rickshaw_man': talib.CDLRICKSHAWMAN
'risfall_three_methods': talib.CDLRISEFALL3METHODS
'seperating_lines': talib.CDLSEPARATINGLINES
'shooting_star': talib.CDLSHOOTINGSTAR
'short_line_candle': talib.CDLSHORTLINE
'spinning_top': talib.CDLSPINNINGTOP
'stalled_pattern': talib.CDLSTALLEDPATTERN
'stick_sandwich': talib.CDLSTICKSANDWICH
'takuri': talib.CDLTAKURI
'tasuki_gap': talib.CDLTASUKIGAP
'thrusting_pattern': talib.CDLTHRUSTING
'tristar_pattern': talib.CDLTRISTAR
'unique_three_river': talib.CDLUNIQUE3RIVER
'upside_gap_two_crows': talib.CDLUPSIDEGAP2CROWS
'xside_gap_three_methods': talib.CDLXSIDEGAP3METHODS
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

Aroon Oscillator - aroon_oscillator

The Aroon Oscillator is the difference between Aroon-Up and Aroon-Down. These two indicators are usually plotted together for easy comparison, but chartists can also view the difference between these two indicators with the Aroon Oscillator. This indicator fluctuates between -100 and +100 with zero as the middle line. An upward trend bias is present when the oscillator is positive, while a downward trend bias exists when the oscillator is negative.

The Aroon Oscillator is positive AND daily volume was above the (default)50-day moving average of volume = hot notification The Aroon Oscillator is negative AND daily volume was above the (default)50-day moving average of volume = cold notification

Periods in example are the default values

indicators:
  aroon_oscillator:
    - enabled: true
      alert_enabled: true
      alert_frequency: always
      sma_vol_period = 50
      period_count = 25
      signal:
        - aroon
      candle_period: 1d
      hot: 0
      cold: 0

Klinger Oscillator - klinger_oscillator

The Klinger oscillator (kvo) was developed by Stephen Klinger to determine the long-term trend of money flow while remaining sensitive enough to detect short-term fluctuations. The indicator compares the volume flowing through a security with the security's price movements and then converts the result into an oscillator. The Klinger oscillator shows the difference between two moving averages which are based on more than price. Traders watch for divergence on the indicator to signal potential price reversals. Like other oscillators, a signal line can be added to provide additional trade signals.

If klinger signal line (kvo_signal) > 0 AND mean price is moving up from last candle = hot notification If klinger signal line (kvo_signal) < 0 AND mean price is moving down from last candle = cold notification mean price = (high + low + close) / 3

Periods in example are the default values

indicators:
  klinger_oscillator:
    - enabled: true
      alert_enabled: true
      alert_frequency: always
      ema_short_period = 34
      ema_long_period = 55
      signal_period = 13
      signal:
        - kvo
        - kvo_signal
      candle_period: 1d

Average Directional Index - adx

The Average Directional Movement Index (ADX) is designed to quantify trend strength by measuring the amount of price movement in a single direction. ADX is non-directional; it registers trend strength whether price is trending up or down The ADX is part of the Directional Movement system published by J. Welles Wilder, and is the average resulting from the Directional Movement indicators. ADX calculations are based on a moving average of price range expansion over a given period of time. The default setting is 14 bars, although other time periods can be used. When the +DMI(pdi) is above the -DMI(ndi), prices are moving up, and ADX measures the strength of the uptrend. When the -DMI(ndi) is above the +DMI(pdi), prices are moving down, and ADX measures the strength of the downtrend.

0-25 absent or weak trend 25-50 strong trend 50-75 very strong trend 75-100 extremely strong trend

indicators:
  adx:
    - enabled: true
      alert_enabled: true
      alert_frequency: always
      signal:
        - adx
        - pdi
        - ndi
      hot: 50
      cold: 25
      candle_period: 1d
      period_count: 14

Increase In Volume indicator - iiv

There is a new indicator called "iiv" enabled for default for 5m period. The hot value is 5 by default, you can adjust it as you want, may be 10 o 15. This value is a measure about how strong is the increase in volume.

The main idea is to try to identify a possible pump or dump.

indicators:
  iiv:
    - enabled: true
      alert_enabled: true
      alert_frequency: always
      signal:
        - iiv
      hot: 5
      cold: 0
      candle_period: 5m

If you don't want to receive such notifications just disable the iiv indicator in your config file.

indicators:
  iiv:
    - enabled: false
      candle_period: 5m

Of course, this indicator can be used in other candle periods, 15m, 1h.. etc.

Moving Average Ribbon

First, read the following link to know about what it is: https://www.investopedia.com/terms/m/movingaverageribbon.asp

Second, the code used to implement this indicator was taken from another proyect called pyktrader2. It is not my own and therefore I don't know the details about how this indicator works, so what I comment below is what I think it is.

indicators:
    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: 15m
          pval_th: 20
          ma_series: 5, 15, 25, 35, 45

The "corr" value changes from -100 to 100. When corr starts increasing from 0 to 100 we talk of an possible Uptrend, when corr goes from 0 to -100 we are entering in a Downtrend. The "hot" and "cold" values in config file are associated with such corr.

To confirm the change in trend, the "pval" is used. This value changes from 0 to 100, but, when this value approaches 0 it confirms the signal given by corr.

The "ma_series" config value is used to set the moving averages that will be used by the indicator.

Moving Average Crossover

It is a new indicator created with the idea of making the configuration of MA crossovers simpler and clearer. It is called "ma_crossover" and is configured into "indicators" section.

indicators:
    ma_crossover:
        - enabled: true
          candle_period: 1h
          alert_enabled: true
          alert_frequency: once
          exponential: true
          ma_fast: 50
          ma_slow: 100
          signal:
            - open
            - close
          hot_label: 'Uptrend is coming'
          cold_label: 'Downtred is coming'
          indicator_label: 'EMA 50/100 Cross'

The three basic values to configure are "exponential", "ma_slow" and "ma_fast". The "exponential" value is a true/false value indicating when to use Exponential Moving Average. If false, Simple Moving Average will be used.

"ma_fast" is the number of periods to use for the fast line, and "ma_slow" is the number of periods to use for the slow line.

"signal" isn't really a meaning value for this indicator, but we have to set something because the code base requires that parameter for all indicators. So we can simply set some ohlcv value to avoid an error config.

Bollinger

It is a new indicator created to easily get alerts when the close price crosses the Up/Low bands calculated for the Bollinger Bands. It is different of the Bollinger informant, and therefore it is configured in the "indicators" section.

indicators:
    bollinger:
        - enabled: true
          candle_period: 1h
          alert_enabled: true
          alert_frequency: once
          period_count: 20
          std_dev: 2
          signal:
            - low_band
            - close
            - up_band
          hot_label: 'Lower Band'
          cold_label: 'Upper Band'
          indicator_label: 'Bollinger Crossing'
          mute_cold: false

The most important config is the number of standar deviations to use. Tipically values are 2 and 1.

Percent B (%B)

The Percent B indicator reflects closing price as a percentage of the lower and upper Bollinger Bands. The idea is almost the same as Bollinger indicator, to get alerts when the close price crosses the Up/Low bands.

indicators:
    bbp:
        - enabled: true
          candle_period: 1h
          alert_enabled: true
          alert_frequency: once
          period_count: 20
          hot: 0
          cold: 0.8  
          std_dev: 2
          signal:
            - bbp
            - mfi
          hot_label: 'Lower Band'
          cold_label: 'Upper Band'
          indicator_label: 'Bollinger Crossing'
          mute_cold: false

MACD Cross

The existing "macd" indicator always sends hot signals when the macd > 0, and cold signals when macd < 0. I repeat, always. Perhaps this is not the desired behavior and you only want to receive notifications when macd crosses the signal line, then this new MACD Cross indicator is the appropriate.

indicators:
  macd_cross:
    - enabled: true
      candle_period: 4h
      alert_enabled: true
      alert_frequency: always
      signal:
        - macd
        - signal
      hot_label: 'Uptrend is coming'
      cold_label: 'Downtred is coming'
      indicator_label: 'MACD Cross 4h'
      mute_cold: false

StochRSI Cross

This indicator is useful if you are interested in knowing when smooth K line crosses the smooth D line of the StochRSI. Unlike the StochRSI indicator, this new indicator allows you to set values ​​for K and D.

indicators:
  stochrsi_cross:
    - enabled: true
      candle_period: 4h
      alert_enabled: true
      alert_frequency: always
      smooth_k: 10
      smooth_d: 3
      signal:
        - stoch_rsi
        - smooth_k
        - smooth_d
      hot_label: 'Uptrend is coming'
      cold_label: 'Downtred is coming'
      indicator_label: 'StochRSI Cross 4h'
      mute_cold: false

Squeeze Momentum Indicator

It is a volatility and momentum indicator which capitalizes on the tendency for price to break out strongly after consolidating in a tight trading range.

The volatility component measures price compression using Bollinger Bands and Keltner Channels. If the Bollinger Bands are completely enclosed within the Keltner Channels, that indicates a period of very low volatility. This state is known as the squeeze. When the Bollinger Bands expand and move back outside of the Keltner Channel, the squeeze is said to have “fired”: volatility increases and prices are likely to break out of that tight trading range in one direction or the other. The on/off state of the squeeze is shown with small dots on the zero line of the indicator: red dots indicate the squeeze is on, and green dots indicate the squeeze is off.

For more details: https://www.tradingview.com/script/nqQ1DT5a-Squeeze-Momentum-Indicator-LazyBear/

indicators:
  sqzmom:
    - enabled: true
      alert_enabled: true
      alert_frequency: once
      candle_period: 1d
      signal:
        - close    

Chart images on webhook

The config for a webhook notifier is the same as original CryptoSignal, no changes here, BUT the data sent in the request is completely different.

notifiers:
    telegram:
        required:
            token: 791615820:AAGFgGSumWUrb-CyXtGxzAuY7UPxxxxx
            chat_id: 687957000
        optional:
            parse_mode: html
            template: "[{{indicator_label}}] {{market}} {{values}}, Prices: [{{prices}}]" 
    webhook:
        required:
            url: http://somename.or.ip.here:8888/someuri
        optional:
            username: null
            password: null    

Then in your webhook you will have a parameter "messages" which is a list/array of the notification messages in form of string values. Apply a json decode to access all values. In python pseudo code:

msg = self.get_argument('messages')
print ( json.loads(msg) )
        
[{'values': {'rsi': '84.20'}, 'exchange': 'binance', 'market': 'VET/USDT', 'base_currency': 'VET', 'quote_currency': 'USDT', 'indicator': 'rsi', 'indicator_number': 0, 'analysis': {'config': {'enabled': True, 'alert_enabled': True, 'alert_frequency': 'always', 'signal': ['rsi'], 'hot': 40, 'cold': 60, 'candle_period': '15m', 'period_count': 13}, 'status': 'cold'}, 'status': 'cold', 'last_status': 'cold', 'creation_date': '2019-01-04 15:31:40', 'indicator_label': 'rsi 15m'}]

If you have enable_charts: true, you will have a parameter "chart" in the same way of a HTTP file upload. Reading this file depends 100% in your backend. Example python pseudo code to save the received chart:

    fileinfo = self.request.files['chart'][0]
        
    print ("filename is " , fileinfo['filename'], ', content_type: ', fileinfo['content_type'])

    fname = fileinfo['filename']
    extn = os.path.splitext(fname)[1]
    cname = str(uuid.uuid4()) + extn
    fh = open(__UPLOADS__ + cname, 'wb')
    fh.write(fileinfo['body'])

Ichimoku

The default ichimoku strategy is replaced with TK cross and future cross. You can either select one of them or both. If you choose both, you will receive a signal when a TK cross or future cross happens.

indicators:
    ichimoku:
        - enabled: true
          alert_enabled: true
          alert_frequency: once
          signal:
            - leading_span_a
            - leading_span_b
            - tenkansen
            - kijunsen
          hot: true
          cold: true
          hot_label: 'Uptrend is coming'
          cold_label: 'Downtred is coming'
          candle_period: 4h
          indicator_label: 'Ichimoku'

If you want to add your own strategy, you could add your strategy to app/user_data/strategies folder (if it doesn't exist, create one). The name of your strategy should be the same name as the class name. Your custom strategy should use te following template:

class <name of your strategy>:
    def analyze(ichimoku_values, dataframe):
        """Custom Ichimoku strategy

        Args:               
            ichimoku_values (list, optional): historical list containg 'leading_span_a', 'leading_span_b', 'tenkansen', 'kijunsen' and 'chikou_span'
            dataframe (float, optional): historical pandas dataframe containing 'timestamp', 'open', 'high', 'low', 'close' and 'volume' 

        Returns:
            is_hot, is_cold: A dataframe containing the indicators and hot/cold values.
        """

        return is_hot, is_cold

Then in your config.yaml, add the custom_strategy property, this will override the default behavior.

indicators:
    ichimoku:
        - enabled: true
          custom_strategy: <name of your strategy>
          alert_enabled: true
          alert_frequency: once
          signal:
            - leading_span_a
            - leading_span_b
            - tenkansen
            - kijunsen
            - chikou_span
          hot: true
          cold: true
          hot_label: 'Uptrend is coming'
          cold_label: 'Downtred is coming'
          candle_period: 4h
          indicator_label: 'Ichimoku'

Example of a custom strategy:

class CustomStrategy:
    def analyze(ichimoku_values, dataframe):
        date = dataframe.index[-1]
        leading_span_date = ichimoku_values.index[-1]

        tk_cross_hot = ichimoku_values['tenkansen'][date] > ichimoku_values['kijunsen'][date]
        cloud_breakout_hot = dataframe['close'][date] > ichimoku_values['leading_span_a'][date]
        price_hot = dataframe['close'][date] > ichimoku_values['kijunsen'][date]
        
        is_hot = tk_cross_hot and price_hot and cloud_breakout_hot

        tk_cross_cold = ichimoku_values['tenkansen'][date] < ichimoku_values['kijunsen'][date]
        cloud_breakout_cold = dataframe['close'][date] < ichimoku_values['leading_span_a'][date]
        price_cold = dataframe['close'][date] < ichimoku_values['kijunsen'][date]

        is_cold = tk_cross_cold and price_cold and cloud_breakout_cold

        return is_hot, is_cold

Custom Hot/Cold labels

Setting a custom text for the "hot" or "cold" signals allows to have a really cool notification message.

indicators:
    rsi:
        - enabled: true
          alert_enabled: true
          alert_frequency: always
          signal:
            - rsi
          hot: 40
          cold: 60
          hot_label: We Are In Oversold!
          cold_label: Attention! Overbought!
          candle_period: 1h
          period_count: 13

So, in the message template the "hot_cold_label" variable will have one of the two possible values.

template: "[{{indicator_label}}] **{{hot_cold_label}}** {{market}}  Prices: [{{prices}}]"  

Price Values

To use this feature it is necessary to configure "ohlcv" informant for each candle period of your indicators. For example, this config is used to get High, Low and Close prices for 1h and 4h indicators.

informants:
    ....
    bollinger_bands:
        - enabled: false
    ohlcv:
        - enabled: true
          signal:
            - high
            - low
            - close
          candle_period: 1h
          period_count: 14
        - enabled: true
          signal:
            - high
            - low
            - close
          candle_period: 4h
          period_count: 14  

Then you can use the "price_value" variable to have the values of prices and be able to do some operations on them.

notifiers:
    telegram:
        required:
            token: 580514307:AAETsNsxs4QCdyEZ59vVROLlBxxxxx
            chat_id: 2073900000
        optional:
            parse_mode: html
            template: "{{ market }} 
            BUY {{ price_value['1h'].close }} 
            SL: {{ decimal_format|format(price_value['4h'].low * 0.9) }} 
            TP: {{ decimal_format|format(price_value['1h'].close * 1.02) }} {{ decimal_format|format(price_value['4h'].close * 1.04) }} "

The code for "decimal_format" and "format" is necessary to obtain the prices formatted with the corresponding zeros.

crypto-signal's People

Contributors

andreilys avatar aneesv avatar arjenbrandenburgh avatar cgmckeever avatar chamoda avatar cristian-codorean avatar december-soul avatar decharel avatar derblub avatar htotoo avatar ikwtif avatar incontestableness avatar jpstrydom avatar jrbartola avatar laliux avatar lukemilby avatar mkondel avatar randomshinichi avatar szollo avatar tommuhm avatar w1ld3r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

crypto-signal's Issues

[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

[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

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

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

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!

setup help

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

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

[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

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

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?

[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

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

[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

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

[HELP] Getting AttributeError

why i alway getting

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

I use the example config in config.md

[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

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

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

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?

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

[HELP] ABOUT CONDITIONAL

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

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

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

[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] 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".

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.

support request :)

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

Best regards

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

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.

[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

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.