logo
Developers

Mean Reversion and Trendfollowing

Script from: TradingViewSwingTrend followingMean reversionReversal

This strategy merges mean reversion and trend following, using a 200-period SMA and 2-period RSI to craft buy/sell signals. It activates mean reversion below SMA200 and trend following above. Buy signals arise from oversold RSI in reversion or above SMA200 in trend; sell signals from overbought RSI or a dip below 95% of SMA200. Users can customize modes, start date, and position sizing.

PAX Gold / TetherUS (PAXGUSDT)

+ Mean Reversion and Trendfollowing

@ 4 h

2.46

Risk Reward

91.28 %

Total ROI

81

Total Trades

PAX Gold / TetherUS (PAXGUSDT)

+ Mean Reversion and Trendfollowing

@ 1 h

2.04

Risk Reward

85.12 %

Total ROI

60

Total Trades

PAX Gold / TetherUS (PAXGUSDT)

+ Mean Reversion and Trendfollowing

@ 2 h

2.02

Risk Reward

85.86 %

Total ROI

63

Total Trades

Zcash / TetherUS (ZECUSDT)

+ Mean Reversion and Trendfollowing

@ 4 h

1.42

Risk Reward

2,948.60 %

Total ROI

536

Total Trades

SOL / TetherUS (SOLUSDT)

+ Mean Reversion and Trendfollowing

@ 4 h

1.27

Risk Reward

8,149.23 %

Total ROI

398

Total Trades

Premium users only

Premium users can access all backtests with a Risk/Reward Ratio > 3

@ Daily

10.97

Risk Reward

5,421.74 %

Total ROI

62

Total Trades

Premium users only

Premium users can access all backtests with a Risk/Reward Ratio > 3

@ 1 h

9.72

Risk Reward

2,377.04 %

Total ROI

38

Total Trades

Linde plc (LIN)

+ Mean Reversion and Trendfollowing

@ Daily

2.89

Risk Reward

629.52 %

Total ROI

83

Total Trades

S&P 500 index of US listed shares (SPX500)

+ Mean Reversion and Trendfollowing

@ 4 h

2.88

Risk Reward

312.41 %

Total ROI

141

Total Trades

Microsoft Corporation (MSFT)

+ Mean Reversion and Trendfollowing

@ Daily

2.80

Risk Reward

496.34 %

Total ROI

142

Total Trades

Vistra Corp. (VST)

+ Mean Reversion and Trendfollowing

@ Daily

2.76

Risk Reward

319.70 %

Total ROI

50

Total Trades

SPDR S&P 500 ETF TRUST (SPY)

+ Mean Reversion and Trendfollowing

@ 1 h

2.73

Risk Reward

218.07 %

Total ROI

145

Total Trades
Create your account for free to see all 106+ backtests

Access filters, details, best timeframes, explore 100K+ backtests and more

Active Trades

Create your account to see on which symbols Mean Reversion and Trendfollowing is currently trading on.

Guide

How does the Mean Reversion and Trendfollowing strategy work ?

The "Mean Reversion and Trendfollowing" strategy is a hybrid trading approach aiming to exploit both market corrections and trending movements. This strategy integrates two main techniques by using a 200-period Simple Moving Average (SMA) and a 2-period Relative Strength Index (RSI).

  • Mean Reversion Mode: Activated when the price is below the SMA200. Buy signals are generated when RSI is below 20, indicating oversold conditions. Sell signals occur when RSI rises above 80.
  • Trend Following Mode: Activated when the price is above the SMA200. Buy signals are initiated when the price surpasses the SMA200. Sell signals are triggered when the price falls to 95% of the SMA200.

Traders can customize the strategy by enabling or disabling each mode and adjusting position sizing factors for each technique. Implement the strategy on TradingView by pasting the script into the Pine Editor and adding it to your chart. This approach allows traders to benefit from both price corrections and trends based on technical indicators.

How to use the Mean Reversion and Trendfollowing strategy ?

This trading strategy combines mean reversion and trend-following techniques using a simple moving average (SMA) of 200 periods and a 2-period relative strength index (RSI). It buys when prices are above the SMA for trend-following or when RSI is below 20 for mean reversion, and exits when prices drop below 95% of the SMA or RSI exceeds 80. To trade this strategy manually:

Set up your chart with these indicators:

  • SMA 200: Add a Simple Moving Average with a period of 200 to determine trend-following conditions.
  • RSI 2: Add a Relative Strength Index with a period of 2 for identifying short-term price reversals.

The entry conditions:

  • Trend-following: Enter a long position when the current price is above the SMA 200.
  • Mean reversion: Enter a long position when the RSI 2 is below 20.

The exit conditions:

  • Trend-following: Exit the position if the price falls below 95% of the SMA 200.
  • Mean reversion: Exit the position if the RSI 2 is above 80.

How to optimize the Mean Reversion and Trendfollowing trading strategy ?

To enhance the "Mean Reversion and Trendfollowing" strategy with manual trading, consider integrating additional indicators and refining your entry and exit criteria. Here are steps to improve strategy performance:

  • Indicator Diversification:
    • Volume Analysis: Incorporate volume indicators, such as On-Balance Volume (OBV), to confirm price movements. Higher volume on a breakout above the SMA200 may indicate stronger trend-following opportunities.
    • Bollinger Bands: Use Bollinger Bands to detect overbought and oversold conditions. When prices touch the lower band while RSI is low, it may signal potential reversal points in mean reversion mode.
  • Refined Entry and Exit Points:
    • Multiple Time Frame Analysis: Validate signals on a higher time frame. For instance, if trading on a 1-hour chart, check signals against the 4-hour or daily chart. Aligning signals enhances accuracy.
    • Trigger Confirmation: Wait for additional candlestick patterns, like a hammer or engulfing pattern, to confirm entry after RSI or SMA signals are indicated.
  • Risk Management Enhancements:
    • Dynamic Position Sizing: Adjust position sizes based on the volatility of the asset or market conditions. Using the ATR (Average True Range) can calculate optimal stop-loss distances and size positions accordingly.
    • Trailing Stops: Implement trailing stops to lock in profits as the market moves in your favor. This approach helps maintain gains during strong trends.
  • Continuous Monitoring and Adaptation:
    • News and Events: Monitor economic news and major events that might impact market sentiment and volatilities like interest rate announcements. Avoid trading or adjust risk exposure during such times.
    • Regular Strategy Review: Periodically assess the strategy's performance and adjust parameters or elements that are not performing as expected.

By incorporating these elements, traders can capitalize on a broad market perspective and increase the probability of successful trades by responding effectively to market nuances and conditions beyond basic indicators.

For which kind of traders is the Mean Reversion and Trendfollowing strategy suitable ?

This strategy is tailored for traders who are comfortable with a hybrid approach, blending elements of both mean reversion and trend following. It suits traders who have an inclination towards technical analysis and can actively monitor positions. Ideal for those who:

  • Intermediate to Advanced Technical Traders: Traders with a good grasp of technical indicators, such as SMA and RSI, will benefit from its application and can leverage it strategically across different market conditions.
  • Active Traders: Those who prefer short to medium-term trading styles, like swing trading or active position trading, where they can capitalize on moving averages and RSI for dynamic market entries and exits.
  • Adapting Traders: Traders who seek a flexible strategy that allows customization, enabling the switch between mean reversion and trend-following modes based on evolving market trends.

This dual-mode strategy offers versatility for traders aiming to engage with the market attentively, benefiting from both market corrections and sustained directional movements.

Key Takeaways of Mean Reversion and Trendfollowing

  • Strategy Overview: A hybrid approach combining mean reversion and trend-following, using a 200-period SMA and 2-period RSI to generate buy and sell signals.
  • How it Works: Mean reversion activates below SMA200 with RSI buy signals under 20, while trend-following triggers when price is above SMA200 with sells as price falls below 95% of SMA200 or RSI crosses 80.
  • Automation and Use: Implement the strategy on TradingView for automated trade execution or set alerts for manual intervention based on indicator thresholds for active monitoring.
  • Enhancement Strategies: Incorporate indicators like volume analysis and Bollinger Bands; use multiple time frame analysis and confirm signals with candlestick patterns for more robust entries.
  • Optimizing Use: Dynamic position sizing and trailing stops improve risk management and profit retention in trending markets. Stay versatile by adjusting the strategy as market conditions change.
  • Risk Management: Regularly review performance, consider broader economic factors, and adjust for market disruptions; use tools like ATR for setting optimal stop-loss distances to minimize risk.
Explore the best Trading & TradingView strategies

Stop trading blindly. Explore the best strategies among 100K+ backtests and improve your trading skills with data.

Start for free