diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-02 09:44:43 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-02 09:44:43 +0900 |
| commit | b9d21e2e2f7ae096c2f8a01bb142a685683b5b90 (patch) | |
| tree | a031989228ded9ff1e6d47840124ea5dcc9a9a3c /services/strategy-engine/strategies/vwap_strategy.py | |
| parent | bb2e387f870495703fd663ca8f525028c3a8ced5 (diff) | |
feat: add market sentiment filters (Fear & Greed, CryptoPanic, CryptoQuant)
- SentimentProvider: fetches Fear & Greed Index (free, no key),
CryptoPanic news sentiment (free key), CryptoQuant exchange
netflow (free key)
- SentimentData: aggregated should_buy/should_block logic
- Fear < 30 = buy opportunity, Greed > 80 = block buying
- Negative news < -0.5 = block buying
- Exchange outflow = bullish, inflow = bearish
- Integrated into Asian Session RSI strategy as entry filter
- All providers optional — disabled when API key missing
- 14 sentiment tests + 386 total tests passing
Diffstat (limited to 'services/strategy-engine/strategies/vwap_strategy.py')
| -rw-r--r-- | services/strategy-engine/strategies/vwap_strategy.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/strategy-engine/strategies/vwap_strategy.py b/services/strategy-engine/strategies/vwap_strategy.py index 0348752..d64950e 100644 --- a/services/strategy-engine/strategies/vwap_strategy.py +++ b/services/strategy-engine/strategies/vwap_strategy.py @@ -110,7 +110,7 @@ class VwapStrategy(BaseStrategy): diffs = [tp - v for tp, v in zip(self._tp_values, self._vwap_values)] mean_diff = sum(diffs) / len(diffs) variance = sum((d - mean_diff) ** 2 for d in diffs) / len(diffs) - std_dev = variance ** 0.5 + std_dev = variance**0.5 deviation = (close - vwap) / vwap |
