OPEN-SOURCE SCRIPT
تم تحديثه Elliott Wave Scanner [MarkitTick]

💡 An automated structural analysis tool engineered to detect, classify, and visualize complex market cycles based on classic wave progression principles. By scanning localized price extrema and passing them through a rigorous matrix of geometric and proportion-based filters, this indicator distills highly subjective chart analysis into objective, rule-based pattern recognition. Designed for traders who rely on structured market phases, the scanner not only maps five-wave impulses and three-wave corrections but also integrates dynamic risk-to-reward calculations, volume confirmation, and higher-timeframe alignment to evaluate the probabilistic quality of every structural sequence it identifies.
✨ Originality and Utility
Wave theory is traditionally plagued by subjectivity and observer bias, where two analysts might map entirely different structures on the same chart. The utility of this script lies in its strict, algorithmic standardization. It removes emotional interpretation by requiring market swings to conform to precise mathematical tolerances before a sequence is validated.
This tool distinguishes itself by moving beyond mere drawing utilities. It is a complete analytical environment that actively assesses the viability of a market structure. It calculates a predefined Risk-to-Reward (R:R) ratio, establishes a clear target, and sets a protective invalidation level for every valid formation. Furthermore, it incorporates confluence filters—such as market structure midlines and higher-timeframe directional bias—ensuring that localized patterns are only presented when they align with the broader macroeconomic flow. This multifaceted approach provides a systematic, highly actionable framework rather than a simple visual overlay.
🔬 Methodology and Concepts

The core engine of this scanner is built upon the identification of sequential market pivots and the subsequent validation of their relationships through Fibonacci retracement and extension parameters.
• Algorithmic Pivot Detection
The script continuously monitors price action to identify localized peaks and troughs, referred to as Pivot Highs and Pivot Lows. A pivot is mathematically confirmed only when a central price point is surrounded by a user-defined number of lower highs (or higher lows) on both its left and right sides. This ensures that only significant market turning points are evaluated, filtering out intraday noise.
• Impulse Validation (1-2-3-4-5)
To confirm a five-wave impulse, the script isolates an alternating sequence of six confirmed pivots and applies strict proportional rules:
• Correction Validation (A-B-C)
For three-wave corrective structures, the engine isolates a sequence of four alternating pivots:
• Structural Confirmation and PRZ
Once geometric rules are satisfied, the script calculates a Potential Reversal Zone (PRZ). For an impulse, the PRZ represents the logical termination area for Wave 5, derived by projecting 100% to 161.8% of Wave 1's magnitude outward from the origin of Wave 5. The entire sequence is then subjected to a Risk:Reward calculation, validating the pattern only if the theoretical trade setup meets the required profitability threshold.
🎨 Visual Guide

The indicator is designed to provide maximum data density without cluttering the charting environment.
• Structural Pathing
Valid Impulse waves are rendered using robust, continuous lines connecting the validated pivots, clearly demarcating the 1-2-3-4-5 progression. Corrective A-B-C structures are rendered in a distinctly contrasting color, providing immediate visual differentiation between trending and counter-trend market phases.
• Fibonacci Anchor Lines
Dotted horizontal projection lines extend outward from the Wave 4 terminus, visually indicating the 1.0x, 1.618x, and 2.618x Fibonacci extensions of Wave 1. These serve as dynamic targets for Wave 5 completion.
• Potential Reversal Zone (PRZ)
A shaded, transparent box is drawn at the culmination of the pattern. This box highlights the specific price region where harmonic and Fibonacci projections converge, signifying the highest probability area for the pattern's completion and subsequent market reversal.
• Trade Parameters
Upon pattern completion, three distinct dashed lines are projected forward on the chart:
• The Analytical Dashboard
A comprehensive data table anchors to the top right of the screen. This dashboard tracks real-time system metrics, including the prevailing market bias, the active pattern type, exact price levels for the generated trade parameters, and a dynamic Risk:Reward quality score visualized via an integrated block-bar system. It also tracks historical pattern frequency and individual wave magnitudes.
📖 How to Use

This script is engineered to act as an objective entry generation tool based on wave completion.
• Trading the Impulse W5
When the scanner identifies a validated 1-2-3-4 progression and projects the final Wave 5 into the PRZ box, traders should monitor price action within this shaded region. A rejection or stabilization within the PRZ, accompanied by the printing of the Entry, Stop, and Target dashed lines, signals a valid execution window. The structural stop-loss ensures that if the wave count is invalidated by overlapping previous structure, risk is immediately contained.
• Trading the A-B-C Correction
Corrective sequences are utilized to position into the resumption of the primary trend. When an A-B-C sequence completes, indicating that the counter-trend exhaustion has been reached, the system will output actionable levels targeting the previous macro swing high or low. Traders can utilize the volume confirmation toggle to ensure that the reversal away from the Wave C terminus is supported by institutional participation.
• Managing Pivot Delay
Because the indicator relies on confirmed pivots (requiring a set number of bars to close on the right side of the extreme), signals are generated only after the structural turning point is mathematically locked. Traders should view the generated Entry line as the execution threshold, waiting for price to retest or confidently cross this parameter rather than attempting to guess the absolute bottom or top of the raw price action.
⚙️ Inputs and Settings
The indicator offers deep modularity, allowing adaptation across different asset classes and timeframes.
• Pivot Configurations
Adjusting the Pivot Left and Pivot Right parameters alters the sensitivity of the extrema detection. Lower values yield aggressive, micro-wave tracking suitable for scalping, while higher values isolate macro-economic market cycles.
• Elliott Rules and Tolerances
The Fib Tolerance (%) input allows the user to expand or contract the leniency of the retracement measurements. The system also includes logical toggles to enforce strict structural laws, such as ensuring Wave 4 never overlaps Wave 1, or that Wave 3 must explicitly extend beyond Wave 1.
• Filter Systems
Traders can enforce a Higher Timeframe (HTF) Bias, ensuring the script only plots bullish waves when the macro trend is positive. A Volume Confirmation toggle is also available, suppressing signals if the momentum behind Wave 3 fails to breach the baseline volume moving average.
• Visual and Dashboard Toggles
Every graphical element, from the PRZ shading to the individual wave labels, can be toggled on or off to maintain chart hygiene. The dashboard can also be customized with specific text and background colors to fit any chart template.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
The foundational framework of this indicator is deeply rooted in fractal geometry and the statistical behavior of financial time series. Markets, much like natural phenomena, exhibit self-similarity across different scales—a concept heavily explored in the mathematics of fractional Brownian motion. This indicator applies this academic premise by assuming that macroeconomic trending phases (impulses) and mean-reverting phases (corrections) manifest in predictable, repeating geometric sequences, regardless of the timeframe observed.
At the core of the algorithm is the algorithmic isolation of local extrema. By utilizing a rolling array of historical price highs and lows, the engine establishes a localized topology of the market. This topology is then subjected to proportional analysis governed by the Fibonacci sequence, a mathematical series intimately connected to the golden ratio (1.618). In financial econometrics, these specific ratios function as a psychological boundary mechanism; because market participants aggregate their risk and take-profit parameters around these proportional extensions, they generate measurable zones of supply and demand clustering.
The script synthesizes these disciplines by requiring that the distance between consecutive topological extrema strictly conforms to these irrational proportions. By enforcing a rule set where localized wave measurements must divide into one another to produce specific golden ratio derivatives, the indicator successfully models the non-linear, oscillatory nature of crowd psychology and market liquidity into a rigid, computable output.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion.
✨ Originality and Utility
Wave theory is traditionally plagued by subjectivity and observer bias, where two analysts might map entirely different structures on the same chart. The utility of this script lies in its strict, algorithmic standardization. It removes emotional interpretation by requiring market swings to conform to precise mathematical tolerances before a sequence is validated.
This tool distinguishes itself by moving beyond mere drawing utilities. It is a complete analytical environment that actively assesses the viability of a market structure. It calculates a predefined Risk-to-Reward (R:R) ratio, establishes a clear target, and sets a protective invalidation level for every valid formation. Furthermore, it incorporates confluence filters—such as market structure midlines and higher-timeframe directional bias—ensuring that localized patterns are only presented when they align with the broader macroeconomic flow. This multifaceted approach provides a systematic, highly actionable framework rather than a simple visual overlay.
🔬 Methodology and Concepts
The core engine of this scanner is built upon the identification of sequential market pivots and the subsequent validation of their relationships through Fibonacci retracement and extension parameters.
• Algorithmic Pivot Detection
The script continuously monitors price action to identify localized peaks and troughs, referred to as Pivot Highs and Pivot Lows. A pivot is mathematically confirmed only when a central price point is surrounded by a user-defined number of lower highs (or higher lows) on both its left and right sides. This ensures that only significant market turning points are evaluated, filtering out intraday noise.
• Impulse Validation (1-2-3-4-5)
To confirm a five-wave impulse, the script isolates an alternating sequence of six confirmed pivots and applies strict proportional rules:
- Wave 2 must retrace between 38.2% and 78.6% of Wave 1.
- Wave 3 must extend beyond the terminus of Wave 1 and mathematically cannot be the shortest wave in the 1-3-5 sequence.
- Wave 4 must retrace between 23.6% and 50.0% of Wave 3.
- The script enforces an optional but standard rule where the extreme of Wave 4 must not overlap the extreme of Wave 1.
• Correction Validation (A-B-C)
For three-wave corrective structures, the engine isolates a sequence of four alternating pivots:
- Wave B is required to retrace between 38.2% and 78.6% of the initial Wave A sequence.
- Wave C must form a proportional extension of Wave A, operating strictly between the 61.8% and 161.8% boundaries.
• Structural Confirmation and PRZ
Once geometric rules are satisfied, the script calculates a Potential Reversal Zone (PRZ). For an impulse, the PRZ represents the logical termination area for Wave 5, derived by projecting 100% to 161.8% of Wave 1's magnitude outward from the origin of Wave 5. The entire sequence is then subjected to a Risk:Reward calculation, validating the pattern only if the theoretical trade setup meets the required profitability threshold.
🎨 Visual Guide
The indicator is designed to provide maximum data density without cluttering the charting environment.
• Structural Pathing
Valid Impulse waves are rendered using robust, continuous lines connecting the validated pivots, clearly demarcating the 1-2-3-4-5 progression. Corrective A-B-C structures are rendered in a distinctly contrasting color, providing immediate visual differentiation between trending and counter-trend market phases.
• Fibonacci Anchor Lines
Dotted horizontal projection lines extend outward from the Wave 4 terminus, visually indicating the 1.0x, 1.618x, and 2.618x Fibonacci extensions of Wave 1. These serve as dynamic targets for Wave 5 completion.
• Potential Reversal Zone (PRZ)
A shaded, transparent box is drawn at the culmination of the pattern. This box highlights the specific price region where harmonic and Fibonacci projections converge, signifying the highest probability area for the pattern's completion and subsequent market reversal.
• Trade Parameters
Upon pattern completion, three distinct dashed lines are projected forward on the chart:
- An Entry line, anchored at the final wave's closing extreme.
- A Stop line, calculated dynamically using an Average True Range (ATR) buffer applied to the penultimate structural pivot.
- A Target line, mathematically derived from a 61.8% proportional measurement of the dominant impulsive wave.
• The Analytical Dashboard
A comprehensive data table anchors to the top right of the screen. This dashboard tracks real-time system metrics, including the prevailing market bias, the active pattern type, exact price levels for the generated trade parameters, and a dynamic Risk:Reward quality score visualized via an integrated block-bar system. It also tracks historical pattern frequency and individual wave magnitudes.
📖 How to Use
This script is engineered to act as an objective entry generation tool based on wave completion.
• Trading the Impulse W5
When the scanner identifies a validated 1-2-3-4 progression and projects the final Wave 5 into the PRZ box, traders should monitor price action within this shaded region. A rejection or stabilization within the PRZ, accompanied by the printing of the Entry, Stop, and Target dashed lines, signals a valid execution window. The structural stop-loss ensures that if the wave count is invalidated by overlapping previous structure, risk is immediately contained.
• Trading the A-B-C Correction
Corrective sequences are utilized to position into the resumption of the primary trend. When an A-B-C sequence completes, indicating that the counter-trend exhaustion has been reached, the system will output actionable levels targeting the previous macro swing high or low. Traders can utilize the volume confirmation toggle to ensure that the reversal away from the Wave C terminus is supported by institutional participation.
• Managing Pivot Delay
Because the indicator relies on confirmed pivots (requiring a set number of bars to close on the right side of the extreme), signals are generated only after the structural turning point is mathematically locked. Traders should view the generated Entry line as the execution threshold, waiting for price to retest or confidently cross this parameter rather than attempting to guess the absolute bottom or top of the raw price action.
⚙️ Inputs and Settings
The indicator offers deep modularity, allowing adaptation across different asset classes and timeframes.
• Pivot Configurations
Adjusting the Pivot Left and Pivot Right parameters alters the sensitivity of the extrema detection. Lower values yield aggressive, micro-wave tracking suitable for scalping, while higher values isolate macro-economic market cycles.
• Elliott Rules and Tolerances
The Fib Tolerance (%) input allows the user to expand or contract the leniency of the retracement measurements. The system also includes logical toggles to enforce strict structural laws, such as ensuring Wave 4 never overlaps Wave 1, or that Wave 3 must explicitly extend beyond Wave 1.
• Filter Systems
Traders can enforce a Higher Timeframe (HTF) Bias, ensuring the script only plots bullish waves when the macro trend is positive. A Volume Confirmation toggle is also available, suppressing signals if the momentum behind Wave 3 fails to breach the baseline volume moving average.
• Visual and Dashboard Toggles
Every graphical element, from the PRZ shading to the individual wave labels, can be toggled on or off to maintain chart hygiene. The dashboard can also be customized with specific text and background colors to fit any chart template.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
The foundational framework of this indicator is deeply rooted in fractal geometry and the statistical behavior of financial time series. Markets, much like natural phenomena, exhibit self-similarity across different scales—a concept heavily explored in the mathematics of fractional Brownian motion. This indicator applies this academic premise by assuming that macroeconomic trending phases (impulses) and mean-reverting phases (corrections) manifest in predictable, repeating geometric sequences, regardless of the timeframe observed.
At the core of the algorithm is the algorithmic isolation of local extrema. By utilizing a rolling array of historical price highs and lows, the engine establishes a localized topology of the market. This topology is then subjected to proportional analysis governed by the Fibonacci sequence, a mathematical series intimately connected to the golden ratio (1.618). In financial econometrics, these specific ratios function as a psychological boundary mechanism; because market participants aggregate their risk and take-profit parameters around these proportional extensions, they generate measurable zones of supply and demand clustering.
The script synthesizes these disciplines by requiring that the distance between consecutive topological extrema strictly conforms to these irrational proportions. By enforcing a rule set where localized wave measurements must divide into one another to produce specific golden ratio derivatives, the indicator successfully models the non-linear, oscillatory nature of crowd psychology and market liquidity into a rigid, computable output.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion.
ملاحظات الأخبار
The number 5 has been removed from the chart to prevent trader confusion.Performed optimizations on the script.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
💡 Proprietary indicators. Original research. Built by analysts who trade.
👑 Premium: markittick.com
📢 Free Telegram: t.me/MarkitTick_Updates
👑 Premium: markittick.com
📢 Free Telegram: t.me/MarkitTick_Updates
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
💡 Proprietary indicators. Original research. Built by analysts who trade.
👑 Premium: markittick.com
📢 Free Telegram: t.me/MarkitTick_Updates
👑 Premium: markittick.com
📢 Free Telegram: t.me/MarkitTick_Updates
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.