SMC Liquidity Sweep & Fibonacci Extension [MarkitTick]💡 A highly advanced, multi-faceted chart overlay engineered to synchronize market structure analysis, dynamic liquidity tracking, and harmonic Fibonacci projections. By continuously parsing raw price action through a confluence-based scoring system, this indicator provides technical analysts with a unified framework for identifying localized structural shifts, mapping premium and discount pricing zones, and projecting precise forward targets using automated ABC ZigZag structures. It functions as a complete technical environment designed to remove the need for multiple disparate chart overlays.
✨ Originality and Utility
Standard indicators often focus on a single mathematical concept, leaving the analyst to manually stitch together multiple tools to form a cohesive thesis.
This script completely breaks that mold by merging a rigorous market structure shift (MSS) engine with an adaptive, volatility-adjusted Fibonacci structure mapper.
It introduces a highly original dynamic confluence scoring system that grades current setups in real-time based on higher timeframe (HTF) alignment, session timing, and liquidity events.
The inclusion of ATR-adaptive stop losses, order block mitigation tracking, and full webhook alert integration makes it an exceptionally utilitarian system for both discretionary chart analysis and automated alert routing.
Rather than cluttering the screen with infinite historical data, the indicator utilizes a smart-pruning engine that actively hides or greys out mitigated order blocks, filled gaps, and invalidated Fibonacci setups.
🔬 Methodology and Concepts
● Market Structure & Liquidity Engine
The script utilizes a localized loop lookback to identify significant pivot highs and lows, forming the absolute mathematical foundation of its trend analysis.
A liquidity sweep is mathematically confirmed when price pierces a previous structural pivot's extreme but fails to maintain momentum, thus confirming a reversal of localized volume.
Changes of Character (CHoCH) and Breaks of Structure (BOS) are dynamically generated and labeled when price confidently closes beyond confirmed pivot boundaries, establishing a directional bias.
● Fair Value Gaps (FVG) & Order Blocks
Fair Value Gaps are detected by comparing the extreme of the first candle to the extreme of the third candle in a three-bar sequence. If they do not overlap, a pure price imbalance zone is mathematically plotted.
Order Blocks are automatically mapped around the exact origin of a structural break, utilizing an Average True Range (ATR) offset to define the true boundary of the support or resistance zone.
The engine continuously tracks forward price interaction with these zones, automatically removing them from the visual field once mitigated by future price action to maintain chart clarity.
● Automated Fibonacci & ABC Structures
An internal ZigZag algorithm utilizes ATR to filter out baseline market noise, mapping only statistically significant price swings.
Once a valid three-point ABC structure is confirmed (where point C retraces but does not invalidate point A), the script automatically calculates forward projections.
Target extensions are generated using either linear geometric scaling or logarithmic interpolation, providing dynamic profit objectives that adapt to the underlying asset's volatility.
🎨 Visual Guide
● On-Chart Elements
Dashed Lines: Represent significant market structure breaks. Cyan dashed lines indicate a bullish structural shift, while magenta dashed lines indicate a bearish shift.
Text Labels: "CHoCH" or "BOS" text marks structural confirmations directly on the break line. Small yellow "IDM" labels highlight captured inducement levels within the trend.
Shaded Boxes: Cyan and magenta background boxes denote active Bullish and Bearish Fair Value Gaps. Mitigated order blocks turn deep grey if the user chooses not to hide them entirely.
Session Kill Zones: Golden transparent boxes highlight the London session volatility, bright green identifies the New York open, and deep orange maps the Asian range consolidation.
Fibonacci Projections: Dotted and solid lines extend dynamically to the right from valid ABC structures, detailing exact price targets and their associated harmonic or Elliott Wave ratios.
● Comprehensive Confluence Dashboard
Located firmly at the top right of the chart window, this panel continuously updates with the current state of the market environment.
It displays the active trend direction, an aggregate Confluence Score out of 5 (color-coded from a neutral grey to a highly confident vibrant green), and the Higher Timeframe Bias.
Additionally, it provides immediate readouts on the current Premium/Discount pricing equilibrium, the active global trading session, liquidity sweep states, and real-time ATR values.
📖 How to Use
● Trade Qualification and Scoring
Monitor the Confluence Dashboard diligently. A score of 4 or 5 strongly indicates a high-probability alignment across multiple, independent market factors.
Wait for a confirmed liquidity sweep on the chart, followed immediately by a structural break (CHoCH or BOS) that aligns in the direction of the Higher Timeframe (HTF) trend bias.
● Entry Execution and Targeting
Utilize the automatically plotted Order Blocks and Premium/Discount zone quartiles to refine entry locations. Ideal long entries statistically occur within the discount quartile of the defined range.
Set realistic profit targets using the automated Fibonacci extensions. The 1.618 level (often labeled as Wave 3) serves as a primary extended objective for momentum-based moves.
Risk management should be tied directly to the ATR-adaptive stop-loss values calculated internally by the script, ensuring your stops are placed outside the immediate noise floor of the asset.
⚙️ Inputs and Settings
● Market Structure Configuration
Swing Length: Adjusts the raw sensitivity of pivot detection. Higher numeric values create a macro structural view; lower values capture micro intraday structures.
Risk/Reward Ratio: Modifies the theoretical profit targets generated specifically for the internal webhook alert payload system.
● Filters and Environmental Zones
HTF Timeframe: Allows the selection of the specific resolution for the background trend bias filter (e.g., 240 for a 4-hour bias on a 15-minute chart).
Premium / Discount Zone: Toggles the background display of mathematical range quartiles (Premium, Equilibrium, Discount).
Session Kill Zones: Activates time-based highlighting for major global trading hours, strictly aligned to UTC.
● Fibonacci Parameters
Use Logarithmic Scale: Switches all forward projection math to logarithmic scaling, an essential setting for high-volatility assets or deep historical charts.
Structure Invalidation: Deletes or greys out active ABC structures the moment current price completely breaks below the origin point (Point A).
● Webhook Action Routing
Open Long / Short Actions: Allows the user to define exact, customized JSON payload strings to route automated signals seamlessly to third-party execution platforms.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
● Pivot Extrema and Range Equilibrium Theory
The identification of market structure inherently relies on local extrema calculation. A given point is mathematically considered a pivot high if its peak value is strictly greater than all adjacent values within a defined window.
By mapping these rolling extrema over continuous time series data, the script establishes an active topological trading range.
This range is subsequently divided into exact quartiles to define Premium and Discount pricing equilibriums, rooted in mean-reversion statistical theories.
● Volatility-Adjusted Noise Filtration
The internal ZigZag algorithm utilizes the Average True Range (ATR) to establish a dynamic, mathematically sound noise floor.
ATR evaluates the moving average of absolute price differentials over time, capturing true gap volatility.
A structural swing is only validated by the algorithm if the absolute price differential exceeds a defined, user-adjustable multiple of the ATR, ensuring mathematical robustness against ranging, low-volatility environments that cause false signals in standard pivot models.
● Harmonic Projection Mechanics
Forward Fibonacci extensions are calculated using either a standard linear geometric model or a complex logarithmic scale.
In linear application, a forward target for a given expansion ratio is derived directly from an ABC configuration by extrapolating the absolute distance of the primary impulse leg.
When logarithmic scaling is applied, the mathematical relationship transforms to exponentiate the natural log of the price coordinates.
This aligns the future projections with percentage-based compounding growth models, effectively addressing price scale distortions inherently found in exponential secular trends.
⚠️ 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. I 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. Indicator

ABCD Pattern Finder**Detailed Indicator Description**
Your indicator is an **ABCD Pattern Finder** for PulseWire. It scans price action for swing-based **AB=CD harmonic-style patterns**, confirms whether the pattern meets your rules, then plots the pattern and related trade levels directly on the chart.
**Core Purpose**
The indicator is designed to find situations where price makes:
**A to B:** an initial impulse move.
**B to C:** a retracement or pullback.
**C to D:** a second move that is approximately equal to the A-to-B move.
When the C-to-D leg completes and passes the filter rules, the indicator treats point **D** as the trade-confirmation area. It then displays an entry reference, stop loss, and three take-profit levels.
**Bullish and Bearish Logic**
A **bullish setup** is one where the completed pattern suggests a potential long trade after point D.
A **bearish setup** is one where the completed pattern suggests a potential short trade after point D.
The indicator uses the sequence of highs and lows to decide whether the pattern is bullish or bearish. It does not simply mark every four-point swing; the swing sequence must form a valid ABCD structure.
**Zigzag Inputs**
**Pivot Bars Left** controls how many bars to the left must be considered when confirming a swing high or swing low.
**Pivot Bars Right** controls how many bars to the right must pass before a pivot is confirmed.
Higher values make the indicator less sensitive and produce fewer patterns. Lower values make it more sensitive and produce more patterns, but with more noise.
**Pattern Quality Inputs**
**Min CD/AB Time Ratio** sets the minimum amount of time the CD leg must take compared with the AB leg. This prevents CD from forming too quickly.
**Max CD/AB Time Ratio** sets the maximum amount of time CD can take compared with AB. This prevents slow, dragged-out CD legs from qualifying.
**AB=CD Equality Tolerance** controls how close the CD leg must be to the AB leg in price size. A value of **0.10** means CD can be within plus or minus 10% of AB.
**Min BC Retracement of AB** sets the shallowest acceptable pullback from B to C.
**Max BC Retracement of AB** sets the deepest acceptable pullback from B to C.
**Min AB Size ATR Multiple** requires the AB leg to be large enough compared with ATR. This helps filter out small, low-quality patterns.
**ATR Length** controls the ATR calculation used for volatility-based filtering and stop placement.
**Disallow Pattern Overlap** prevents a new pattern from being confirmed inside the range of an already confirmed pattern.
**Trade Inputs**
**Stop ATR Buffer Beyond D** places the stop loss beyond point D by a volatility-based buffer. A larger value gives the trade more room, while a smaller value creates a tighter stop.
**TP1 Fibonacci Level** sets the first profit target based on the A-to-D range.
**TP2 Fibonacci Level** sets the second profit target.
**TP3 Fibonacci Level** sets the third profit target.
The default target structure is TP1 at **0.618**, TP2 at **1.0**, and TP3 at **1.382** of the A-to-D range.
**Display Inputs**
**Trade Display Bars Forward** controls how far the entry, stop, and target lines extend to the right of the current candle.
**Show Trade Levels** turns entry, stop loss, and target lines on or off.
**Show ABCD Lines** turns the A-B, B-C, and C-D pattern lines on or off.
**Show ABCD Labels** turns the A, B, C, and D labels on or off.
You can also customize colors for the confirmed pattern, entry line, stop line, and target lines.
**Historical Pattern Inputs**
**Show Historical AB=CD Patterns** controls whether older confirmed patterns remain visible.
**Historical Closed Lookback** controls how many recently closed patterns are included in the historical visual/stat window.
**Closed Trade Lookback** lets you visually rewind and highlight a previous closed trade. A value of **0** shows the most recent trade. A value of **1** shows the trade before that.
**Closed Trade Lookback Color** controls the color used when reviewing an older closed trade.
**Confirmation Triangles**
The indicator can plot a triangle when a pattern is confirmed.
A bullish confirmation uses the bullish triangle color.
A bearish confirmation uses the bearish triangle color.
You can turn these triangles on or off and choose their size: **Tiny, Small, Normal, or Large**.
**AD Line Inputs**
The indicator can draw a line from point **A** to point **D**, extended to the right.
You can control whether this line appears, plus its color, width, and style: **Solid, Dashed, or Dotted**.
**Stats Window**
The stats window displays historical performance for TP1, TP2, and TP3.
For each target, it shows:
**Wins:** how many closed trades reached that target.
**Closed:** how many closed trades were evaluated.
**Rate:** the win rate for that target.
The stats are recalculated using your current trade input settings, so changing stop or target values updates the displayed historical results.
**Alerts**
The indicator includes two alerts:
**New ABCD Pattern Detected** triggers when a valid pattern is found.
**ABCD Pattern Entry at D** triggers when the pattern confirmation/entry condition occurs at point D.
Indicator

Dynamic Trend-Based Fibonacci Extension💡 This indicator is a sophisticated, automated technical analysis tool designed to identify high-probability trend continuation setups using the principles of market structure and Fibonacci geometry. By algorithmically detecting "A-B-C" price structures (Pivot -> Impulse -> Retracement), it projects dynamic Fibonacci Extension levels to forecast potential price targets for the next impulsive move (Wave C to D). Unlike static drawing tools, this script adapts to market volatility and features an advanced invalidation engine to keep your charts clean and your risk managed.
✨ Originality and Utility
Traders often struggle with the subjectivity of drawing Fibonacci extensions manually. This script solves that by standardizing the identification of market structure using a proprietary ZigZag algorithm enhanced with Average True Range (ATR) for volatility-adjusted sensitivity.
Key unique features include:
Automated Structure Detection: Instantly spots Bullish (Higher High, Higher Low) and Bearish (Lower Low, Lower High) sequences without manual input.
Dynamic Invalidation: The script monitors price action in real-time. If price breaks the invalidation point (Point A), the structure is immediately "grayed out" or deleted, preventing you from trading based on broken setups.
Golden Zone Targeting: Highlights the high-probability reversal zone between the 1.5 and 1.618 extensions, often associated with the completion of a measured move.
JSON Alerting: Built-in support for algorithmic trading with structured JSON payloads (Entry, TP, SL) ready for webhook integration.
🔬 Methodology and Concepts
The core logic operates on a three-step algorithmic sequence:
1. Pivot Identification: The script uses a "ZigZag" approach to find significant swing highs and lows. It employs an ATR-based threshold (or fixed deviation) to filter out market noise, ensuring only significant structural points are considered.
2. Geometric Validation: It evaluates the last three pivot points (A, B, C) to confirm a valid trend structure.
Bullish Setup: Point C must be higher than Point A but lower than Point B (a valid retracement).
Bearish Setup: Point C must be lower than Point A but higher than Point B.
3. Projection Mathematics: Once a valid ABC structure is locked, the script calculates extension targets using the standard formula: Target = Price C + ((Price B - Price A) * Ratio) . It also supports Logarithmic Scale calculations for assets with exponential growth, such as cryptocurrencies, ensuring proportional accuracy over large price ranges.
🎨 Visual Guide
The indicator paints a clear, detailed roadmap on your chart. Here is how to interpret the visual elements:
● Structure Lines
Solid Line (A to B): Represents the initial "Impulse" leg of the move.
Dashed Line (B to C): Represents the "Retracement" or corrective leg.
Green Structures: Indicate Bullish setups (looking for long entries).
Red Structures: Indicate Bearish setups (looking for short entries).
Gray/Dimmed Structures: These are invalidated setups where the price has breached the Stop Loss level (Point A).
● Extension Levels (Targets)
The script projects the following key Fibonacci ratios extending from Point C:
0.618 (Wave 5): An early profit-taking level, often corresponding to a truncated 5th wave.
1.0 (Measured Move): Where the extension equals the length of the initial impulse (AB = CD pattern).
1.272 (Harmonic): A common extension level for corrective structures or deep pullbacks.
Golden Zone (1.5 - 1.618): A highlighted fill area. The 1.618 level (Solid Line) is the "Golden Ratio" and is statistically one of the most significant targets in trending markets, often labeled as "Wave 3".
● Labels
Points A, B, C: Clearly marks the swing points defining the structure.
Right-Side Labels: Display the Ratio (e.g., 1.618) and the exact Price Level for easy order placement.
📖 How to Use
This tool is best used as a trend-following system.
1. Trend Identification
Wait for a new Solid Colored Structure (Green or Red) to appear. This confirms that a valid ABC retracement has occurred.
2. Entry Strategy
The "Trigger" is generally the reversal from Point C. Aggressive traders enter near C, while conservative traders may wait for a breakout above B.
Stop Loss: Place your SL just beyond Point A . If price breaks A, the script will automatically gray out the structure, signaling invalidation.
3. Profit Taking
Use the projected extension lines as dynamic Take Profit (TP) zones:
TP1: 1.0 (The Measured Move).
TP2: The Golden Zone (1.5 to 1.618). This is often the strongest target for a Wave 3 impulsive move.
4. Automation
For automated traders, create an alert using the "Any alert() function call" option. The script outputs a JSON string containing the Action, Ticker, Entry Price, TP (1.618), and SL (Point A).
⚙️ Inputs and Settings
You can fully customize the script to fit your asset class and timeframe:
● ZigZag Detection
Pivot Lookback Depth: (Default: 5) Determines how many bars to check left/right for a pivot. Higher numbers find larger, more significant structures.
Use ATR-Based Threshold: (Default: True) Adapts the sensitivity to market volatility.
ATR Multiplier: (Default: 2.0) Adjusts how much price must reverse to form a new leg.
● Structure Invalidation
Enable Structure Invalidation: (Default: True) Toggles the logic that checks if Point A is breached.
Invalidation Action: Choose "Gray Out" to keep history visible but dimmed, or "Delete" to remove failed setups entirely.
● Fibonacci Settings
Use Logarithmic Scale: Essential for crypto or long-term timeframe analysis.
Show 0.618 / 1.0 / 1.272 / 1.618: Toggles individual levels on/off to declutter the chart.
Extend Lines Right: Extends the target lines into the future for better visibility.
● Display Settings
Keep Last N Structures: Controls how many historical structures remain on the chart to prevent visual clutter.
Show Elliott Wave Labels: Adds theoretical wave counts (e.g., "Wave 3") to the ratio labels.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
This indicator is grounded in Fractal Market Geometry and Elliott Wave Theory .
1. The Golden Ratio (Phi - 1.618):
Mathematically derived from the Fibonacci sequence, the 1.618 ratio is omnipresent in natural growth patterns. In financial markets, it represents the psychological "tipping point" of crowd behavior during an impulsive trend. This script emphasizes the 1.618 extension as the primary target for a "Wave 3," which is academically cited as typically the longest and strongest wave in a 5-wave motive sequence.
2. Harmonic AB=CD Patterns:
The inclusion of the 1.0 extension validates the "Measured Move" concept. Statistically, markets often move in symmetrical legs where the secondary impulse (CD) equals the magnitude of the primary impulse (AB).
3. Volatility Normalization (ATR):
By utilizing the Average True Range (ATR) for pivot detection, the script adheres to statistical volatility normalization. This ensures that the structures identified are statistically significant relative to the asset's current volatility regime, rather than relying on arbitrary percentage moves which fail across different asset classes.
⚠️ 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. I 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. Indicator

N-Pattern Detector (Advanced Logic)Introduction
The N-Pattern Detector (Advanced Logic) is a powerful Pine Script-based tool designed to identify a specific price structure known as the "N-pattern", which often indicates trend continuation or potential breakout points in the market. This pattern combines zigzag pivot logic, retracement filters, volume confirmation, and trend alignment, offering high-probability trading signals.
It is ideal for traders who want to automate pattern detection while applying smart filters to reduce false signals in various markets — including stocks, forex, crypto, and indices.
What is the N-Pattern?
The N-pattern is a 3-leg price formation consisting of points A-B-C-D. It typically follows this structure:
Bullish N-Pattern:
A → Low Pivot
B → Higher High (Impulse)
C → Higher Low (Retracement)
D → Breakout above B (Confirmation)
Bearish N-Pattern:
A → High Pivot
B → Lower Low (Impulse)
C → Lower High (Retracement)
D → Breakdown below B (Confirmation)
The pattern essentially reflects a trend–pullback–breakout structure, making it suitable for continuation trades.
Key Features
1. Intelligent ZigZag Pivot Detection
Uses pivot highs/lows to define key swing points (A, B, C).
Adjustable ZigZag depth to control pattern sensitivity.
Filters noise and avoids false signals in volatile markets.
2. Retracement Validation
Validates the B→C leg as a proper pullback using Fibonacci-based thresholds.
User-defined min and max retracement settings (e.g., 38.2% to 78.6% of A→B leg).
3. Trend Filter via EMA
Filters patterns based on trend direction using a customizable EMA (e.g., 200 EMA).
Only detects bullish patterns above EMA and bearish patterns below EMA (optional).
4. Volume Confirmation
Ensures that impulse legs (A→B, C→D) are supported by stronger volume than the correction leg (B→C).
Adds another layer of confirmation and reliability to detected patterns.
5. Target Projections
Automatically draws 100% A→B projected target from point C.
Optional Fibonacci extensions at 1.272 and 1.618 levels for take-profit planning.
Visually plotted on the chart with colored dashed/dotted lines.
6. Clear Visuals & Labels
Connects all pattern points with colored lines.
Clearly labels points A, B, C, D on the chart.
Uses customizable colors for bullish and bearish patterns.
Includes real-time alerts when a valid pattern is detected.
How to Use It
Add to Chart
Apply the indicator to any chart and time frame. It works across all asset classes.
Adjust Inputs (Optional)
Set ZigZag Depth to control pivot detection sensitivity.
Define Min/Max Retracement levels to match your trading style.
Enable or disable Trend and Volume filters for cleaner signals.
Customize EMA length (default: 200) for trend validation.
Wait for Pattern Confirmation
The indicator constantly scans for valid N-patterns.
A pattern is confirmed only after point D forms (breakout or breakdown).
You’ll see the full pattern drawn with target levels.
Set Alerts
Alerts trigger automatically on confirmation of a bullish or bearish pattern.
You can customize these in PulseWire’s alerts panel. Indicator
