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.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.