OPEN-SOURCE SCRIPT

Enhanced Neowave Wave 1 Finder with ZigZag

161
This script is an advanced technical analysis indicator for the TradingView platform, written in Pine Script version 5. Its primary goal is to identify potential Elliott Wave "Wave 1" patterns, enhanced with principles from Neowave theory and a custom ZigZag indicator for more accurate pivot detection. The script is designed to be overlaid on the main price chart.

Core Functionality: Blending ZigZag and Neowave
The indicator's methodology is a two-part process. First, it identifies significant price swings using a robust ZigZag indicator. Then, it analyzes these swings based on a set of rules derived from Neowave and classic technical analysis to validate them as potential Wave 1 patterns.

Part 1: ZigZag Integration
The first major component is a comprehensive ZigZag indicator that forms the foundation for all subsequent analysis.

Pivot Detection: The pivots() function is the engine of the ZigZag. It scans the historical price data for significant high and low points (pivots) over a user-defined Length.

Segment Drawing: Once pivots are identified, the script draws lines connecting them, creating the classic ZigZag pattern on the chart.

Extended Direction & Ratios: This is an enhanced feature. The script doesn't just identify highs and lows; it categorizes them as:

Higher High (HH) or Lower High (LH)

Lower Low (LL) or Higher Low (HL)
This classification is crucial for understanding the market structure. It also calculates the price ratio of the most recent ZigZag leg relative to the previous one, which is used later for pattern validation.

Dynamic Updates: The ZigZag is not static. On each new bar, it can update its most recent pivot point if a new, more extreme price (a higher high or a lower low) is printed before the direction officially changes. This ensures the ZigZag is always reflecting the most current and significant price action.

Part 2: Neowave Wave 1 Finder
With the market structure defined by the ZigZag, the second part of the script applies a rigorous set of rules to identify potential Wave 1 patterns. A Wave 1 is the initial move of a new trend in Elliott Wave theory.

Key Validation Criteria
For a price move between two ZigZag pivots to be considered a valid Wave 1, it must pass a series of checks:

Significance: The move must have a minimum percentage change (Minimum Wave Length) and last for a minimum number of bars, filtering out insignificant noise.

Volume Confirmation: A genuine impulse wave is typically supported by increasing volume. The script checks if the volume during the potential Wave 1 is significantly higher than the recent average (Volume Increase Threshold).

Momentum Alignment: The direction of the wave must be confirmed by momentum indicators.

For a bullish (upward) Wave 1, the Relative Strength Index (RSI) must be in a bullish regime (above 50) and the MACD line must be above its signal line.

For a bearish (downward) Wave 1, the RSI must be below 50 and the MACD line must be below its signal line.

Structural Analysis (Impulse vs. Diagonal): The script attempts to differentiate between two types of Wave 1:

Impulse Wave: A strong, clean, and direct move.

Diagonal Wave: A more complex, overlapping, and often wedge-shaped pattern. This is identified by analyzing the time and price complexity of the move, along with the ZigZag leg ratios.

Wave 2 Retracement Check: A critical Neowave rule is that a valid Wave 1 must be followed by a valid Wave 2 retracement. The script looks at the next ZigZag leg to ensure it doesn't retrace more than 100% of the potential Wave 1. It also uses the ZigZag ratios to confirm the retracement falls within typical Fibonacci levels (e.g., 38.2% to 78.6%).

Display and User Interface
The script provides a rich visual experience to aid the trader in their analysis.

Wave Labels and Boxes: When a valid Wave 1 is detected, it is highlighted with a colored line (green for bullish, red for bearish) and a shaded background box. A label clearly marks it as "Wave 1 IMPULSE" or "Wave 1 DIAGONAL".

Fibonacci Retracement Levels: Upon detection of a Wave 1, the script automatically draws key Fibonacci retracement levels (38.2%, 50%, 61.8%, 78.6%). These levels are potential targets for the end of the subsequent Wave 2, offering potential entry points for a Wave 3 trade.

Information Labels: Additional labels provide at-a-glance confirmation of the conditions, showing whether volume and momentum criteria were met.

Customizable Inputs: Users have extensive control over the indicator's parameters, including the ZigZag length, volume thresholds, RSI levels, and the colors of all visual elements.

Alerts: The indicator can be configured to generate an alert whenever a new bullish or bearish Wave 1 pattern is confirmed, allowing traders to be notified of potential opportunities in real-time.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.