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
78 stars 37 forks source link

[BUG] CANDLE PERIODE SENT WRONG DATA #43

Closed shiftcryptomyid closed 3 years ago

shiftcryptomyid commented 3 years ago

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

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

w1ld3r commented 3 years ago

The new push fix the issue if you are using conditional mode. Are you using the conditional functionnality ? (Link to the Conditional Doc)[https://github.com/w1ld3r/crypto-signal/blob/develop/docs/config.md#8-conditionals] If not please, create an issue on the original repo.

shiftcryptomyid commented 3 years ago

how to use the condional? in Doc [https://github.com/w1ld3r/crypto-signal/blob/develop/docs/config.md#8-conditionals] conditionals:

its just hot and cold.. if i want candle periode, what must i write.. candle_periode :1h candle_periode :4h or something else?

shiftcryptomyid commented 3 years ago

try with new push..

i found it maybe something wrong with std_crossover.. if indicator std_crossovercator i will get data:

[{"values":{"ema_0":"1.00","ema_1":"1.00"},"exchange":"binance","market":"PAX\/USDT","base_currency":"PAX","quote_currency":"USDT","indicator":"std_crossover","indicator_number":0,"analysis":{"config":{"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","candle_period":"ema0"},"status":"cold"},"status":"cold","last_status":"cold","prices":"","lrsi":"","creation_date":"2021-08-14 06:28:20","hot_cold_label":"","indicator_label":"","price_value":[],"decimal_format":"%.4f"}]

with the wrong "candle_period":"ema0" but if is other i get :

[{"values":{"rsi":"65.37"},"exchange":"binance","market":"ZEC\/USDT","base_currency":"ZEC","quote_currency":"USDT","indicator":"rsi","indicator_number":1,"analysis":{"config":{"enabled":true,"alert_enabled":true,"alert_frequency":"once","signal":["rsi"],"hot":100,"cold":0,"candle_period":"1h","period_count":14,"mute_cold":false},"status":"hot"},"status":"hot","last_status":"hot","prices":" High: 144.97 Low: 144.28 Close: 144.67","lrsi":"","creation_date":"2021-08-14 06:30:30","hot_cold_label":"","indicator_label":"","price_value":{"high":144.97,"low":144.28,"close":144.67},"decimal_format":"%.2f"}]

with the right "candle_period":"1h"

config.yml

settings:
    log_level: INFO
    update_interval: 600
    start_worker_interval: 10
    market_data_chunk_size: 1

exchanges:
    binance:
        required:
            enabled: true
        all_pairs:
            - USDT

indicators:
    bbp:
        - enabled: false
    ma_crossover:
        - enabled: false
    rsi:
        - enabled: true
          alert_enabled: true
          alert_frequency: once
          signal:
            - rsi
          hot: 100
          cold: 0
          candle_period: 15m 
          period_count: 14
          mute_cold: false
        - enabled: true
          alert_enabled: true
          alert_frequency: once
          signal:
            - rsi
          hot: 100
          cold: 0
          candle_period: 1h
          period_count: 14
          mute_cold: false
    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
    ma_ribbon:
        - enabled: false 
    iiv:
        - enabled: false
    obv:
        - enabled: false
    mfi:
        - enabled: false
    ichimoku:
        - enabled: false

informants:
    lrsi:
        - enabled: false
    sma:
        - enabled: false 
    ema:
        - enabled: true
          signal:
            - ema
          candle_period: 1d
          period_count: 10
        - enabled: true
          signal:
            - ema
          candle_period: 1d
          period_count: 30
    vwap:
        - enabled: false
    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: 15m
          period_count: 14  

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: cuanbot
            password: 
w1ld3r commented 3 years ago

how to use the condional? in Doc [https://github.com/w1ld3r/crypto-signal/blob/develop/docs/config.md#8-conditionals] conditionals:

* label: "Signal to buy"
  hot:

  * rsi: 0
  * rsi: 1
    cold:
  * bollinger: 0

* label: "Signal to buy"
  hot:

  * rsi: 1

* label: "Signal to sell"
  cold:

  * rsi: 1
  * rsi: 0
    hot:
  * aroon_oscillator: 0

its just hot and cold.. if i want candle periode, what must i write.. candle_periode :1h candle_periode :4h or something else?

Explain more clearly what do you want. For now, conditional notification is based on the signal (hot or cold).

w1ld3r commented 3 years ago

try with new push..

i found it maybe something wrong with std_crossover.. if indicator std_crossovercator i will get data:

[{"values":{"ema_0":"1.00","ema_1":"1.00"},"exchange":"binance","market":"PAX/USDT","base_currency":"PAX","quote_currency":"USDT","indicator":"std_crossover","indicator_number":0,"analysis":{"config":{"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","candle_period":"ema0"},"status":"cold"},"status":"cold","last_status":"cold","prices":"","lrsi":"","creation_date":"2021-08-14 06:28:20","hot_cold_label":"","indicator_label":"","price_value":[],"decimal_format":"%.4f"}]

with the wrong "candle_period":"ema0" but if is other i get :

[{"values":{"rsi":"65.37"},"exchange":"binance","market":"ZEC/USDT","base_currency":"ZEC","quote_currency":"USDT","indicator":"rsi","indicator_number":1,"analysis":{"config":{"enabled":true,"alert_enabled":true,"alert_frequency":"once","signal":["rsi"],"hot":100,"cold":0,"candle_period":"1h","period_count":14,"mute_cold":false},"status":"hot"},"status":"hot","last_status":"hot","prices":" High: 144.97 Low: 144.28 Close: 144.67","lrsi":"","creation_date":"2021-08-14 06:30:30","hot_cold_label":"","indicator_label":"","price_value":{"high":144.97,"low":144.28,"close":144.67},"decimal_format":"%.2f"}]

with the right "candle_period":"1h"

config.yml

settings:
    log_level: INFO
    update_interval: 600
    start_worker_interval: 10
    market_data_chunk_size: 1

exchanges:
    binance:
        required:
            enabled: true
        all_pairs:
            - USDT

indicators:
    bbp:
        - enabled: false
    ma_crossover:
        - enabled: false
    rsi:
        - enabled: true
          alert_enabled: true
          alert_frequency: once
          signal:
            - rsi
          hot: 100
          cold: 0
          candle_period: 15m 
          period_count: 14
          mute_cold: false
        - enabled: true
          alert_enabled: true
          alert_frequency: once
          signal:
            - rsi
          hot: 100
          cold: 0
          candle_period: 1h
          period_count: 14
          mute_cold: false
    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
    ma_ribbon:
        - enabled: false 
    iiv:
        - enabled: false
    obv:
        - enabled: false
    mfi:
        - enabled: false
    ichimoku:
        - enabled: false

informants:
    lrsi:
        - enabled: false
    sma:
        - enabled: false 
    ema:
        - enabled: true
          signal:
            - ema
          candle_period: 1d
          period_count: 10
        - enabled: true
          signal:
            - ema
          candle_period: 1d
          period_count: 30
    vwap:
        - enabled: false
    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: 15m
          period_count: 14  

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: cuanbot
            password: 

I'll take a look at this issue

shiftcryptomyid commented 3 years ago

how to use the condional? in Doc [https://github.com/w1ld3r/crypto-signal/blob/develop/docs/config.md#8-conditionals] conditionals:

* label: "Signal to buy"
  hot:

  * rsi: 0
  * rsi: 1
    cold:
  * bollinger: 0

* label: "Signal to buy"
  hot:

  * rsi: 1

* label: "Signal to sell"
  cold:

  * rsi: 1
  * rsi: 0
    hot:
  * aroon_oscillator: 0

its just hot and cold.. if i want candle periode, what must i write.. candle_periode :1h candle_periode :4h or something else?

Explain more clearly what do you want. For now, conditional notification is based on the signal (hot or cold).

ok i get it.. thank for answer

w1ld3r commented 3 years ago

@shiftcryptomyid For now, I'll not have time to look at this issue. So please create an issue on the master repo: https://github.com/CryptoSignal/Crypto-Signal As a reminder this is a fork for contional notification.