How RSI Works
RSI (Relative Strength Index) is a momentum indicator that measures the speed and magnitude of recent price changes.
What is RSI?
RSI oscillates between 0 and 100:
- Below 30: Generally considered oversold (potentially undervalued)
- Above 70: Generally considered overbought (potentially overvalued)
- 30-70: Neutral territory
How SillySwap Calculates RSI
We use the 14-day RSI calculated from Hyperliquid's daily candles:
- Fetch the last 15 daily candles (close prices)
- Calculate price changes between each day
- Separate gains and losses
- Apply exponential moving average (Wilder's smoothing)
- Calculate RS = Average Gain / Average Loss
- RSI = 100 - (100 / (1 + RS))
The Buy Formula
Buy % = (Overbought - RSI) × 2.5
With default overbought = 70:
| RSI | Calculation | Buy % |
|---|---|---|
| 20 | (70-20) × 2.5 | 125% → capped at 100% |
| 30 | (70-30) × 2.5 | 100% |
| 50 | (70-50) × 2.5 | 50% |
| 60 | (70-60) × 2.5 | 25% |
| 70 | (70-70) × 2.5 | 0% (skip) |
| 80 | (70-80) × 2.5 | -25% → 0% (skip) |
Why RSI-Based DCA?
Traditional DCA buys the same amount regardless of price. RSI-based DCA:
- Buys more when the asset is likely undervalued
- Buys less or skips when potentially overvalued
- Averages down more aggressively during dips
RSI Limitations
RSI is not a crystal ball:
- Oversold doesn't guarantee a bounce
- Overbought doesn't guarantee a drop
- Works best as one factor among many
That said, it's a proven way to systematically buy dips without emotional decision-making.
Custom Thresholds
You can adjust the RSI thresholds in strategy settings:
- More aggressive: Lower overbought (e.g., 60) = buy on smaller dips
- More conservative: Higher oversold (e.g., 35) = only buy deep dips