Double Strategy Combination – Stochastic Slow and Relative Strength Index
Overview
This strategy combines the classic Stochastic Slow strategy and Relative Strength Index (RSI) strategy to form a double strategy. It will open position when Stochastic exceeds 80 (short) or drops below 20 (long) meanwhile RSI exceeds 70 (short) or drops below 30 (long).
Strategy Logic
This strategy mainly utilizes two classic indicators – Stochastic Slow indicator and RSI indicator, and sets threshold values to determine overbought and oversold conditions.
Stochastic Slow Part:
- Set Stochlength as 14, the lookback period for Stochastic calculation
- Set StochOverBought as 80 and StochOverSold as 20, threshold values for overbought and oversold
- Set smoothK as 3 and smoothD as 3, smoothing parameters for %K and %D line
The calculated %K and %D lines are named as k and d in the code.
When %K crosses over %D from below, it is a long signal. When crosses under from above, it is a short signal. Combine with overbought/oversold judgment, it can be used to identify opportunities.
RSI Part:
- Set RSIlength as 14, the lookback period for RSI calculation
- Set RSIOverBought as 70 and RSIOverSold as 30, threshold values for overbought and oversold
The calculated RSI indicator is named as vrsi in the code.
When RSI rises above 70, it sends an overbought signal. When drops below 30, it sends an oversold signal.
Double Strategy Entry Logic:
This strategy will only open position when both Stochastic and RSI indicate overbought/oversold signals at the same time, meaning passing their own threshold values.
This combination utilizes the complementary property of two indicators to increase signal reliability and decrease false signals.
Advantage Analysis
The advantages of this double strategy combination are:
- Combination of two indicators can validate each other, decrease false signals and increase signal quality
- Stochastic judges overbought/oversold conditions, RSI does the same job. Combination makes the results more reliable.
- Stochastic uses %K and %D crossover system, smoothing parameters make it robust to outliers
- RSI reacts fast to latest changes, Stochastic judges middle-to-long term trends and turning points. Complete strategy.
- Conservative trading style, only open positions when both indicators agree. Less trades, avoid over-trading.
Risks and Solutions
There are some risks associated with this strategy:
-
Parameter tuning risk
Improper parameter settings may lead to missing good opportunities or generating false signals. We can optimize parameters through quantitative algorithms or manual tuning to find the best combination.
-
Lack of signals
Due to the dual indicator system, signal frequency could be relatively low and position utilization ratio is not high. We can properly relax the parameters to generate more entry signals.
-
Lagging risk
Both Stochastic and RSI have some lagging effect, which may cause missing rapid chances. More sensitive indicators can be introduced for assistance.
-
Instruments specificity
This strategy may fits better for some violent fluctuated instruments like stock indices and gold. For smooth instruments, it may not be applicable.
Optimization Directions
This strategy can be further optimized in the following aspects:
-
Parameter optimization
Optimize the parameters quantitatively or manually to find the best parameter combination.
-
Introduce stop loss mechanism
Set stop loss based on price movement or percentage to control single trade loss.
-
Combine with other indicators
Introduce other indicators like volume, moving average to assist judging signal quality.
-
Relax double strategy conditions
Appropriately relax the thresholds of double strategy to generate more entry signals.
Conclusion
This strategy combines Stochastic Slow and RSI in double-confirmation mode, entering positions only when both indicators agree on overbought/oversold signals. It features high signal reliability, conservative trading style etc. Also has some risks like parameter tuning, lack of signals. Further improvements can be made through parameter optimization, stop loss introduction, adding assisting indicators to enhance stability.
/*backtest
start: 2023-12-19 00:00:00
end: 2023-12-26 00:00:00
period: 15m
basePeriod: 5m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=2
strategy("Stochastic + RSI, Double Strategy (by ChartArt)", shorttitle="CA_-_RSI_Stoch_Strat", overlay=true)
// ChartArt's Stochastic Slow + Relative Strength Index, Double Strategy- 1

