MACD and RSI Based Long Short Trading Strategy
1
Follow
1781
Followers
Overview
This strategy combines MACD and RSI indicators to implement long and short trading simultaneously, in order to obtain excess returns in unclear trend situations.
Strategy Logic
- Calculate fast EMA (12-day) and slow EMA (26-day)
- Calculate MACD convergence divergence (fast EMA minus slow EMA)
- Calculate 9-day moving average of MACD as signal line
- Calculate 14-day RSI
- Go long when MACD<-0.1, RSI<27 and fast EMA below slow EMA
- Go short when MACD>0.125, RSI>81 and fast EMA above slow EMA
- Use take profit, stop loss, trailing stop loss to manage positions
Advantage Analysis
- Going both long and short can generate excess returns in non-trending markets
- Combining trend indicator EMA and reversal indicator RSI improves signal quality
- Using trailing stop loss to lock in profits effectively controls loss risk
Risk Analysis
- Trading both ways requires more capital to support margin requirements
- Prices may hit stop loss on both long and short positions when reversing sharply
- Improper parameter settings may cause over-trading
Risk Solutions:
- Sufficient capital to support position sizing
- Reasonable stop loss distance to avoid over-crowded stops
- Optimize parameters to reduce trading frequency
Optimization Directions
- Consider combining volatility indicators to improve entry timing
- Test different parameter combinations to find optimum
- Optimize stop loss strategy based on market conditions, such as trailing stop loss
- Use machine learning algorithms to auto-optimize parameters
Summary
This strategy implements dual-directional trading with MACD and RSI combination. Using trailing stop loss to lock in profits can generate excess returns in non-trending markets. The strategy can be further optimized on parameters, stop loss strategies etc. to obtain more consistent excess returns.
Source
Pine
Strategy parameters
Related strategies
Comment
All comments (0)
No data
- 1
