Closed ppovedam closed 2 years ago
can you cek this one
https://github.com/w1ld3r/crypto-signal/issues/41#issuecomment-898749339
can you cek this one
Thanks, shiftcryptomyid, but I've tried with config.yml proposed in issues 8, 23 and 41 that are supposed to work but when I use conditionals crypto-singal still doesn't send notifications. I use w1ld3r branch
try this config.. i use it to try conditional and its work.. use webhook notifier
settings:
log_level: INFO
update_interval: 900
start_worker_interval: 15
market_data_chunk_size: 1
exchanges:
binance:
required:
enabled: true
all_pairs:
- USDT
#- BTC
future: true
exclude:
- USDC
- PAX
- BUSD
- TUSD
- EUR
- SUSD
- GBP
- UTK
indicators:
bbp:
- enabled: true
candle_period: 3m
alert_enabled: true
alert_frequency: always
period_count: 20
hot: 0
cold: 0
std_dev: 2
signal:
- bbp
- mfi
hot_label: 'Lower Band'
cold_label: 'Upper Band'
indicator_label: 'Bollinger Crossing'
mute_cold: false
ma_crossover:
- enabled: false
stoch_rsi:
- enabled: false
adx:
- enabled: true
alert_enabled: true
alert_frequency: always
signal:
- adx
- pdi
- ndi
hot: 25
cold: 25
candle_period: 3m
period_count: 14
- enabled: true
alert_enabled: true
alert_frequency: always
signal:
- adx
- pdi
- ndi
hot: 25
cold: 25
candle_period: 1m
period_count: 14
- enabled: true
alert_enabled: true
alert_frequency: always
signal:
- adx
- pdi
- ndi
hot: 25
cold: 25
candle_period: 5m
period_count: 14
- enabled: true
alert_enabled: true
alert_frequency: always
signal:
- adx
- pdi
- ndi
hot: 25
cold: 25
candle_period: 15m
period_count: 14
- enabled: true
alert_enabled: true
alert_frequency: always
signal:
- adx
- pdi
- ndi
hot: 25
cold: 25
candle_period: 30m
period_count: 14
- enabled: true
alert_enabled: true
alert_frequency: always
signal:
- adx
- pdi
- ndi
hot: 25
cold: 25
candle_period: 1h
period_count: 14
rsi:
- enabled: true
alert_enabled: true
alert_frequency: always
signal:
- rsi
hot: 50
cold: 50
candle_period: 3m
period_count: 14
mute_cold: false
- enabled: true
alert_enabled: true
alert_frequency: always
signal:
- rsi
hot: 50
cold: 50
candle_period: 1m
period_count: 14
mute_cold: false
- enabled: true
alert_enabled: true
alert_frequency: always
signal:
- rsi
hot: 50
cold: 50
candle_period: 5m
period_count: 14
mute_cold: false
- enabled: true
alert_enabled: true
alert_frequency: always
signal:
- rsi
hot: 50
cold: 50
candle_period: 15m
period_count: 14
mute_cold: false
- enabled: true
alert_enabled: true
alert_frequency: always
signal:
- rsi
hot: 50
cold: 50
candle_period: 30m
period_count: 14
mute_cold: false
- enabled: true
alert_enabled: true
alert_frequency: always
signal:
- rsi
hot: 50
cold: 50
candle_period: 1h
period_count: 14
mute_cold: false
stochrsi_cross:
- enabled: false
momentum:
- enabled: false
macd:
- enabled: false
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: false
vwap:
- enabled: false
bollinger_bands:
- enabled: false
ohlcv:
- enabled: true
signal:
- high
- low
- close
candle_period: 1m
period_count: 14
conditionals:
-label: "Signal to buy"
hot:
- bbp: 0
- rsi: 0
- rsi: 1
- rsi: 2
- rsi: 3
- rsi: 4
- rsi: 5
- adx: 0
- adx: 1
- adx: 2
- adx: 3
- adx: 4
- adx: 5
-label: "Signal to sell"
cold:
- bbp: 0
- rsi: 0
- rsi: 0
- rsi: 1
- rsi: 2
- rsi: 3
- rsi: 4
- rsi: 5
- adx: 0
- adx: 1
- adx: 2
- adx: 3
- adx: 4
- adx: 5
notifiers:
webhook:
required:
url: https://shiftcrypto.my.id/newtest/newfuture1.php
optional:
username:
password:
its take some time and i got this data
[{"values": [{"rsi": "54.91"}, {"rsi": "54.91"}, {"bbp": "0.69", "mfi": "54.07"}, {"adx": "13.65", "pdi": "594.27", "ndi": "552.72"}, {"rsi": "50.64"}, {"adx": "18.71", "pdi": "447.95", "ndi": "437.19"}, {"rsi": "58.68"}, {"adx": "22.75", "pdi": "346.47", "ndi": "269.12"}, {"rsi": "61.18"}, {"adx": "20.64", "pdi": "1125.73", "ndi": "869.02"}, {"rsi": "57.98"}, {"adx": "15.80", "pdi": "1265.89", "ndi": "832.03"}, {"rsi": "55.94"}, {"adx": "12.27", "pdi": "2053.54", "ndi": "1663.40"}], "indicator": ["rsi", "rsi", "bbp", "adx", "rsi", "adx", "rsi", "adx", "rsi", "adx", "rsi", "adx", "rsi", "adx"], "price_value": {"3m": {}, "1m": {"high": 0.10292, "low": 0.10277, "close": 0.10288}, "5m": {}, "15m": {}, "30m": {}, "1h": {}}, "exchange": "binance", "market": "RVN/USDT", "base_currency": "RVN", "quote_currency": "USDT", "prices": "", "decimal_format": "%.5f", "status": "Signal to sell"}]
try this config.. i use it to try conditional and its work.. use webhook notifier
settings: log_level: INFO update_interval: 900 start_worker_interval: 15 market_data_chunk_size: 1
exchanges:
binance: required: enabled: true all_pairs: - USDT #- BTC future: true exclude: - USDC - PAX - BUSD - TUSD - EUR - SUSD - GBP - UTK
indicators:
bbp: - enabled: true candle_period: 3m alert_enabled: true alert_frequency: always period_count: 20 hot: 0 cold: 0 std_dev: 2 signal: - bbp - mfi hot_label: 'Lower Band' cold_label: 'Upper Band' indicator_label: 'Bollinger Crossing' mute_cold: false ma_crossover: - enabled: false stoch_rsi: - enabled: false adx: - enabled: true alert_enabled: true alert_frequency: always signal: - adx - pdi - ndi hot: 25 cold: 25 candle_period: 3m period_count: 14 - enabled: true alert_enabled: true alert_frequency: always signal: - adx - pdi - ndi hot: 25 cold: 25 candle_period: 1m period_count: 14 - enabled: true alert_enabled: true alert_frequency: always signal: - adx - pdi - ndi hot: 25 cold: 25 candle_period: 5m period_count: 14 - enabled: true alert_enabled: true alert_frequency: always signal: - adx - pdi - ndi hot: 25 cold: 25 candle_period: 15m period_count: 14 - enabled: true alert_enabled: true alert_frequency: always signal: - adx - pdi - ndi hot: 25 cold: 25 candle_period: 30m period_count: 14 - enabled: true alert_enabled: true alert_frequency: always signal: - adx - pdi - ndi hot: 25 cold: 25 candle_period: 1h period_count: 14 rsi: - enabled: true alert_enabled: true alert_frequency: always signal: - rsi hot: 50 cold: 50 candle_period: 3m period_count: 14 mute_cold: false - enabled: true alert_enabled: true alert_frequency: always signal: - rsi hot: 50 cold: 50 candle_period: 1m period_count: 14 mute_cold: false - enabled: true alert_enabled: true alert_frequency: always signal: - rsi hot: 50 cold: 50 candle_period: 5m period_count: 14 mute_cold: false - enabled: true alert_enabled: true alert_frequency: always signal: - rsi hot: 50 cold: 50 candle_period: 15m period_count: 14 mute_cold: false - enabled: true alert_enabled: true alert_frequency: always signal: - rsi hot: 50 cold: 50 candle_period: 30m period_count: 14 mute_cold: false - enabled: true alert_enabled: true alert_frequency: always signal: - rsi hot: 50 cold: 50 candle_period: 1h period_count: 14 mute_cold: false stochrsi_cross: - enabled: false momentum: - enabled: false macd: - enabled: false 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: false vwap: - enabled: false bollinger_bands: - enabled: false ohlcv: - enabled: true signal: - high - low - close candle_period: 1m period_count: 14
conditionals:
-label: "Signal to buy" hot:
- bbp: 0
- rsi: 0
- rsi: 1
- rsi: 2
- rsi: 3
- rsi: 4
- rsi: 5
- adx: 0
- adx: 1
- adx: 2
- adx: 3
- adx: 4
- adx: 5
-label: "Signal to sell" cold:
- bbp: 0
- rsi: 0
- rsi: 0
- rsi: 1
- rsi: 2
- rsi: 3
- rsi: 4
- rsi: 5
- adx: 0
- adx: 1
- adx: 2
- adx: 3
- adx: 4
- adx: 5
notifiers:
webhook: required: url: https://shiftcrypto.my.id/newtest/newfuture1.php optional: username: password:
its take some time and i got this data
[{"values": [{"rsi": "54.91"}, {"rsi": "54.91"}, {"bbp": "0.69", "mfi": "54.07"}, {"adx": "13.65", "pdi": "594.27", "ndi": "552.72"}, {"rsi": "50.64"}, {"adx": "18.71", "pdi": "447.95", "ndi": "437.19"}, {"rsi": "58.68"}, {"adx": "22.75", "pdi": "346.47", "ndi": "269.12"}, {"rsi": "61.18"}, {"adx": "20.64", "pdi": "1125.73", "ndi": "869.02"}, {"rsi": "57.98"}, {"adx": "15.80", "pdi": "1265.89", "ndi": "832.03"}, {"rsi": "55.94"}, {"adx": "12.27", "pdi": "2053.54", "ndi": "1663.40"}], "indicator": ["rsi", "rsi", "bbp", "adx", "rsi", "adx", "rsi", "adx", "rsi", "adx", "rsi", "adx", "rsi", "adx"], "price_value": {"3m": {}, "1m": {"high": 0.10292, "low": 0.10277, "close": 0.10288}, "5m": {}, "15m": {}, "30m": {}, "1h": {}}, "exchange": "binance", "market": "RVN/USDT", "base_currency": "RVN", "quote_currency": "USDT", "prices": "", "decimal_format": "%.5f", "status": "Signal to sell"}]
I didn't have time to test this config. I wil try tomorrow. Thank you.
If you have difficuties identifing the error in your config file, don't hesitate to add a log output to your issue
try this config.. i use it to try conditional and its work.. use webhook notifier
settings: log_level: INFO update_interval: 900 start_worker_interval: 15 market_data_chunk_size: 1 exchanges: binance: required: enabled: true all_pairs: - USDT #- BTC future: true exclude: - USDC - PAX - BUSD - TUSD - EUR - SUSD - GBP - UTK indicators: bbp: - enabled: true candle_period: 3m alert_enabled: true alert_frequency: always period_count: 20 hot: 0 cold: 0 std_dev: 2 signal: - bbp - mfi hot_label: 'Lower Band' cold_label: 'Upper Band' indicator_label: 'Bollinger Crossing' mute_cold: false ma_crossover: - enabled: false stoch_rsi: - enabled: false adx: - enabled: true alert_enabled: true alert_frequency: always signal: - adx - pdi - ndi hot: 25 cold: 25 candle_period: 3m period_count: 14 - enabled: true alert_enabled: true alert_frequency: always signal: - adx - pdi - ndi hot: 25 cold: 25 candle_period: 1m period_count: 14 - enabled: true alert_enabled: true alert_frequency: always signal: - adx - pdi - ndi hot: 25 cold: 25 candle_period: 5m period_count: 14 - enabled: true alert_enabled: true alert_frequency: always signal: - adx - pdi - ndi hot: 25 cold: 25 candle_period: 15m period_count: 14 - enabled: true alert_enabled: true alert_frequency: always signal: - adx - pdi - ndi hot: 25 cold: 25 candle_period: 30m period_count: 14 - enabled: true alert_enabled: true alert_frequency: always signal: - adx - pdi - ndi hot: 25 cold: 25 candle_period: 1h period_count: 14 rsi: - enabled: true alert_enabled: true alert_frequency: always signal: - rsi hot: 50 cold: 50 candle_period: 3m period_count: 14 mute_cold: false - enabled: true alert_enabled: true alert_frequency: always signal: - rsi hot: 50 cold: 50 candle_period: 1m period_count: 14 mute_cold: false - enabled: true alert_enabled: true alert_frequency: always signal: - rsi hot: 50 cold: 50 candle_period: 5m period_count: 14 mute_cold: false - enabled: true alert_enabled: true alert_frequency: always signal: - rsi hot: 50 cold: 50 candle_period: 15m period_count: 14 mute_cold: false - enabled: true alert_enabled: true alert_frequency: always signal: - rsi hot: 50 cold: 50 candle_period: 30m period_count: 14 mute_cold: false - enabled: true alert_enabled: true alert_frequency: always signal: - rsi hot: 50 cold: 50 candle_period: 1h period_count: 14 mute_cold: false stochrsi_cross: - enabled: false momentum: - enabled: false macd: - enabled: false 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: false vwap: - enabled: false bollinger_bands: - enabled: false ohlcv: - enabled: true signal: - high - low - close candle_period: 1m period_count: 14 conditionals: -label: "Signal to buy" hot: - bbp: 0 - rsi: 0 - rsi: 1 - rsi: 2 - rsi: 3 - rsi: 4 - rsi: 5 - adx: 0 - adx: 1 - adx: 2 - adx: 3 - adx: 4 - adx: 5 -label: "Signal to sell" cold: - bbp: 0 - rsi: 0 - rsi: 0 - rsi: 1 - rsi: 2 - rsi: 3 - rsi: 4 - rsi: 5 - adx: 0 - adx: 1 - adx: 2 - adx: 3 - adx: 4 - adx: 5 notifiers: webhook: required: url: https://shiftcrypto.my.id/newtest/newfuture1.php optional: username: password:
its take some time and i got this data
[{"values": [{"rsi": "54.91"}, {"rsi": "54.91"}, {"bbp": "0.69", "mfi": "54.07"}, {"adx": "13.65", "pdi": "594.27", "ndi": "552.72"}, {"rsi": "50.64"}, {"adx": "18.71", "pdi": "447.95", "ndi": "437.19"}, {"rsi": "58.68"}, {"adx": "22.75", "pdi": "346.47", "ndi": "269.12"}, {"rsi": "61.18"}, {"adx": "20.64", "pdi": "1125.73", "ndi": "869.02"}, {"rsi": "57.98"}, {"adx": "15.80", "pdi": "1265.89", "ndi": "832.03"}, {"rsi": "55.94"}, {"adx": "12.27", "pdi": "2053.54", "ndi": "1663.40"}], "indicator": ["rsi", "rsi", "bbp", "adx", "rsi", "adx", "rsi", "adx", "rsi", "adx", "rsi", "adx", "rsi", "adx"], "price_value": {"3m": {}, "1m": {"high": 0.10292, "low": 0.10277, "close": 0.10288}, "5m": {}, "15m": {}, "30m": {}, "1h": {}}, "exchange": "binance", "market": "RVN/USDT", "base_currency": "RVN", "quote_currency": "USDT", "prices": "", "decimal_format": "%.5f", "status": "Signal to sell"}]
I have tested your config.yml but it still does not work. I have created a webhook but only receives messages if I remove the conditionals
If you have difficuties identifing the error in your config file, don't hesitate to add a log output to your issue
Thanks w1ld3r, but I'm not sure how to do that. Terminal log?
How do your run the app ?
How do your run the app ?
I'm using docker run --rm -ti -v $PWD/app:/app dev/crypto-signals:latest in a terminal, but I have also tried with docker run --rm -di -v $PWD/app:/app dev/crypto-signals:latest
How do your run the app ? w1ld3r, find enclosed both the config (renamed as txt) and a test output.
How do your run the app ?
I'm using docker run --rm -ti -v $PWD/app:/app dev/crypto-signals:latest in a terminal, but I have also tried with docker run --rm -di -v $PWD/app:/app dev/crypto-signals:latest
So when you launch it using docker and -ti paramater, dont you see texte output ?
How do your run the app ?
I'm using docker run --rm -ti -v $PWD/app:/app dev/crypto-signals:latest in a terminal, but I have also tried with docker run --rm -di -v $PWD/app:/app dev/crypto-signals:latest
So when you launch it using docker and -ti paramater, dont you see texte output ?
Yes, I see text. I sent you some files in the last comment. I do not see any error.
Your confguration file is good. You are not receiving notification because the condition isn't triggered. To test, you can put stoch_rsi hot value at 100 and cold at 0 you will for sure trigger an alert.
Your confguration file is good. You are not receiving notification because the condition isn't triggered. To test, you can put stoch_rsi hot value at 100 and cold at 0 you will for sure trigger an alert.
I think the cause of the failure may be in the notification.py file. In the next section my computer always execute the "except" option (pass):
or msg in messages[candle_period]: for stat in status: if msg['status'] == stat: try: for indicator in condition[stat]: if msg['alert_frequency'] != 'once': should_alert += self.should_i_alert(''.join( [msg['market'], msg['values'][0], candle_period]), msg['alert_frequency']) if msg['indicator'] in indicator.keys(): if indicator[msg['indicator']] == msg['indicator_number']: new_message['values'].append( msg['values']) new_message['indicator'].append( msg['indicator']) c_nb_conditions += 1 if msg['last_status'] == msg['last_status'] and msg['analysis']['config']['alert_frequency'] == 'once' and not self.first_run: c_nb_once_muted += 1 if msg['last_status'] != msg['last_status']: c_nb_new_status += 1 except: pass
The problem is given by the syntax msg['alert_frequency'], which does not work on my computer. Is it probably because I am missing some library? To access 'alert_frequency' I need to put msg['analysis']['config'][alert_frequency']. The same happens with msg['values'][0], it doesn't work to access the value of the indicator. Any idea to solve the problem?
Can you check the new push ? Thanks a lot for your debug.
Can you check the new push ? Thanks a lot for your debug.
Thank you very much, w1ld3r, now it's working properly.
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:
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.