This strategy uses the RSI indicator to determine long-term trend direction, combined with candlestick patterns and price breakouts to generate long-term trading signals. It belongs to the RSI-based long cycle tracking strategy type.
The strategy is based on two main factors:
RSI Indicator
Calculates 20-period RSI to determine overall trend direction.
Candlestick Patterns
Judging price change over past 3 candles to confirm the trend.
It goes long when uptrend and RSI is above 30, and goes short when downtrend.
Overall it considers both RSI trend and candlestick patterns over longer periods to determine trends.
Risks can be reduced by:
The strategy can be improved by:
Testing different RSI periods for optimal parameters
e.g. test 10, 15, 30 period RSI
Adding confirmation indicators
e.g. require MACD golden cross for RSI uptrend
Optimizing stops
Consider moving stops, trails123 etc.
Time-based parameter optimization
Optimize parameters separately for different sessions
Adding short-term strategies
Combine short-term strategies to react to temporary adjustments
This long-term strategy uses RSI for trend direction, confirmed by candlestick patterns and breakouts, to focus on major trends while avoiding short-term noise. However, issues like RSI lag and weak stops exist. Improvements can be made via parameter optimization, adding confirmations, optimizing stops to combine short-term flexibility with long-term persistence, enabling stable long-term profitability.
/*backtest start: 2022-09-14 00:00:00 end: 2023-09-20 00:00:00 period: 1d basePeriod: 1h exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=2 // use with eurusd h1 , gbpusd h1 strategy("RSI Long Term", overlay=true, default_qty_type = strategy.percent_of_equity, default_qty_value = 10) RSI = (rsi(sum(close , 20) + sum(open ,20) , 20 )) Sum_OF_3_Both = sum((close - open)*100000 , 3) Up_Move = ((close[0] - open[0])*100000) < 35 Down_Move = ((close[6] - open[6])*100000) + ((close[5] - open[5])*100000) + ((close[4] - open[4])*100000) < -400 maxIdLossPcnt = input(10, "Max Intraday Loss(%)", type=float) // strategy.risk.max_intraday_loss(maxIdLossPcnt, strategy.percent_of_equity) //total = (num > 70 ) if (Sum_OF_3_Both > 350 and Up_Move ) strategy.entry("Bar Up Buy", strategy.long) if (Sum_OF_3_Both < -200 and Down_Move and RSI > 30.1 ) strategy.entry("Bar Down Sell ", strategy.short) //plot(strategy.equity, title="equity", color=red, linewidth=2, style=areabr)