OPEN-SOURCE SCRIPT
Güncellendi Pattern Echo - Market Outcome Forecaster

OVERVIEW
EchoEdge is a historical-analog research indicator that compares the current confirmed market environment with similar conditions previously observed on the same symbol and timeframe.
Rather than producing a conventional buy or sell signal, the indicator asks:
“What happened after this symbol previously displayed comparable technical conditions?”
It identifies independent historical matches, studies their subsequent price behavior, and summarizes those outcomes in an on-chart dashboard and forward projection.
METHODOLOGY
Each historical comparison uses a normalized collection of technical characteristics:
• 20-bar price momentum
• RSI
• ATR-based volatility
• Relative volume
• Distance from the 20-period EMA
• Position within the 52-week price range
• ADX trend strength
• Relative strength versus the selected benchmark
• EMA 20/50/200 trend alignment
• 20-period EMA slope
The script calculates a similarity score between the current confirmed market state and eligible historical observations.
Potential matches are ranked by similarity. A user-adjustable minimum separation prevents neighboring candles from the same historical event from being counted as multiple independent matches.
Historical observations without a completed forward evaluation period are excluded.
DASHBOARD
The dashboard displays:
• Analyzed candle — the confirmed candle being evaluated
• Best similarity — similarity of the closest historical match
• Average similarity — average across all accepted matches
• Independent matches — accepted matches meeting the similarity and spacing requirements
• Target reached first — percentage that reached the selected target before the stop
• Stop reached first — percentage that reached the selected stop before the target
• Neither reached — percentage that reached neither level during the evaluation period
• Median forward return — median closing return after the selected number of bars
• Median maximum upside — median highest favorable excursion
• Median maximum drawdown — median largest adverse excursion
• Entry, target and stop — reference levels derived from user-selected percentages
• Reward/risk — mathematical ratio between the selected target and stop distances
• Historical verdict — descriptive summary of the accepted historical outcomes
• Closest historical dates — dates of the three closest accepted matches
The verdict can be Favorable, Mixed, Unfavorable or Insufficient Matches. It summarizes the selected historical sample and is not a trading recommendation.
CHART COLORS
• Solid blue projection — median path followed by the accepted historical matches
• Dashed green projection — upper-quartile historical path
• Dashed red projection — lower-quartile historical path
• Green dotted horizontal line — user-defined target reference
• Red dotted horizontal line — user-defined stop reference
• Blue “DNA” labels — locations of the five closest historical analogs
• Green dashboard cells — comparatively favorable historical values
• Amber dashboard cells — mixed, intermediate or cautionary values
• Red dashboard cells — comparatively unfavorable historical values
• Gray dashboard cells — neutral, informational or unavailable values
The projected paths are distributions of historical outcomes. They are not forecasts of exact future prices and should not be interpreted as support, resistance or guaranteed destinations.
IMPORTANT LIMITATIONS
Historical similarity does not establish causation and does not ensure that future price behavior will resemble prior outcomes.
Results can vary substantially by symbol, timeframe, available history, benchmark, similarity threshold, forward period, target, stop and minimum match-separation settings.
Small samples may be statistically unreliable. A high similarity score means that the selected technical measurements were alike; it does not mean that the subsequent outcomes will also be alike.
Target-first and stop-first statistics use historical bar highs and lows. When both levels occur within the same candle, their actual intrabar order cannot be determined. The script therefore applies the conservative assumption that the stop occurred first.
The indicator uses standard OHLCV candles for its calculations, even when displayed on a synthetic chart type. When “Use last confirmed candle” is enabled, the current unconfirmed candle is excluded from the analysis.
This indicator does not account for commissions, slippage, bid/ask spreads, liquidity, taxes, news, earnings events or changes in market structure.
DISCLAIMER
EchoEdge is provided solely for educational, informational and historical research purposes. It is not financial, investment, legal or tax advice and does not constitute a recommendation or solicitation to buy or sell any security or financial instrument.
No result, projection, target, stop, similarity score, alert or historical verdict guarantees future performance. Users are responsible for conducting their own research, evaluating risk and determining whether any trade is appropriate for their circumstances.
Past performance and historical analogs are not reliable indicators of future results.
EchoEdge is a historical-analog research indicator that compares the current confirmed market environment with similar conditions previously observed on the same symbol and timeframe.
Rather than producing a conventional buy or sell signal, the indicator asks:
“What happened after this symbol previously displayed comparable technical conditions?”
It identifies independent historical matches, studies their subsequent price behavior, and summarizes those outcomes in an on-chart dashboard and forward projection.
METHODOLOGY
Each historical comparison uses a normalized collection of technical characteristics:
• 20-bar price momentum
• RSI
• ATR-based volatility
• Relative volume
• Distance from the 20-period EMA
• Position within the 52-week price range
• ADX trend strength
• Relative strength versus the selected benchmark
• EMA 20/50/200 trend alignment
• 20-period EMA slope
The script calculates a similarity score between the current confirmed market state and eligible historical observations.
Potential matches are ranked by similarity. A user-adjustable minimum separation prevents neighboring candles from the same historical event from being counted as multiple independent matches.
Historical observations without a completed forward evaluation period are excluded.
DASHBOARD
The dashboard displays:
• Analyzed candle — the confirmed candle being evaluated
• Best similarity — similarity of the closest historical match
• Average similarity — average across all accepted matches
• Independent matches — accepted matches meeting the similarity and spacing requirements
• Target reached first — percentage that reached the selected target before the stop
• Stop reached first — percentage that reached the selected stop before the target
• Neither reached — percentage that reached neither level during the evaluation period
• Median forward return — median closing return after the selected number of bars
• Median maximum upside — median highest favorable excursion
• Median maximum drawdown — median largest adverse excursion
• Entry, target and stop — reference levels derived from user-selected percentages
• Reward/risk — mathematical ratio between the selected target and stop distances
• Historical verdict — descriptive summary of the accepted historical outcomes
• Closest historical dates — dates of the three closest accepted matches
The verdict can be Favorable, Mixed, Unfavorable or Insufficient Matches. It summarizes the selected historical sample and is not a trading recommendation.
CHART COLORS
• Solid blue projection — median path followed by the accepted historical matches
• Dashed green projection — upper-quartile historical path
• Dashed red projection — lower-quartile historical path
• Green dotted horizontal line — user-defined target reference
• Red dotted horizontal line — user-defined stop reference
• Blue “DNA” labels — locations of the five closest historical analogs
• Green dashboard cells — comparatively favorable historical values
• Amber dashboard cells — mixed, intermediate or cautionary values
• Red dashboard cells — comparatively unfavorable historical values
• Gray dashboard cells — neutral, informational or unavailable values
The projected paths are distributions of historical outcomes. They are not forecasts of exact future prices and should not be interpreted as support, resistance or guaranteed destinations.
IMPORTANT LIMITATIONS
Historical similarity does not establish causation and does not ensure that future price behavior will resemble prior outcomes.
Results can vary substantially by symbol, timeframe, available history, benchmark, similarity threshold, forward period, target, stop and minimum match-separation settings.
Small samples may be statistically unreliable. A high similarity score means that the selected technical measurements were alike; it does not mean that the subsequent outcomes will also be alike.
Target-first and stop-first statistics use historical bar highs and lows. When both levels occur within the same candle, their actual intrabar order cannot be determined. The script therefore applies the conservative assumption that the stop occurred first.
The indicator uses standard OHLCV candles for its calculations, even when displayed on a synthetic chart type. When “Use last confirmed candle” is enabled, the current unconfirmed candle is excluded from the analysis.
This indicator does not account for commissions, slippage, bid/ask spreads, liquidity, taxes, news, earnings events or changes in market structure.
DISCLAIMER
EchoEdge is provided solely for educational, informational and historical research purposes. It is not financial, investment, legal or tax advice and does not constitute a recommendation or solicitation to buy or sell any security or financial instrument.
No result, projection, target, stop, similarity score, alert or historical verdict guarantees future performance. Users are responsible for conducting their own research, evaluating risk and determining whether any trade is appropriate for their circumstances.
Past performance and historical analogs are not reliable indicators of future results.
Sürüm Notları
Added stop lossSürüm Notları
Added baseline target comparisonSürüm Notları
Made the indicator scannableIncludes 14 Pine Screener fields, including:
Verdict
Favorable Signal
Sample Quality
Independent Matches
Similarity scores
Target-first and stop-first rates
Target edge versus baseline
Median return, upside and drawdown
Analog stop distance
Recommended initial scanner filters:
Verdict = 1
Sample Quality ≥ 65
Independent Matches ≥ 8
Target Edge vs Baseline ≥ 5
Median Forward Return > 0
Sürüm Notları
Removed the scannable features and will publish as a separate indicator since they test different timeframes.Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.