mikekonan / exchange-proxy

exchange-proxy
GNU General Public License v3.0
110 stars 32 forks source link

Issue with Volatility filter #30

Closed jameslewisuk closed 9 months ago

jameslewisuk commented 2 years ago

Hi Mike

There still seems to be an issue with the Volatility filter when running through the proxy. I updated to v1.2.0 e536fc2 today (seemed to be working OK with v1.0.12 previously)

I made an updated version of the VolatilityFilter to use hours (1h) instead of days (1d) The VolatilityFilterHours works OK with anything up to 48 lookback hours, but anything over that just filters out every pair with nan

If I run without the proxy (or back to v1.0.12) it works OK.

2021-12-29 13:47:49,913 - VolatilityFilterHours - INFO - Removed WAXP/USDT from whitelist, because volatility over 49 hours is: nan which is not in the configured range of 0.02-0.75. 2021-12-29 13:47:49,914 - VolatilityFilterHours - INFO - Removed PBX/USDT from whitelist, because volatility over 49 hours is: nan which is not in the configured range of 0.02-0.75. 2021-12-29 13:47:49,915 - VolatilityFilterHours - INFO - Removed ANC/USDT from whitelist, because volatility over 49 hours is: nan which is not in the configured range of 0.02-0.75. 2021-12-29 13:47:49,916 - VolatilityFilterHours - INFO - Removed LTO/USDT from whitelist, because volatility over 49 hours is: nan which is not in the configured range of 0.02-0.75. Pairs for USDT: []

        "method": "VolatilityFilterHours",
        "lookback_hours": 49,
        "min_volatility": 0.02,
        "max_volatility": 0.75,
        "refresh_period": 1800

Perhaps the proxy is only getting the last 2 days of 1h data? Let me know if you need any more info

mikekonan commented 2 years ago

Hello, have you overridden candles count or used the default one?

jameslewisuk commented 2 years ago

Thanks for your reply. Everything on default when issue occurs

mikekonan commented 2 years ago

Will investigate it later, thanks for the report

jameslewisuk commented 2 years ago

Many thanks, let me know if you need any more info or help with testing the fix.

xmflsct commented 2 years ago

I also have issue with this filter. It seems like it is either not return data or returning all 4 days somehow. I need to restart the proxy for it to work again.

mikekonan commented 2 years ago

I'm not having this issue, but as a guess, I will do some minor updates, but it will be really helpful if you will start proxy with verbose 1 flag and provide me the output of getting candles requests.