Earlier this week, published an idea on how harmonic patterns can be used for trend following. This script is an attempt to implement the same.
🎲 Process 🎯 Derive Zigzag and scan harmonic patterns for last 5 confirmed pivots 🎯 If a pattern is found, highest point of pattern will become the bullish zone and lower point of the pattern will become bearish zone. 🎯 Since it is trend following method, when price reaches bullish zone, then the trend is considered as bullish and when price reaches bearish zone, the trend is considered as bearish. 🎯 If price does not touch both regions, then trend remains unchanged. 🎯 Bullish and bearish zone will change as and when new patterns are formed.
🎲 Note Patterns are not created on latest pivot as last pivot will be unconfirmed and moving. Due to this, patterns appear after certain delay - patterns will not be real time. But, this is expected and does not impact the overall process.
🎲 Output 🎯 Patterns formed are drawn in blue coloured lines. Due to pine limitation of max 500 lines, older patterns automatically get deleted when new ones come. 🎯 Bullish Zone and Bearish Zone are plotted in green and red colours and the zone will change whenever new pattern comes along. 🎯 Bar colors are changed according to calculated trend. Trend value can be 1 or -1 based on the current trend. You can also find the value in data window. 🎯 For simplicity purpose, input option for selection of specific patterns are not provided and also pattern names are not displayed on the chart.
릴리즈 노트
Updated code to have more input options to determine bullish and bearish range.
진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.