OPEN-SOURCE SCRIPT
Pattern Match & Forward Projection – Weekly (v6.0)

📊 Pattern Match & Forecast Indicator (Weekly)
This custom indicator is designed to identify recurring price patterns in historical data and then forecast potential outcomes into the future. It works by scanning past price movements over a defined lookback period and comparing them with the current market structure. When a sufficiently close match is found, it generates a forward projection that traders can use as a reference for possible scenarios.
🔧 Key Features & Parameters
Lookback period (bars/weeks): Defines how far back the script searches for similar price patterns (e.g., 750 weekly bars in this chart).
Match threshold (distance/shape similarity): Controls how closely past price patterns must resemble the current one.
Forward projection length: Determines how many bars ahead the indicator will forecast.
In this example, the projection covers the next 10 weeks 📅.
Traders can freely adjust this value (e.g., 5 weeks, 20 weeks, or more) depending on their strategy.
Return filters: Minimum % return requirement for a match to be considered valid (e.g., ≥ 1.5%).
Hit rate requirement: Sets the minimum historical success rate (e.g., ≥ 60%).
Averages & probabilities: Displays expected forward performance at different horizons (+2w, +4w, +8w, etc.).
📈 How It Helps
Detects historical analogs to current price action.
Provides forward-looking forecasts based on recurring structures.
Helps filter out weak signals by using statistical significance (hit rate + return filter).
Can be combined with other tools (Bollinger Bands, RSI, ATR) for confirmation.
⚙️ Customizable Parameters
Lookback window (number of bars to scan).
Similarity threshold (strict vs flexible pattern matching).
Projection horizon (how far ahead to forecast: 5–50 weeks or more).
Return & hit filters (to only keep high-probability setups).
סקריפט קוד פתוח
ברוח TradingView אמיתית, היוצר של הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יכולים לבדוק ולאמת את הפונקציונליות שלו. כל הכבוד למחבר! למרות שאתה יכול להשתמש בו בחינם, זכור שפרסום מחדש של הקוד כפוף לכללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.
סקריפט קוד פתוח
ברוח TradingView אמיתית, היוצר של הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יכולים לבדוק ולאמת את הפונקציונליות שלו. כל הכבוד למחבר! למרות שאתה יכול להשתמש בו בחינם, זכור שפרסום מחדש של הקוד כפוף לכללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.