ZigZag Pattern Recognition Short-term Trading Strategy
1
Follow
1802
Followers
Overview
This strategy identifies candlestick patterns based on the ZigZag indicator and sets entry windows, take profit and stop loss prices using Fibonacci retracements for short-term trading. The strategy supports 13 types of patterns for both long and short trends, including Bat, Butterfly, Gartley etc.
Strategy Logic
- Identify potential reversal points using the ZigZag indicator
- Calculate the most recent 4 reversal points and check if they match any of the 13 predefined patterns
- Enter trade if a pattern is matched and price enters the Fibonacci 0.382 retracement area
- Set take profit to 0.618 retracement level, stop loss to -0.618 retracement level
- Valid patterns include common ones like Bat, Butterfly, Gartley, as well as some reverse patterns such as Anti-Bat, Anti-Butterfly etc
Advantage Analysis
- The ZigZag indicator effectively filters out market noise and identifies clearer trend reversal points
- Multiple patterns increase opportunities to enter trades while controlling risks
- Fibonacci retracement levels standardize entry, take profit and stop loss
Risk Analysis
- The ZigZag indicator is sensitive to parameters, optimization is needed to find the best parameter combination
- Too many fitted patterns increase curve fitting risks, real trading performance may underperform backtest results
- Only the most recent 4 reversal points considered, more complex patterns are ignored
- No re-test of retracement breakouts considered, may cause premature stop loss
Optimization Directions
- Optimize ZigZag parameters to find the best combination
- Add validity checks for patterns, e.g. confirmation of key points by closing prices
- Expand pattern library to increase entry opportunities
- Add re-test mechanism of retracements to lower stop loss risks
Conclusion
This strategy identifies trend reversal points using the ZigZag indicator and candlestick patterns, and sets standardized entry/exit logic with Fibonacci retracement zones. With optimized parameters and adjusted stop loss mechanisms, it has the potential to achieve good real trading results. The key is finding the best parameter combinations and tuning stop losses accordingly.
Source
Pine
/*backtest
start: 2023-12-01 00:00:00
end: 2023-12-31 23:59:59
period: 2h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
strategy(title='[STRATEGY][RS]ZigZag PA Strategy V4', shorttitle='S', overlay=true)
useHA = input(false, title='Use Heikken Ashi Candles')Strategy parameters
Related strategies
Comment
All comments (0)
No data
- 1

