Type/to search

Stoch RSI Based Trend Following Strategy

Common strategy
Created: 2024-02-02 11:23:29
Last modified: 3 years ago
1
Follow
1802
Followers

img

Overview

This strategy is designed based on the Stoch RSI indicator for trend following. It combines the advantages of RSI and Stoch indicators by generating trading signals through Stoch RSI crossovers and adopting a trend tracking mechanism to dynamically adjust stop loss and take profit lines for optimized money management.

Strategy Logic

The strategy calculates the Stoch K and D lines of RSI. It generates buy signals when the K line of Stoch RSI breaks above 20 from the lows. A stop loss based on the lowest lows of previous several K lines is then set, and the stop loss line keeps adjusted upwards dynamically along with the rising price. At the same time, a take profit line is set based on the highest price, and the position will be closed when price hits the take profit line.

Advantage Analysis

This strategy combines the Stoch RSI indicator to determine market trend and crossovers to generate signals, avoiding the limitations of using RSI indicator alone. Meanwhile, the trend tracking mechanism enables the stop loss line to be adjusted upwards constantly according to price movement, avoiding the risk of premature stop loss exit and allowing sustained profit capture during trending moves. Additionally, the RSI indicator itself has a relatively good win rate.

Risk Analysis

This strategy relies mainly on the Stoch RSI indicator for trend and crossover signal generation. Incorrect signals from the indicator itself poses some risks. Besides, in range-bound markets, the frequently triggered stop loss and take profit lines may affect the strategy's profitability. Risks could be reduced through parameter optimization.

Optimization Directions

  • Optimize parameters of Stoch RSI, adjust smoothing pace of K and D lines to lower incorrect signal probability
  • Optimize settings of stop loss and take profit to improve parameter robustness
  • Add filtering conditions to avoid whipsaws in ranging markets
  • Incorporate position sizing mechanisms based on market conditions

Conclusion

This strategy integrates the advantages of the Stoch RSI indicator and adopts a trend tracking mechanism to effectively identify trending moves and dynamically adjust stops and targets to improve profit capture probability. Further enhancement in stability and tracking ability could be achieved through parameter optimization. Overall speaking, this strategy allows profits while controlling risks and is worth live testing.

Source
Pine
/*backtest
start: 2023-01-26 00:00:00
end: 2024-02-01 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=2

strategy("sdf",calc_on_every_tick=true,precision=8,
     default_qty_type=strategy.fixed,currency="USD")
Strategy parameters
Strategy parameters
smoothK
smoothD
lengthRSI
lengthStoch
RSI Source
overbought
oversold
stop
stop_dentro_de_los_ultimos_lows
trail_points
trail_offset
profit
riesgo_en_dolares
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)