Type/to search

Scalping Strategy based on RSI Indicator with Trailing Stop Loss

Common strategy
Created: 2023-12-12 15:46:49
Last modified: 3 years ago
1
Follow
1802
Followers

img

Overview

This strategy is named "Scalping Strategy based on RSI Indicator with Trailing Stop Loss". It utilizes the RSI indicator to determine overbought and oversold conditions, combines with fast and slow Moving Averages (MA) to determine the trend direction, and sets the entry conditions. It also uses percentage trailing stop loss mechanism to exit positions.

Strategy Logic

The entry signals of this strategy are mainly determined by the RSI indicator and MA crossovers. The RSI parameter is set to 2 periods to quickly capture overbought and oversold situations for reversal opportunities. The fast MA and slow MA are set to 50 and 200 periods respectively to identify the trend direction. Specifically, the entry logic is:

Long entry: Fast MA crosses above slow MA, price is above slow MA, and RSI is below oversold level (default 10%);
Short entry: Fast MA crosses below slow MA, price is below slow MA, and RSI is above overbought level (default 90%).

In addition, there is an optional volatility filter in the strategy. It calculates the difference between the slopes of fast and slow MAs. Positions will only be opened when the difference exceeds a threshold. The purpose is to avoid opening positions when there is no clear direction during market fluctuation.

On the exit side, the strategy uses percentage trailing stop loss. Based on the input percentage, it calculates the stop loss price combined with the tick size, to dynamically adjust the stop loss.

Advantage Analysis

The main advantages of this strategy are:

  1. RSI set to 2 periods can quickly capture overbought and oversold situations for reversal opportunities.
  2. Fast and slow MAs can effectively identify trend direction and turning points.
  3. RSI and MA dual indicators combination avoids false breakouts.
  4. Volatility filter avoids opening positions when there is no clear direction during fluctuation.
  5. Percentage trailing stop loss can adjust stop loss level based on market volatility to effectively control risks.

Risk Analysis

There are also some risks in this strategy:

  1. RSI and MA indicators have some lagging effect, may miss some reversal opportunities.
  2. Percentage stop loss is likely to be triggered in low volume declines.
  3. Significant overnight and pre-market price swings are not handled effectively.

The optimization directions for the risks are:

  1. Adjust RSI parameter to 1 period to reduce lagging effect.
  2. Optimize MA periods based on symbol characteristics.
  3. Adjust percentage stop loss level to balance between stop loss and fluctuation tolerance.

Optimization Directions

The optimization directions for this strategy are:

  1. Add other indicators judgments, like volume, to avoid false breakout signals.
  2. Add machine learning model predictions to assist in decision making.
  3. Optimize pyramiding times and position sizing to further improve return.
  4. Set up filters for overnight and pre-market price swings. Determine whether to participate in next trading day based on fluctuation.

Conclusion

In general, this is a relatively stable trend following strategy. By combining dual RSI and MA indicators, it ensures certain stability while capturing clearer trend reversal opportunities. The volatility filter avoids some risks, and percentage stop loss also effectively controls single trade loss. This strategy can be used as a multi-symbol generic strategy, and can also be optimized on parameters and models for specific symbols to achieve better results.

Source
Pine
/*backtest
start: 2023-11-11 00:00:00
end: 2023-12-11 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// Scalping strategy
// © Lukescream and Ninorigo
// (original version by Lukescream - lastest versions by Ninorigo) - v1.3
//
Strategy parameters
Strategy parameters
Start date
End date
Source
RSI Length
Overbought threshold
Oversold threshold
Slow MA length
Fast MA length
MA choice
Ticker size
Trend Filter
Trailing Stop %
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)