w1ld3r / crypto-signal

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

[BUG] - conditional not working properly #8

Closed bluetyphoon77 closed 3 years ago

bluetyphoon77 commented 3 years ago

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

Additional context none

bluetyphoon77 commented 3 years ago

You were asking what is my config, the one not working for conditionals, and you have it above ;) It was giving me false positives ;) like PCR tests ;) cheeers

w1ld3r commented 3 years ago

Hello @bluetyphoon77 , Here is the good config.yml to receive a notification if rsi and mfi is cold:

settings:
  log_level: INFO
  update_interval: 120
  start_worker_interval: 2
  market_data_chunk_size: 1
  timezone: Europe/Paris

exchanges:
  kraken:
    required:
      enabled: true
    all_pairs:
      - EUR
    exclude:
      - XBTEUR.d
      - ETHEUR.d
      - USDC
      - USDT
      - MLN

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
      - mfi: 0

notifiers:
    telegram:
        required:
            token: AAAA
            chat_id: AAAA
        optional:
            parse_mode: html
            template: "[{{market}}] {{indicator}} {{status}} {{values}} {{ '\n' -}}"

I've tested out and it's working. For example, I received this notification: [DOGE/EUR] ['mfi', 'rsi'] 2 CHECKMARKS for a GOOD sell (RSI/MFI) [{'mfi': '88.57'}, {'rsi': '77.25'}]

Beginning analysis of DOGE/EUR
DOGE/EUR:   

indicators: mfi #0: 88.57359392     rsi #0: 77.24757165     stoch_rsi #0: 100.00000000/100.00000000/100.00000000    
informants: ohlcv #0: 0.00373660    
crossovers:
w1ld3r commented 3 years ago

I've used my personal settings and exchanges for the test but with yours it should work.

bluetyphoon77 commented 3 years ago

ok thanks I will test it again and come back to you

bluetyphoon77 commented 3 years ago

Like I said it is not working.

I used these settings, like above

settings:
  log_level: INFO
  update_interval: 3600
  start_worker_interval: 2
  market_data_chunk_size: 1
  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
  bittrex:
    required:
      enabled: false
  huobipro:
    required:
      enabled: false
  hitbtc:
    required:
      enabled: false

notifiers:
    telegram:
        required:
            token: AAA
            chat_id: BBB
        optional:
            parse_mode: html
            template: "[{{market}}] {{indicator}} {{status}} {{values}} {{ '\n' -}}"

indicators:
    rsi:
        - enabled: true
          alert_enabled: true
          alert_frequency: always
          signal:
            - rsi
          hot: 40
          cold: 75
          hot_label: 'GOOD buy !'
          cold_label: 'GOOD sell !'
          indicator_label: 'RSI Daily'
          candle_period: 1d
          period_count: 14
          mute_hot: true

    mfi:
        - enabled: true
          alert_enabled: true
          alert_frequency: always
          signal:
            - mfi
          hot: 25
          cold: 75
          hot_label: 'GOOD buy !'
          cold_label: 'GOOD sell !'
          indicator_label: 'MFI Daily'
          candle_period: 1d
          period_count: 12
          mute_hot: true

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

informants:
    ohlcv:
        - enabled: false
    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

And I get for example this in telegram

[NAV/BTC] ['mfi'] 2 CHECKMARKS for a GOOD sell (RSI/MFI) [{'mfi': '81.24'}]

In command line the values are

Worker-3 sleeping for 3600 seconds enabled notifers: ['telegram'] Starting Worker-4 Starting default analyzer... Using the following exchange(s): ['binance'] Getting data for ['NAV/BTC'] Beginning analysis of binance Beginning analysis of NAV/BTC NAV/BTC:

indicators: mfi #0: 81.23759467 rsi #0: 43.49286623 informants: crossovers:

SO, I'm not supposed to get the notification since RSI is here 43 !! In my settings it is set to 75 as you can see

So there is a bug like I said before .... It seems to have a problem with the RSI. Saying it has reached value, since it show a conditional notif, but in fact it did not reached the value... cheeers

w1ld3r commented 3 years ago

In your config.yml set conditionals like below:

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

Great !!!! it works now !! Thanks a lot !!! :)

bluetyphoon77 commented 3 years ago

Great job ! :)