OPEN-SOURCE SCRIPT
Zaktualizowano Histo-Patterns

Detect historical price patterns in real time using Euclidean matching.
Concept
Ever looked at a chart and thought "this looks exactly like that setup from 2023"? Histo-Patterns formalizes that intuition. Anchor a historical bar range, and the indicator continuously scans incoming price action for structurally similar setups.
How to use it
- Spot a meaningful pattern in history.
- Paste its exact datetime into Start Date & Time.
- Set Pattern Length in days. Decimals accepted, 0.5 for 12h, 0.25 for 6h.
- Set Matching %, structures above this threshold trigger a signal.
- Set Min Waiting Bars to control spacing between detections. Equal to Pattern Length = no overlaps.
Tip: Shorter patterns fire more often; longer ones are rarer and more selective.
Under the Hood
Euclidean distance measures how geometrically close the current bar sequence is to your reference.
That distance is inverted and passed through a sigmoid to produce a clean 0–100% match score.
Honest Limitations
Only detects patterns after the reference start time, no lookback before it.
Degrades on noisy or low-liquidity instruments.
No time warping, patterns that unfold faster or slower than the reference score poorly.
Similarity ≠ prediction. It tells you structure repeats, not what happens next.
Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice, trading recommendations, or a guarantee of future results. Past performance does not predict future returns. You alone are responsible for your trading decisions. Always test thoroughly in a simulated environment before trading with real capital.
Concept
Ever looked at a chart and thought "this looks exactly like that setup from 2023"? Histo-Patterns formalizes that intuition. Anchor a historical bar range, and the indicator continuously scans incoming price action for structurally similar setups.
How to use it
- Spot a meaningful pattern in history.
- Paste its exact datetime into Start Date & Time.
- Set Pattern Length in days. Decimals accepted, 0.5 for 12h, 0.25 for 6h.
- Set Matching %, structures above this threshold trigger a signal.
- Set Min Waiting Bars to control spacing between detections. Equal to Pattern Length = no overlaps.
Tip: Shorter patterns fire more often; longer ones are rarer and more selective.
Under the Hood
Euclidean distance measures how geometrically close the current bar sequence is to your reference.
That distance is inverted and passed through a sigmoid to produce a clean 0–100% match score.
Honest Limitations
Only detects patterns after the reference start time, no lookback before it.
Degrades on noisy or low-liquidity instruments.
No time warping, patterns that unfold faster or slower than the reference score poorly.
Similarity ≠ prediction. It tells you structure repeats, not what happens next.
Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice, trading recommendations, or a guarantee of future results. Past performance does not predict future returns. You alone are responsible for your trading decisions. Always test thoroughly in a simulated environment before trading with real capital.
Informacje o Wersji
- added Source inputSkrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.