OPEN-SOURCE SCRIPT
更新済 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.
リリースノート
- added Source inputオープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。