reees

RSI SMA Crossover Strategy

Overview

RSI SMA Crossover Strategy works the same way as traditional MA crossover strategies, but using RSI instead of price. When RSI crosses over the SMA, a long position is opened (buy). When RSI crosses under the SMA, the long position is closed (sell).

This strategy can be very effective when the right inputs are used (see below). Be sure to use the backtesting tool to determine the optimal parameters for a given asset/timeframe.

Inputs/Parameters

RSI Length: length for RSI calculation (default = 50)
SMA Length: length for SMA calculation (default = 25)

Strategy Properties

Initial Capital = $1000

No default properties are defined for Slippage, Commission, etc, so be sure to set these values to get accurate backtesting results. This script is being published open-source for a reason - save yourself a copy and adjust the settings as you like!

Backtesting Results

Testing on Bitcoin (all time index) 1D chart, with all default parameters.
$1,000 initial investment on 10/07/2010 turns into almost $2.5 billion as of 08/30/2022 (compared to $334 million if the initial investment was held over the same period)

Remember, results can vary greatly based on the variables mentioned above, so always be sure to backtest.

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?