RSI Mean Reversion Strategy
Build a complete RSI-based mean reversion strategy from scratch. This step-by-step tutorial covers understanding RSI, designing the strategy logic, backtesting, analyzing results, and deploying to paper trading.
What You'll Build
A mean reversion strategy that buys when RSI is oversold (below 30) and sells when overbought (above 70). This classic approach profits from price bounces after extreme moves.
Time Required: 15-20 minutes
Strategy Overview
Strategy Type
Mean Reversion - profits from prices returning to average after extreme moves.
Indicator
RSI (Relative Strength Index) - measures momentum and identifies overbought/oversold conditions.
Entry Logic
Buy when RSI crosses below 30 (oversold), indicating potential bounce.
Exit Logic
Sell when RSI crosses above 70 (overbought) or price has reverted to mean.
Step 1: Understand RSI
Great News! RSI_14 is already calculated and ready to use in MangoLabs. Features like RSI, MACD, and Bollinger Bands are shared across all users - you don't need to create them yourself!
You can view all available features by going to "Features" in the sidebar. You'll see RSI_14 (and many others) already there, ready to add to your strategy.
What is RSI?
RSI (Relative Strength Index) measures the magnitude of recent price changes to identify overbought and oversold conditions. Values range from 0-100.
- RSI below 30: Oversold - prices may be too low, potential buying opportunity
- RSI above 70: Overbought - prices may be too high, potential selling opportunity
- RSI_14: Uses a 14-period lookback (the standard and most common setting)
Step 2: Design Strategy Logic
Now build the visual strategy using the Strategy Builder:
Build Strategy on Canvas
- Navigate to "Strategies" and click "Create New Strategy"
- Name it:
RSI Mean Reversion - On the canvas, create the entry logic:Entry Condition:• Drag a Data Source node onto the canvas• Click it and select
RSI_14from the available indicators• Drag a Comparison node and set it to "Less Than"• Type30in the comparison value field• Connect: Data Source (RSI_14) → Comparison• Drag a Buy Action node onto the canvas• Set trade size to 1000• Connect: Comparison → Buy Action trigger - Create the exit logic:Exit Condition:• Use the same Data Source node (it already has RSI_14)• Drag another Comparison node and set it to "Greater Than"• Type
70in the comparison value field• Connect: Data Source (RSI_14) → Comparison• Drag a Sell Action node onto the canvas• Connect: Comparison → Sell Action trigger - Validate the strategy (click "Validate" button)
- Save the strategy
Visual Representation: Your canvas should have two parallel flows: Entry (RSI < 30 → Buy) and Exit (RSI > 70 → Sell). These are independent conditions evaluated every candle.
Step 3: Run Backtest
Test the strategy on historical data to see how it would have performed:
Configure & Run Backtest
- Click "Backtest" button on your strategy card
- Configure backtest parameters:
- Symbol: BTCUSDT (or your preferred pair)
- Timeframe: 1h (hourly candles)
- Period: Last 6 months
- Initial Capital: $10,000
- Position Size: 100% (all-in on each signal)
- Click "Run Backtest"
- Wait 30-60 seconds for completion
- Review results automatically displayed
Why 1h timeframe? Hourly data provides a good balance between trade frequency and signal quality. Daily data produces too few trades, 15m can be too noisy for mean reversion.
Step 4: Analyze Results
Interpret backtest results to assess strategy viability:
Key Metrics to Check
Example Good Results
Total Return
+42%
Sharpe Ratio
1.4
Max Drawdown
-18%
Win Rate
54%
Trades
32
Volatility
22%
These results indicate a solid mean reversion strategy worth paper trading.
Step 5: Deploy to Paper Trading
If backtest results look good, deploy to paper trading for real-time validation:
Deploy Strategy
- Navigate to "Paper Trading"
- Create or select an account (e.g., $10,000 balance)
- Click "Add Strategy" or "Deploy Strategy"
- Select your "RSI Mean Reversion" strategy
- Configure deployment:
- Deployment Name: "RSI BTC 1h"
- Capital Allocation: $5,000 (50% of account)
- Symbol: BTCUSDT
- Timeframe: 1h
- Click "Deploy"
- Click "Start" to begin real-time execution
Why 50% allocation? Start conservatively. If the strategy performs well over 2-4 weeks, you can increase allocation or deploy on multiple symbols.
Step 6: Monitor & Iterate
Track paper trading performance and make adjustments:
Monitoring Checklist
- Daily: Check strategy status, review any new trades, note daily P&L
- Weekly: Compare paper trading equity curve to backtest, calculate Sharpe ratio, assess drawdown
- After 2 Weeks: Decide if performance matches expectations. If yes, continue. If no, analyze and adjust.
- After 1 Month: If consistently profitable and Sharpe >1.0, consider increasing allocation or deploying to more symbols
Potential Improvements
Once comfortable with the basic strategy, try these enhancements:
Add Stop Loss
Exit position if price drops 5% from entry to limit losses during strong trends that don't reverse.
Add Take Profit
Exit when price rises 3-5% from entry, ensuring profits are captured before reversals.
Tighten Thresholds
Use RSI 25/75 instead of 30/70 for more extreme conditions and higher quality signals (but fewer trades).
Add Volume Filter
Only trade when volume is above average to ensure liquidity and reduce false signals.
Combine with Trend Filter
Only take mean reversion trades in the direction of the longer-term trend (e.g., only buy RSI <30 if 200-period MA is rising).
Multi-Timeframe
Check RSI on both 1h and 4h timeframes. Only trade when both agree (both oversold or both overbought).
Common Issues & Solutions
Issue: Too Many Losses in Trending Markets
Problem: RSI mean reversion fails during strong trends - price keeps going down after RSI hits 30.
Solution: Add a trend filter (moving average) to avoid counter-trend trades. Or use tighter stop losses.
Issue: Not Enough Trades
Problem: Strategy only triggers 2-3 trades per month, not enough data to validate.
Solution: Widen thresholds (35/65 instead of 30/70) or use shorter timeframe (15m instead of 1h). Or deploy on multiple symbols.
Issue: Large Drawdowns
Problem: Strategy has 40%+ drawdown, too risky to trade live.
Solution: Reduce position size (use 50% instead of 100% per trade), add stop losses, or use more conservative RSI thresholds (25/75).
Completion Checklist
You've Completed the Tutorial When:
- ✓ Understood how RSI works and what oversold/overbought means
- ✓ Built RSI mean reversion strategy on visual canvas
- ✓ Ran backtest with >30% return and Sharpe >1.0
- ✓ Analyzed all key metrics and understood results
- ✓ Deployed strategy to paper trading account
- ✓ Started real-time execution and confirmed "Running" status
- ✓ Monitored for at least 1 week and reviewed trades
What's Next?
MACD Trend Following Tutorial
Learn trend-following strategies using MACD indicator - complementary approach to mean reversion.
Multi-Indicator Strategy
Combine RSI, MACD, and Bollinger Bands for a more robust, multi-signal strategy.
Strategy Optimization
Learn how to systematically optimize RSI parameters (period, thresholds) while avoiding over-fitting.