Skip to main content

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:

  1. Fetch the last 15 daily candles (close prices)
  2. Calculate price changes between each day
  3. Separate gains and losses
  4. Apply exponential moving average (Wilder's smoothing)
  5. Calculate RS = Average Gain / Average Loss
  6. RSI = 100 - (100 / (1 + RS))

The Buy Formula

Buy % = (Overbought - RSI) × 2.5

With default overbought = 70:

RSICalculationBuy %
20(70-20) × 2.5125% → capped at 100%
30(70-30) × 2.5100%
50(70-50) × 2.550%
60(70-60) × 2.525%
70(70-70) × 2.50% (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