HeWhoMustNotBeNamed

Historical Pattern Matcher

This is an experimental study aimed to find historical patterns of current trend movement.

⬜ Process

▶ Derive zigzag pivots based on Length and Source
▶ Based on the Loopback Pivot settings devise a pattern string based on predetermined language which correlates all the pivots within the given range.
▶ Preserve pattern in an array along with bar index
▶ Check if the pattern already exists in the array before inserting. If yes, retrieve the bar information and date on which the same pattern repeated.

⬜ Settings

Allows you to select zigzag source and length and also number of pivots to be considered for pattern matching

⬜ Display

If pattern found, triangle markers are placed the bar where pattern is matched. Mousover on these triangles will provide details on when did the last time the similar movement happened.

⬜ Note
These are based on zigzag movements which are making HH,HL, LH and LL and probably plenty of improvements can be done. At this stage this is pure experimental and cannot be used for trades in any way.
リリースノート: No updates. But, forgot to mention that I have used bit of code from @RicardoSantos for convering color based on HSL to RGB : Function-HSL-color
リリースノート: Convert to pine 5
オープンソーススクリプト

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

チャートでこのスクリプトを利用したいですか?
Please PM me if you need access to any invite only scripts.

Join tradingview: https://www.tradingview.com/gopro/?share_your_love=sudh