OPEN-SOURCE SCRIPT
Candle Pattern Finder

This indicator searches historical price data to find candle sequences that most closely resemble a recent pattern. It compares the shape of a configurable number of recent candles against hundreds of historical windows using z-score normalization; focuses on the shape of the move rather than price level. The three closest matches are identified and highlighted directly on the chart.
Once the matches are found, the indicator projects forward from each one, showing how price behaved in the bars that followed. The three individual paths are drawn in lighter lines, while a weighted consensus of all three is drawn prominently in orange. A percentage label at the end of the consensus line shows the projected move from the pattern's anchor price. Optionally, consensus can be disabled and only the closest matching pattern will be displayed.
A pattern offset control lets you shift the examined window back in time. With an offset of zero the indicator analyzes the most recent candles as normal. Increasing the offset slides the pattern window back by that many bars, with the projection lines shifting back to match — useful for visually checking what the indicator would have predicted at a specific point in the past and whether that prediction played out.
The indicator is fully configurable: pattern length, lookback depth, projection length, and all colors can be adjusted from the settings panel. Match regions are highlighted with shaded boxes so you can quickly locate in history where the matched patterns occurred.
This is just a tool that displays similarities, and should not be relied upon as an accurate prediction of future movement.
Once the matches are found, the indicator projects forward from each one, showing how price behaved in the bars that followed. The three individual paths are drawn in lighter lines, while a weighted consensus of all three is drawn prominently in orange. A percentage label at the end of the consensus line shows the projected move from the pattern's anchor price. Optionally, consensus can be disabled and only the closest matching pattern will be displayed.
A pattern offset control lets you shift the examined window back in time. With an offset of zero the indicator analyzes the most recent candles as normal. Increasing the offset slides the pattern window back by that many bars, with the projection lines shifting back to match — useful for visually checking what the indicator would have predicted at a specific point in the past and whether that prediction played out.
The indicator is fully configurable: pattern length, lookback depth, projection length, and all colors can be adjusted from the settings panel. Match regions are highlighted with shaded boxes so you can quickly locate in history where the matched patterns occurred.
This is just a tool that displays similarities, and should not be relied upon as an accurate prediction of future movement.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。