Harmonic PatternInstitutional Harmonic
PRZ Lifecycle Scanner is a harmonic pattern and price structure indicator designed to identify confirmed pivot formations, Potential Reversal Zones, pattern lifecycle states, invalidation levels, and ATR-based risk projection areas.
The indicator is built for structured chart reading. It does not predict future price movement, does not execute trades, and does not guarantee results. Its purpose is to help traders study harmonic geometry, PRZ reactions, market structure, volatility context, and risk areas in a clear visual framework.
────────────────────────────
MAIN CONCEPT
────────────────────────────
Harmonic trading is based on the relationship between price legs. A valid pattern is not only a drawing on the chart. It requires measured ratios, a defined completion area, and a clear invalidation zone.
This indicator uses confirmed pivots to build X-A-B-C-D structures and other market patterns. When a valid structure is detected, the script calculates a Potential Reversal Zone using ratio confluence and then follows the pattern through different lifecycle states.
The main idea is simple:
1. Detect a confirmed structure.
2. Measure the ratios.
3. Build the PRZ.
4. Wait for price interaction with the PRZ.
5. Track reaction, invalidation, or target progression.
────────────────────────────
WHAT THE INDICATOR CAN DISPLAY
────────────────────────────
The script can display:
* Harmonic X-A-B-C-D structures
* Potential Reversal Zones
* Pattern labels
* Pattern score
* Bullish or bearish direction
* Entry reference
* Invalidation level
* Stop area
* TP1, TP2, and TP3 projection levels
* TP zones
* Pattern lifecycle status
* Dashboard information
* Higher timeframe bias
* Volatility context
* Alert events
────────────────────────────
PATTERN LIFECYCLE
────────────────────────────
Each pattern can move through several states:
DETECTED
A valid structure has been found and measured.
PRZ TOUCHED
Price has reached the Potential Reversal Zone.
REACTION
A rejection or reaction condition has appeared after price interacts with the PRZ.
TP1 HIT
The first projected target has been reached.
TP2 HIT
The second projected target has been reached.
TP3 HIT
The third projected target has been reached.
FAILED
Price has moved beyond the invalidation area.
EXPIRED
The pattern remained active for too many bars without developing.
This lifecycle approach is designed to separate raw pattern detection from cleaner trading context.
────────────────────────────
PATTERNS INCLUDED
────────────────────────────
The indicator can detect several harmonic and structural formations, depending on the active settings:
* Gartley
* Bat
* Alternate Bat
* Butterfly
* Crab
* Deep Crab
* Cypher
* 5-0
* AB=CD
* Three Drives
* Double Top
* Double Bottom
* Triple Top
* Triple Bottom
* Head and Shoulders
* Inverse Head and Shoulders
* Triangle
* Wedge
Each pattern type can be enabled or disabled from the settings.
────────────────────────────
INPUTS EXPLAINED
────────────────────────────
ENGINE SETTINGS
Pivot Depth
Controls how many bars are used to confirm a pivot high or pivot low. A lower value detects more structures but can create more noise. A higher value detects fewer structures but usually produces cleaner formations.
Ratio Tolerance
Defines how much deviation is allowed around the expected Fibonacci or structural ratio. Lower tolerance is stricter. Higher tolerance allows more patterns.
Minimum XA Size
Filters out very small patterns. This helps avoid structures that are too small compared to current volatility.
Minimum Score
Defines the minimum quality score required before a pattern can be displayed. A higher score means fewer but more selective patterns.
Pattern Expiration Bars
Defines how long an active pattern can remain valid before it is considered expired.
────────────────────────────
PATTERN SETTINGS
Enable Gartley
Turns Gartley pattern detection on or off.
Enable Bat
Turns Bat pattern detection on or off.
Enable Alternate Bat
Turns Alternate Bat pattern detection on or off.
Enable Butterfly
Turns Butterfly pattern detection on or off.
Enable Crab
Turns Crab pattern detection on or off.
Enable Deep Crab
Turns Deep Crab pattern detection on or off.
Enable Cypher
Turns Cypher pattern detection on or off.
Enable 5-0
Turns 5-0 pattern detection on or off.
Enable AB=CD
Turns AB=CD pattern detection on or off.
Enable Three Drives
Turns Three Drives detection on or off.
Enable Double Top / Bottom
Turns Double Top and Double Bottom detection on or off.
Enable Triple Top / Bottom
Turns Triple Top and Triple Bottom detection on or off.
Enable Head and Shoulders
Turns Head and Shoulders detection on or off.
Enable Inverse Head and Shoulders
Turns Inverse Head and Shoulders detection on or off.
Enable Triangle
Turns triangle structure detection on or off.
Enable Wedge
Turns wedge structure detection on or off.
────────────────────────────
PRZ SETTINGS
Show Institutional PRZ
Shows or hides the Potential Reversal Zone.
Auto-Extend PRZ Only
Extends active PRZ zones automatically as new bars appear.
Max Active PRZ Zones
Limits how many PRZ zones can stay visible on the chart.
PRZ Width / Confluence Sensitivity
Controls how tight or wide the PRZ can be around the calculated confluence area. A tighter setting is more selective. A wider setting is more visual and easier to see.
Show PRZ Labels
Shows or hides labels linked to the PRZ and pattern state.
────────────────────────────
RISK MODEL SETTINGS
Show Entry / SL / TP
Shows or hides the risk projection model.
Auto-Extend RM Lines / Labels
Extends Entry, SL, TP, and label positions automatically as new bars appear.
Show TP Zones
Shows or hides the colored target zones.
Auto-Extend TP Zones
Extends TP zone backgrounds automatically as new bars appear.
Max Active Risk Models
Limits the number of visible risk models.
Max Active TP Zone Sets
Limits the number of visible TP zone groups.
Level Projection Bars
Controls how far Entry, SL, TP, PRZ, and target zone objects are projected to the right side of the chart.
ATR Stop Multiplier
Controls the distance of the invalidation or stop reference using ATR.
TP1 Multiplier
Controls the first target projection.
TP2 Multiplier
Controls the second target projection.
TP3 Multiplier
Controls the third target projection.
Show TP3
Shows or hides the third target.
────────────────────────────
VISUAL SETTINGS
Show Connectors
Shows or hides the internal pattern connector lines.
Show Pattern Labels
Shows or hides the pattern name labels.
Show Ratio Labels
Shows or hides ratio information on the chart.
Neutral Color Theme
Uses a cleaner chart style with more neutral colors.
Bullish Color
Controls the color used for bullish structures.
Bearish Color
Controls the color used for bearish structures.
PRZ Color
Controls the color used for Potential Reversal Zones.
Risk Color
Controls the color used for invalidation or stop areas.
Target Color
Controls the color used for target zones.
────────────────────────────
DASHBOARD SETTINGS
Show Dashboard
Shows or hides the information panel.
Dashboard Position
Moves the panel to the selected chart corner.
Dashboard Detail Mode
Controls how much information appears inside the dashboard.
The dashboard can show:
* Last detected pattern
* Direction
* Score
* Status
* PRZ range
* Entry reference
* Invalidation level
* TP1, TP2, TP3
* Higher timeframe bias
* ATR regime
* Active PRZ count
* Active risk model count
* Extension status
────────────────────────────
CONTEXT SETTINGS
Use Higher Timeframe Bias
Adds a higher timeframe trend context to the dashboard or scoring logic.
Higher Timeframe
Selects the timeframe used for higher timeframe bias.
HTF EMA Fast
Defines the fast EMA used for higher timeframe trend reading.
HTF EMA Slow
Defines the slow EMA used for higher timeframe trend reading.
Use VWAP Context
Adds VWAP context when available on the chart.
Use ATR Regime
Adds volatility regime information based on ATR behavior.
────────────────────────────
ALERT SETTINGS
Alert New Pattern
Triggers an alert when a new valid pattern is detected. This is useful for scanning, but it should not be treated as a trade entry by itself.
Alert PRZ Touch
Triggers an alert when price reaches the PRZ.
Alert Confirmed Reaction
Triggers an alert when price reacts after interacting with the PRZ.
Alert High Score Only
Filters alerts so that only patterns above a selected score can trigger.
Alert Minimum Score
Sets the minimum score required for high-score alerts.
Alert TP Hits
Triggers alerts when TP1, TP2, or TP3 is reached.
Alert Failed Pattern
Triggers an alert when a pattern is invalidated.
Webhook Alert Mode
Allows dynamic alert messages to be used for automation workflows.
For cleaner alerts, it is generally better to focus on confirmed reaction alerts instead of raw new pattern alerts.
────────────────────────────
MINI TUTORIAL FOR BEGINNERS
────────────────────────────
1. Add the indicator to the chart.
2. Start with default settings.
3. Look for a clean pattern label and PRZ zone.
4. Do not treat a new pattern as an entry by itself. First, wait for price to reach or interact with the PRZ.
5. Check the pattern status:
* DETECTED means the structure exists.
* PRZ TOUCHED means price reached the reaction area.
* REACTION means the script detected a reaction condition.
* FAILED means the setup is invalidated.
* TP1, TP2, or TP3 means projected target areas were reached.
6. Check the dashboard:
* Pattern name
* Direction
* Score
* Status
* PRZ
* Invalidation
* Higher timeframe bias
* Volatility context
7. Compare the setup with your own chart reading:
* Is price near support or resistance?
* Is there liquidity nearby?
* Is the market trending or ranging?
* Is the pattern aligned with the higher timeframe?
* Is the invalidation distance acceptable?
8. Use alerts carefully. For cleaner signals, use confirmed reaction alerts rather than raw detection alerts.
────────────────────────────
EXAMPLE USE CASES
────────────────────────────
Example 1: Bullish harmonic reaction
A bullish harmonic pattern appears near a previous support area. Price enters the PRZ and prints a rejection reaction. The lifecycle status changes from DETECTED to PRZ TOUCHED, then to REACTION. The trader can use the PRZ, invalidation, and target levels as visual references for further analysis.
Example 2: Bearish pattern near resistance
A bearish pattern forms near a previous resistance area. Price reaches the PRZ and fails to continue upward. If a reaction is detected, the dashboard updates the status and shows the bearish context, invalidation level, and projected targets.
Example 3: Pattern invalidation
A pattern is detected, but price moves beyond the invalidation level. The script marks the pattern as FAILED. This helps separate invalidated setups from still-active ones.
Example 4: Scanning mode
A trader can enable alerts for new patterns to monitor multiple charts. In this mode, new pattern alerts are used only as early notifications. A second check is still needed before making any decision.
Example 5: Cleaner alert mode
A trader who wants fewer alerts can disable New Pattern and PRZ Touch alerts, then keep only Confirmed Reaction, TP Hits, and Failed Pattern alerts active.
────────────────────────────
BEST PRACTICES
────────────────────────────
Use lower tolerance for stricter pattern detection.
Use higher pivot depth to reduce noise.
Use the dashboard to confirm the pattern state before focusing on the setup.
Use confirmed reaction alerts for cleaner notifications.
Avoid using the indicator alone. Combine it with market structure, support and resistance, liquidity areas, session context, and personal risk management.
Test the indicator on different symbols and timeframes before relying on it for live decisions.
────────────────────────────
LIMITATIONS
────────────────────────────
This script is an indicator, not a strategy.
It does not place orders.
It does not provide financial advice.
It does not guarantee profitable results.
Patterns can fail.
Alerts depend on the user’s PulseWire alert settings.
Pivot-based tools confirm structures after enough bars have passed, so they should be understood as confirmation tools, not instant prediction tools.
Signals may be less reliable during low liquidity, high spread, major news, or highly erratic market conditions.
Indicator

Sidereal Session Lattice [JOAT]Sidereal Session Lattice
Introduction
Sidereal Session Lattice is an open-source intraday session-orbit indicator. It maps session phase, VWAP drift, volatility harmonics, entropy, and anomaly pressure into adaptive orbit bands and compact phase cells.
The indicator is designed to answer a session-context question: is price moving with the current session phase, stretching beyond its orbit, or compressing into balance?
Core Concepts
1. Session Phase
Each active session is counted bar by bar. The bar count is converted into a normalized phase value from 0 to 1.
2. Harmonic Orbit
The phase value is transformed with sine waves to create an intraday harmonic component. This does not predict price; it creates a reference curve for studying session rhythm.
3. VWAP Drift
The script tracks the distance between price and session VWAP, then normalizes the drift by ATR.
4. Entropy and Anomaly Rank
The script compares recent up/down candle energy and return magnitude to estimate balance and anomaly pressure.
5. Phase Cells
Compact cells mark upper-orbit events, lower-orbit events, and balance compression.
Features
Session phase model: Tracks where the market is inside the active session cycle
VWAP drift: Measures price displacement from session VWAP
Harmonic orbit bands: Adaptive bands based on phase, volatility, and drift
Entropy score: Measures up/down energy balance
Anomaly rank: Highlights unusual movement relative to recent behavior
Phase cells: Compact boxes show session-orbit events
Dashboard: Shows phase, lattice score, drift, entropy, anomaly, and current state
Input Parameters
Primary session defines the active session window
Cycle bars controls the phase cycle length
Drift smoothing controls VWAP drift smoothing
Entropy memory controls bid/ask balance memory
Anomaly memory controls return-rank comparison
How to Use This Indicator
Step 1: Read the phase state
The dashboard names the current session phase, such as open drive, balance, or close risk.
Step 2: Watch orbit events
Upper and lower orbit cells mark when price stretches beyond the adaptive session orbit.
Step 3: Use entropy for balance context
High entropy with low anomaly often indicates balanced conditions.
Indicator Limitations
The harmonic orbit is a reference model, not a forecast
Session behavior varies by symbol and exchange hours
Entropy and anomaly values are derived from chart bars and may change with timeframe
Originality Statement
Sidereal Session Lattice combines session phase, VWAP drift, harmonic references, entropy, and anomaly ranking. It is not a standard session high/low tool; it provides a structured way to study intraday rhythm and displacement.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Session models can fail in news, gaps, and unusual liquidity conditions.
-Made with passion by jackofalltrades
Indicator

Harmonic Auto-Validator [GBB]Harmonic Auto-Validator
I built this because every harmonic indicator I tried on PulseWire was doing something weird with the math.
Some draw "Gartleys" where B sits at 0.5 of XA instead of 0.618. Some skip the AB=CD validation entirely. Some draw a single line for D instead of the actual PRZ zone Carney describes in his books. After spending too many evenings trying to reverse-engineer what a few popular ones were actually checking, I decided to write my own from scratch and stick to the methodology Scott Carney lays out in "Harmonic Trading Volume One" (2004) and "Volume Two" (2007).
This is the result. Six patterns, strict ratio checks, PRZ rendered as a real zone with outlier filtering, embedded AB=CD validation, and a 0-10 score that reflects how clean the geometry actually is.
What it detects
Gartley — B at 0.618 XA, D at 0.786 XA
Bat — B around 0.5, D at 0.886
Alt Bat — B shallow (0.382), D at 1.13 (extends past X)
Butterfly — B at 0.786, D at 1.272
Crab — B around 0.5, D at 1.618
Deep Crab — B at 0.886, D at 1.618
Three tolerance presets (Strict / Standard / Lenient) control how forgiving the ratio checks are. Standard uses tolerances close to what Carney published; Lenient widens by ~40% for charts where you want to see more candidates; Strict is for when you only want near-perfect geometry.
What's actually different about this one
PRZ as a zone, not a line. Most indicators draw D at a single Fibonacci level. Carney's actual methodology defines D as a Potential Reversal Zone — the convergence envelope of multiple projections (0.786 XA, 1.27 BC, 1.618 BC, AB=CD for Gartley; different sets per pattern). HAV computes that zone, filters outliers more than 3 ATR from the median projection, and draws the resulting box. When the zone is tight (projections converge), the score goes up. When it's wide, the score goes down. This is information you actually need before deciding whether to trade the pattern.
Embedded AB=CD validation . Carney is pretty firm in the books: a harmonic pattern without an AB=CD that lands inside the PRZ is incomplete. HAV checks this explicitly and applies a -2 score penalty when the AB=CD doesn't converge. Patterns missing this convergence get a ⚠ icon on the label so you can see at a glance which ones are textbook vs. which ones are partial.
0-10 quality score combining ratio precision (how close B and D are to their ideal Fibonacci levels), PRZ tightness (how narrow the convergence zone is relative to ATR), and confluence count (how many projections actually landed inside the zone). The default `Min Score` filter is 6, but you can raise it for higher-conviction-only scanning or lower it to see more candidates.
Confirmed-only display by default . No "forming" patterns that disappear when D doesn't print where projected. When HAV draws a pattern, the geometry is locked in. There's an opt-in **Borderline mode** that shows patterns scoring 4.0-5.9 with dashed lines and a (B) prefix on the label — useful for confluence with other tools or for educational purposes, but these never trigger alerts.
Diagnostics table showing exactly what the engine is doing: how many 5-pivot windows it tested, where each gate filtered candidates (direction / structure / XA size / each ratio band / confluence / score), how many of each pattern type were accepted. If you're wondering "why didn't HAV draw a Gartley on this chart that I can see with my eyes," the diagnostics will usually tell you which gate it failed.
Alerts
Two ways to get alerted when something fires.
Unified alert with JSON payload — set up one alert on "Any alert() function call" and you'll get structured JSON when any pattern of any direction confirms. The payload includes ticker, timeframe, pattern type, direction, score, AB=CD convergence status, PRZ top and bottom, all four ratios, and the prices and timestamps of all five pivots. Plug it into a webhook for Telegram, Discord, your own backend, whatever. This is what I use for scanning many charts at once and routing everything to a single notification stream.
12 named alert conditions — bullish/bearish × 6 patterns. If you just want "alert me on Crab patterns on this one chart" without messing with webhooks, these show up in PulseWire's standard alert dialog.
Both fire on bar close only. No repainting.
Honest expectations on signal frequency
Harmonic patterns are rare on any single chart. Like, actually rare. Across my testing:
Daily timeframe, you might get 1-4 patterns per year on a single instrument
4H, maybe 5-15 patterns per month
Lower TFs (5m, 15m), dozens per week
This is by design — strict ratio checking filters out most of the 5-pivot zigzags that other indicators happily call "harmonic patterns." If you put HAV on one daily chart and stare at it for a week expecting signals, you will be disappointed.
The way this thing actually shines is across many charts at once. Drop it on 30+ instruments across daily and 4H, set up the unified JSON alert, route to a Telegram channel or Discord webhook, and let the patterns come to you. That's the workflow it's built for.
What it is and isn't
It is: a pattern detection and verification tool. A confluence/confirmation aid for traders who already have a setup and want to know if a harmonic pattern is also forming there. A teaching tool — the diagnostics show you exactly what's happening at every step.
It isn't: a complete trading system. There are no entry signals, no SL/TP automation, no win-rate claims. The decision to trade a pattern is yours, and Carney's books contain the actual entry/management methodology if you want to follow it strictly.
Settings worth knowing about
Tolerance Preset — start with Standard. If you're seeing too few patterns, try Lenient. If you're seeing too many low-quality ones, try Strict.
Min Score — default 6 keeps things clean. Drop to 4-5 if you want to see borderline geometry. Raise to 7-8 for highest-conviction-only.
Show Borderline Patterns — opt-in. Adds dashed/dimmed display for patterns that scored 4.0-5.9. Doesn't trigger alerts.
Log Scale — default Off. Carney's books and most charting tradition use linear-scale Fibonacci. If you're working on heavy long-term crypto charts where price moved by orders of magnitude, you might prefer "On" or "Auto."
S how Diagnostics Table — default On. Shows the detection statistics in the top-right. Toggle off if it's in the way of other indicators.
Show Distribution Stats — opt-in addition to the diagnostics. Useful if you're calibrating tolerances yourself or curious about an asset's natural retracement profile.
Patterns that aren't included
I deliberately didn't add Cypher, Shark, or 5-0 in this version. Cypher (Oglesbee) uses a completely different structural approach than the Carney patterns and didn't fit cleanly into the same scoring framework. Shark and 5-0 use OXABC labeling with C as the entry rather than D, which would have meant a parallel detection engine. Maybe in v1.1 if there's demand. The six patterns above cover the bulk of what shows up in real markets anyway.
Source notes
If you want to read the actual methodology this is implementing, the references are:
Scott M. Carney, "The Harmonic Trader" (1999) — the original self-published book where the framework first appeared, including the PRZ concept and the 0.886 retracement
Scott M. Carney, "Harmonic Trading Volume One" (2004, 2nd ed. 2010) — the formal Pearson/FT Press treatment, Bat pattern, ideal Gartley ratios, AB=CD requirements
Scott M. Carney, "Harmonic Trading Volume Two" (2007, 2nd ed. 2010) — Crab, Alt Bat, 5-0, RSI BAMM execution model, advanced patterns
Scott M. Carney, "Harmonic Trading Volume Three: Reaction vs Reversal" (2016) — execution refinement, Harmonic Strength Index, additional management strategies
H.M. Gartley's original 1935 "Profits in the Stock Market" is where the Gartley pattern itself was first described, but the specific Fibonacci ratios (0.618 / 0.786) were Carney's contribution decades later — Gartley used different proportions.
Feedback, bug reports, "this thing didn't draw a pattern that's clearly there" reports — all welcome in the comments. I'll be running this myself across crypto, forex, and indices, and the feedback loop is genuinely how this gets better.
The Good, the Bad and the Bitcoin Indicator

Harmonic Assistant(XABCD)**Harmonic Assistant (XABCD)**
**Overview**
Trading harmonic patterns can often be a highly subjective, tedious, and visually cluttered process. The **Harmonic Assistant Pro** is designed to eliminate the guesswork. It is an advanced, fully automated XABCD pattern detection engine that not only finds high-probability setups (Gartley, Bat, Butterfly, Crab) but also acts as a live trading assistant, explaining market geometry to you in real-time.
Unlike standard harmonic indicators that cover your screen in messy lines, this script introduces **Smart Label Placement** and a dynamic **Live Commentary Panel**, keeping your charts exceptionally clean and your mind focused on the trade execution.
**Key Features & Innovations**
* 🦇 **Automated Classic Patterns:** Instantly detects Bullish and Bearish Gartley, Bat, Butterfly, and Crab formations using a highly optimized, lag-free ZigZag engine.
* 🧠 **Live Commentary Panel:** The indicator speaks to you. Instead of just displaying raw math, the HUD translates ratios into actionable insights. It will tell you: *"Bat Candidate: Awaiting D at 0.886"* or *"Invalid: B point broke X origin"*.
* 📐 **Complete Auto-Fibonacci:** Once an XA leg is established, the script automatically draws a complete set of Fibonacci retracement and extension lines (from 0.0 all the way to 4.236). This allows you to visually anticipate where the D point (target) will land before it happens.
* 🛡️ **Smart Invalidation & Trend Filter:** The script knows when a pattern is mathematically dead. If the B point breaks the X origin, or if the price goes parabolic (extreme extension), it instantly invalidates the pattern to protect you from false signals.
* ✅ **Actionable Trade Plans:** Upon pattern confirmation, the script dynamically draws a Potential Reversal Zone (PRZ) box, precise Take Profit levels (TP1, TP2), and a strict Stop Loss (SL) line based on classical harmonic rules.
**How to Read the Indicator**
1. **Yellow Phase (Preparation):** The lines and the info panel are yellow. The script has found the X, A, B, and C points and is waiting for the D point to hit the Fibonacci target. Read the panel to see which pattern is forming.
2. **Green/Red Phase (Execution):** The target is hit! The panel turns Green (Bullish) or Red (Bearish). The PRZ box and TP/SL lines appear. This is your signal to look for reversal price action.
**Customizable Settings**
* **Wave Size (Pivot):** Adjusts the sensitivity of the ZigZag engine. Use lower values (e.g., 5-10) for scalp setups and higher values (e.g., 30-50) for macro swing trading.
* **Tolerance (%):** Financial markets are messy. The tolerance setting (default 10%) allows the script to catch valid patterns even if they miss the exact Fibonacci ratio by a few fractions.
* **Language:** Fully supports both English and Turkish interfaces.
* **Visual Toggles:** Turn the Auto-Fibo lines or the "Waiting" (Yellow) lines on/off to suit your visual preference.
*Disclaimer: Harmonic patterns represent high-probability reversal zones, not absolute guarantees. Always use the provided Stop Loss level and practice proper risk management.*
Indicator

ABCD Harmonic Projection [WillyAlgoTrader]📐 ABCD Harmonic Projection is an overlay indicator that automatically detects ABCD harmonic patterns from ZigZag pivots, validates them against Fibonacci ratio constraints (BC/AB retracement + CD/AB extension), scores each pattern with a 4-factor quality engine (0–100), projects the D-point completion zone, and draws Target and Stop zones with Fibonacci extension and retracement levels — with full TP/SL outcome tracking and separate bull/bear win rate statistics.
The ABCD pattern is one of the foundational harmonic structures: four alternating swing points (A→B→C→D) where the BC leg retraces a Fibonacci portion of the AB leg, and the CD leg extends from C toward a projected D-point that is a Fibonacci ratio of the AB leg. When price reaches the D-point, the pattern completes — and a reversal or continuation move is expected. This indicator automates the entire detection-to-target workflow: find the swings, measure the ratios, validate the geometry, project the target, and track the outcome.
🧩 WHY THESE COMPONENTS WORK TOGETHER
Manually identifying ABCD patterns requires eyeballing four pivot points, measuring two Fibonacci ratios, estimating the D-point projection, and drawing the target zone — across multiple instruments and timeframes. Most traders miss patterns or miscalculate ratios.
This indicator chains each step into an automated pipeline:
ZigZag pivot detection → 4-point ABCD extraction → BC/AB ratio validation → CD/AB extension calculation → D-point projection → 4-factor quality scoring → Target Zone + Stop Zone placement → Fibonacci extension/retracement overlay → TP/SL outcome tracking → Win rate statistics
The ZigZag engine ensures only confirmed alternating swings are used (no noise pivots). The ratio validation filters patterns to only those within Fibonacci-valid ranges. The quality scoring ranks patterns by how close they are to ideal geometry. The D-point projection gives a specific price target — not a vague area. And the Target/Stop zones provide precise trade management levels anchored to the pattern's own geometry.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ ZigZag pivot engine with direction management.
The indicator uses a directional ZigZag that enforces strict alternation: after a swing high, only a swing low is accepted (and vice versa). If price makes a higher high during an existing up-leg, the previous swing high is updated in place (not duplicated). This prevents the common problem of multiple consecutive highs being treated as separate pivots.
Pivots are detected using ta.pivothigh/ta.pivotlow with configurable lookback (default 8 bars). The ZigZag stores prices, bar indices, and directions in parallel arrays — providing the last 200 pivots for pattern scanning.
2️⃣ Fibonacci-validated ABCD pattern detection.
When a new pivot is confirmed and at least 4 pivots exist, the indicator extracts the most recent A, B, C points and validates:
— BC/AB retracement ratio : must be between minBcAbRatio (default 0.382) and maxBcAbRatio (default 0.886). Classic ABCD ratios are 0.382, 0.500, 0.618, 0.786, and 0.886. Patterns outside this range are rejected.
— ATR minimum swing filter : the AB leg must be at least 1× ATR in size — filtering out noise patterns during low-volatility bars.
— Minimum leg depth : AB must span at least 3 bars — ensuring the pattern has temporal structure, not just a single spike.
Pattern direction: if B > A → bullish ABCD (D projected above C). If B < A → bearish ABCD (D projected below C).
The D-point is projected from C using the average of the configurable CD/AB ratio range: projectedD = C + direction × |AB| × avgCdAbRatio.
3️⃣ 4-factor pattern quality scoring (0–100).
Each detected pattern receives a quality score from four dimensions:
— 📐 Fibonacci precision (45 pts) : how close BC/AB is to the nearest standard Fibonacci level (0.382, 0.500, 0.618, 0.786, 0.886, 1.000, 1.272, 1.618). Exact Fib ratio = full points. 0.05 away = partial. 0.18+ away = zero. This is the most heavily weighted factor because Fibonacci alignment is the core of harmonic pattern validity.
— ⏱️ Time symmetry (25 pts) : the ratio of estimated CD bars to AB bars. Perfect symmetry (CD bars = AB bars) = 25 points. Asymmetric patterns (one leg much longer) score lower.
— ⚖️ Price symmetry (20 pts) : BC retracement depth relative to 0.618 — deeper retests (closer to 0.618) score higher. Very shallow pullbacks (e.g., 0.236) receive fewer points.
— 📏 Leg maturity (10 pts) : AB leg length in bars — patterns with 8+ bars get full points, 5+ get 7, 3+ get 3. Single-bar spikes score zero.
Patterns below the Min Pattern Score threshold (default 40) are not displayed.
4️⃣ Fibonacci extension levels projected from C.
Four AB extension levels are drawn from point C in the direction of the pattern:
— 0.786 × |AB| — shallow completion
— 1.000 × |AB| — classic equal-leg ABCD
— 1.272 × |AB| — extended completion
— 1.618 × |AB| — maximum extension
The 1.0 level is drawn thicker (2px, less transparency) as it represents the ideal equal-leg completion. Each level includes a price label. Additionally, the measured BC/AB retracement ratio is displayed at the midpoint of the BC leg for reference.
5️⃣ Fibonacci retracement levels within C→D (partial TP targets).
For active patterns, three retracement levels are drawn between C and the projected D:
— 0.382 of CD range — first partial profit target
— 0.500 of CD range — mid-target
— 0.618 of CD range — aggressive partial take
These provide natural exit levels before the full D-point is reached — useful for scaling out of positions progressively.
6️⃣ Target Zone + Stop Zone with geometric sizing.
On each pattern:
— TARGET ZONE : a band around the projected D-point, sized at 10% of the CD range. For bullish patterns: the zone sits just below D. For bearish: just above D. This is where the pattern completion trade expects to reach profit.
— STOP ZONE : a band around point C, also sized at 10% of CD range. For bullish patterns: below C. For bearish: above C. If price returns past C, the pattern structure is broken.
Both zones extend rightward until price touches the target zone (tracked by touch bar), or the pattern resolves (TP/SL hit). Zones use distinct colors: green for target, red for stop.
7️⃣ TP/SL outcome tracking with separate bull/bear statistics.
Each active pattern monitors:
— TP hit : price reaches the projected D-point (high ≥ D for bull, low ≤ D for bear)
— SL hit : price returns past C against the pattern direction (low ≤ C for bull, high ≥ C for bear)
— Simultaneous TP+SL on the same bar → resolved as loss (conservative)
On TP hit: R:R is calculated as |entry to TP| / |entry to SL| and accumulated. The dashboard shows separate bull and bear win rates with average R:R on wins.
8️⃣ Active-only display mode.
When "Show Active Only" is enabled (default), completed patterns (TP or SL already hit) are hidden — only the current live pattern remains on the chart. When disabled, up to maxPatterns historical patterns are shown for context. This prevents chart clutter while maintaining full statistical tracking.
9️⃣ One-active-pattern constraint.
The indicator only allows one active pattern at a time. When an active pattern exists (status = 0), no new patterns are detected. This prevents overlapping projections and conflicting zones. A new pattern can only be detected after the current one resolves (TP or SL).
⚙️ HOW IT WORKS — CALCULATION FLOW
Step 1 — ZigZag: Directional pivot detection with alternation enforcement. Higher highs update existing swing (no duplicate). Lower lows same. Pivots stored in parallel arrays.
Step 2 — Pattern extraction: On each new confirmed pivot: extract A (3rd-to-last), B (2nd-to-last), C (latest). Compute AB length, BC length, BC/AB ratio.
Step 3 — Validation: BC/AB within Fibonacci range? AB ≥ ATR? AB ≥ 3 bars? No active pattern already?
Step 4 — Scoring: 4 factors: Fibonacci precision (45), time symmetry (25), price symmetry (20), leg maturity (10). Score ≥ minScore → pattern accepted.
Step 5 — Projection: D = C + direction × |AB| × avgCdAbRatio. Bars capped at maxBarsProjection.
Step 6 — Drawing: On barstate.islast: delete-and-redraw all visible patterns. AB and BC legs as solid lines. CD projection as dotted. A/B/C/D labels. Score label. Target/Stop zones as boxes. Fib extension and retracement levels as dashed lines with price labels.
Step 7 — Evaluation: Each bar: check all active patterns for TP/SL hits. Update status, accumulate win/loss stats, record R:R.
📖 HOW TO USE
🎯 Quick start:
1. Add the indicator — ABCD patterns appear automatically as colored leg lines with A/B/C/D labels
2. Yellow dotted line from C = projected path to D
3. Green "TARGET ZONE" box = where price should reach (take profit)
4. Red "STOP ZONE" box = where the pattern is invalidated (stop loss)
5. Blue dashed lines = Fibonacci extension levels (0.786, 1.0, 1.272, 1.618)
6. Blue dotted lines = partial TP targets (0.382, 0.5, 0.618 of CD)
7. "Long"/"Short" label = confirmed entry signal
👁️ Reading the chart:
— 🟢 Green legs + labels = bullish ABCD (D above C, expecting up-move)
— 🔴 Red legs + labels = bearish ABCD (D below C, expecting down-move)
— 🟡 Dotted projection line = expected path C → D
— 🟢 "TARGET ZONE" box = profit target area around projected D
— 🔴 "STOP ZONE" box = invalidation area around C
— 🔵 Dashed lines = Fib extension levels from C (0.786/1.0/1.272/1.618 of AB)
— 🔵 Dotted lines = CD retracement levels (partial TPs: 0.382/0.5/0.618)
— Score label (e.g., "72%") = pattern quality
📊 Dashboard fields:
— Patterns: active / total count
— Last Signal: direction + status (Active/TP ✓/SL ✗) + score
— Bull W/L: wins/losses and win rate for bullish patterns
— Bear W/L: wins/losses and win rate for bearish patterns
— Avg R:R: average reward-to-risk on winning bull/bear trades
— ATR: current value for reference
— Timeframe, version
🔧 Tuning guide:
— Too many patterns: increase ZigZag Length (12–21), increase Min Score (60+), enable ATR filter
— Too few patterns: decrease ZigZag Length (5–8), decrease Min Score (30), widen BC/AB ratio range
— Patterns too small: increase ATR filter or ZigZag Length
— Want only perfect geometry: narrow BC/AB to 0.500–0.786, set CD/AB to 0.9–1.1, Min Score 70+
— Extended patterns: set Max CD/AB to 1.618 or higher
⚙️ KEY SETTINGS REFERENCE
⚙️ Main:
— ZigZag Length (default 8): pivot detection lookback
— Pivot Sources : configurable high/low sources
📐 Pattern:
— Min/Max BC/AB Ratio (default 0.382/0.886): Fibonacci retracement range
— Min/Max CD/AB Ratio (default 0.786/1.618): extension range for D projection
— Min Pattern Score (default 40): quality threshold
— ATR Filter (default On): minimum swing size
— Max Patterns (default 3): display limit
— Active Only (default On): hide completed patterns
🎨 Visual:
— Buy/Sell signals, D projection, Fib levels, TP/SL zones, A/B/C/D labels, score (all toggleable)
— Auto / Dark / Light theme
🔧 Advanced:
— Max Bars for D Projection (default 200): limits distant projections
🔔 Alerts
— 🟢 LONG ABCD / 🔴 SHORT ABCD — entry, TP, SL, score, pattern type
All support plain text and JSON webhook format. Bar-close confirmed.
⚠️ IMPORTANT NOTES
— 🚫 No repainting. All signals require barstate.isconfirmed and newPivot (confirmed ZigZag pivot). Patterns are detected after the pivot bar closes. Drawings are rendered on barstate.islast using delete-and-redraw — previous bar's pattern state is final.
— 📐 The ZigZag enforces strict alternation : high → low → high → low. If price makes a higher high during an existing up-swing, the previous high is updated in place — no duplicate pivots are created. This is essential for correct A/B/C/D extraction.
— ⚖️ Only one active pattern is allowed at a time. New patterns are blocked until the current one resolves (TP or SL). This prevents conflicting signals and overlapping zones.
— 📊 The quality score is heavily weighted toward Fibonacci precision (45 out of 100 points). A pattern with BC/AB exactly at 0.618 scores much higher than one at 0.450. This reflects the harmonic principle that Fibonacci alignment is the primary measure of pattern validity.
— 🔒 Simultaneous TP+SL on the same bar is resolved as a loss (conservative) . This prevents ambiguous outcomes from inflating win rates.
— 📏 The D-point projection uses the average of the min/max CD/AB ratio range — not the exact 1.0 (equal legs). With default settings (0.786–1.618), the projected D is at 1.202× AB from C — between classic and extended. Adjust the CD/AB range to target specific completion types.
— 🛠️ This is a harmonic pattern detection and projection tool , not an automated trading bot. It identifies ABCD geometry, projects D-point targets, and provides structured trade zones — trade decisions remain yours.
— 🌐 Works on all markets and timeframes. Indicator

Trend Resonance Oscillator [JOAT]Trend Resonance Oscillator
Introduction
The Trend Resonance Oscillator is an open-source non-overlay indicator that measures multi-timeframe trend alignment and produces a composite resonance score. It fetches trend data from up to five configurable timeframes, calculates whether they agree on direction, and outputs an oscillator that reflects the degree of alignment. When most or all timeframes point the same way, the oscillator reaches extreme values and the indicator declares a state of "resonance" — a condition where directional conviction is high across the time spectrum. It also includes quantum-inspired coherence scoring, harmonic pattern detection, and momentum alignment visualization.
Built with Pine Script v6, the indicator uses custom types for trend state, resonance state, timeframe data, quantum state, and harmonic patterns.
Why This Indicator Exists
A trade taken in the direction of the 5-minute trend may fail if the 1-hour and daily trends disagree. Multi-timeframe alignment is one of the most reliable filters for trade quality, but checking multiple timeframes manually is tedious and subjective. This indicator automates that process by:
Simultaneous MTF analysis: Fetches close, EMA, and rate-of-change data from five configurable timeframes in a single indicator
Alignment scoring: Quantifies how many timeframes agree on direction and how strong each trend is, producing a single composite score
Resonance detection: Identifies periods when alignment exceeds a configurable threshold, signaling high-conviction directional conditions
Confluence signals: Generates labeled signals when a minimum number of timeframes align, providing clear entry confirmation
Coherence and entanglement metrics: Measures the consistency and correlation between timeframe trends, adding depth beyond simple directional agreement
Core Components Explained
1. Multi-Timeframe Trend Detection
For each of the five timeframes (default: 5m, 15m, 1H, 4H, Daily), the indicator fetches close price, EMA, and rate-of-change using `request.security()` with proper lookahead settings to avoid repainting:
float _tf1Close = request.security(syminfo.tickerid, tf1, close, barmerge.gaps_off, barmerge.lookahead_off)
float _tf1EMA = request.security(syminfo.tickerid, tf1, _globalEMA, barmerge.gaps_off, barmerge.lookahead_off)
Each timeframe's trend is classified as bullish, bearish, or flat based on the percentage difference between close and EMA relative to a configurable threshold (default 0.5%). The trend strength is calculated as the magnitude of that percentage difference, capped at 100.
2. Alignment Score Calculation
The alignment score counts how many timeframes are bullish versus bearish, then produces a normalized score from -100 (all bearish) to +100 (all bullish):
+100: All active timeframes are bullish — maximum bullish alignment
+60: Majority bullish with some neutral — strong bullish bias
0: Equal bullish and bearish — no directional consensus
-60: Majority bearish — strong bearish bias
-100: All bearish — maximum bearish alignment
The alignment score is weighted by the average trend strength across all active timeframes, so a +80 alignment with strong individual trends produces a higher oscillator value than +80 alignment with weak trends.
3. Resonance Detection
Resonance occurs when the ratio of aligned timeframes to total active timeframes exceeds the resonance threshold (default 0.7) and the aligned count meets the minimum confluence requirement (default 4 timeframes). During resonance, the background is tinted to indicate the directional bias, and a duration counter tracks how long the resonance state has persisted.
Sustained resonance (high duration) suggests a strong, established trend. New resonance (low duration) may signal the beginning of a directional move. The dashboard displays the resonance score, aligned count, and duration for quick assessment.
The Trend Resonance Oscillator panel showing the main oscillator line with gradient coloring, MTF trend bars at the bottom showing individual timeframe directions, resonance background shading during a strong bullish alignment, and confluence/resonance signal labels
4. Quantum Coherence and Entanglement
The indicator calculates two additional metrics inspired by quantum physics concepts (used as analytical metaphors, not literal physics):
Coherence: The ratio of aligned timeframes to total timeframes. A coherence of 1.0 means perfect agreement. When coherence exceeds the threshold (default 0.8), the indicator enters a "coherent" state, which is visualized as a subtle wave pattern on the oscillator.
Entanglement: Measures the pairwise correlation between all timeframe trends. For each pair of timeframes, if they agree on direction, the entanglement score increases; if they disagree, it decreases. High entanglement means timeframes are moving in lockstep.
for i = 0 to 3
for j = i + 1 to 4
if trend_i != 0 and trend_j != 0
correlation = trend_i == trend_j ? 1.0 : -1.0
entanglement += correlation
pairs += 1
When the quantum superposition score (combination of coherence and entanglement) exceeds a threshold, a "quantum collapse" signal fires, indicating that all timeframes have converged to a single directional state.
5. Harmonic Pattern Detection
The harmonic module detects cyclical patterns in the resonance data. When resonance is sustained for more than 10 bars, the pattern is classified as a sine wave (smooth, established trend). When resonance is new or intermittent, it is classified as a square wave (choppy, emerging trend). The harmonic wave is plotted as a subtle overlay on the oscillator.
6. Confluence and Signal System
The indicator generates three tiers of signals, with higher tiers taking priority:
CONF (Confluence): Minimum timeframes aligned with alignment score >= 70
RES (Resonance): Strong resonance with score >= 80
QTM (Quantum): Quantum collapse — all metrics converge to a single state
Each signal fires only on its first bar (not continuously), preventing chart clutter. Signals are color-coded with gradient intensity based on the underlying strength.
Visual Elements
Main Oscillator: Smoothed alignment score plotted as a line with gradient coloring from bearish to bullish
Reference Levels: Lines at 0 (neutral), +/-50 (moderate), +/-80 (strong)
MTF Trend Bars: Five colored column bars at the bottom of the panel, each representing one timeframe's trend direction and strength
Resonance Background: Tinted background during resonance states
Quantum Superposition Line: Step-line showing the quantum composite score
Coherence Wave: Subtle area plot showing coherence oscillation
Harmonic Pattern: Sine/square wave overlay during active resonance
Momentum Alignment: Area histogram showing aggregate momentum across timeframes
Convergence/Divergence: Histogram showing agreement between momentum and oscillator
Signal Labels: CONF, RES, and QTM labels at signal points
Entanglement Lines: Visual connections when timeframe entanglement is high
Dashboard: Comprehensive table showing each timeframe's trend, strength, and the aggregate resonance metrics
Input Parameters
Multi-Timeframe Settings:
Toggle and configure each of 5 timeframes (default: 5m, 15m, 1H, 4H, Daily)
Trend Detection:
Trend EMA Length (default 20), Momentum Length (default 14), Trend Threshold (default 0.5%)
Resonance Settings:
Resonance Lookback (default 20), Resonance Threshold (default 0.7)
Show Resonance Zones toggle
Alignment Scoring:
Min TFs for Confluence (default 4)
Show Alignment Score and Confluence Signals
Advanced Resonance:
Quantum Resonance, Coherence Waves, Entanglement Lines, Harmonic Patterns toggles
Coherence Threshold (default 0.8), Harmonic Period (default 8)
Visual Settings:
Show Oscillator, MTF Bars, Dashboard, Glow Effects, Waveform
Color Scheme: Quantum, Classic, Professional, Neon
How to Use This Indicator
Step 1: Check the MTF trend bars at the bottom of the panel. If all five bars are the same color (all bullish or all bearish), you have strong multi-timeframe alignment.
Step 2: Read the oscillator value. Values above +50 indicate moderate bullish alignment; above +80 indicates strong alignment. The inverse applies for bearish readings.
Step 3: Watch for resonance background shading. When the background turns bullish or bearish, the indicator has detected sustained multi-timeframe agreement — this is the highest-conviction environment for directional trades.
Step 4: Use CONF, RES, and QTM signals as entry confirmations. A CONF signal in the direction of the oscillator provides moderate confirmation. A RES or QTM signal provides strong confirmation.
Step 5: Monitor the momentum alignment area. When momentum and the oscillator agree, the move has both directional alignment and momentum behind it. When they diverge, the move may be losing steam.
Dashboard showing all five timeframes with their individual trend states, the aggregate resonance score, coherence level, entanglement reading, and harmonic pattern status
Indicator Limitations
Multi-timeframe data requires sufficient history on all selected timeframes. On newly listed instruments, higher timeframe data may be limited.
The indicator uses `request.security()` with `barmerge.lookahead_off` to prevent repainting, but the inherent delay of higher timeframe data means signals reflect confirmed (not real-time) higher timeframe states.
Alignment does not guarantee profitable trades. All timeframes can align in one direction and then reverse simultaneously.
The quantum and harmonic features are analytical metaphors that provide useful metrics, not literal physics simulations.
On very low timeframes (1m or less), higher timeframe data updates infrequently, which can make the oscillator appear static for extended periods.
The indicator makes multiple `request.security()` calls, which counts against PulseWire's security call limit.
Originality Statement
This indicator is original in its comprehensive multi-timeframe resonance framework. While MTF trend indicators exist, this indicator is justified because:
It produces a quantified resonance score that measures not just direction but the degree and duration of multi-timeframe agreement
The coherence and entanglement metrics add pairwise correlation analysis between timeframes, going beyond simple directional counting
The three-tier signal system (CONF/RES/QTM) provides graduated confidence levels based on the strength of alignment
Harmonic pattern detection on the resonance data identifies whether alignment is sustained (sine) or emerging (square)
The momentum alignment overlay shows whether aggregate momentum across timeframes supports the directional reading
The weighted oscillator combines alignment direction with individual trend strength for a more nuanced composite score
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Multi-timeframe alignment is a powerful filter but does not guarantee profitable trades. Always use proper risk management. The author is not responsible for any losses incurred from using this indicator.
-Made with passion by officialjackofalltrades
Indicator

Fibonacci Imbalance Zones [JOAT]Fibonacci Imbalance Zones
Introduction
Fibonacci Imbalance Zones is an open-source overlay indicator that merges automatic Fibonacci retracement with Fair Value Gap (FVG) detection and order block identification to find high-probability confluence zones where institutional concepts overlap. When a Fibonacci level aligns with an unmitigated FVG or an active order block, the indicator highlights that zone as a confluence point and optionally generates entry signals. It bridges the gap between classical Fibonacci analysis and modern Smart Money Concepts.
Built with Pine Script v6, the indicator uses custom types for Fibonacci levels, FVG zones, confluence points, swing points, order blocks, and institutional levels.
Why This Indicator Exists
Fibonacci retracement and FVG analysis are both widely used, but they are almost always applied as separate tools. Traders manually eyeball whether a Fibonacci level happens to overlap with an FVG, which is subjective and error-prone. This indicator automates that process by:
Auto-Fibonacci calculation: Automatically identifies the most recent significant swing high and swing low using pivot detection, then draws Fibonacci levels between them — no manual drawing required
FVG lifecycle tracking: Detects bullish and bearish FVGs, filters them by minimum size (ATR-based), tracks mitigation, and classifies them as premium or discount relative to fair value
Confluence detection: Programmatically checks whether any active Fibonacci level falls within a configurable ATR tolerance of any unmitigated FVG or order block, and calculates a confluence strength score
Entry signal generation: When price enters an FVG zone that overlaps with a key Fibonacci level (0.500-0.786 range), the indicator generates a directional entry signal
Core Components Explained
1. Automatic Fibonacci Levels
The indicator uses pivot detection to find the most significant recent swing high and swing low. The pivot strength parameter (default 5) controls how many bars on each side must be lower/higher for a point to qualify as a swing. Once swings are identified, Fibonacci levels are calculated:
calcFibLevel(float swingH, float swingL, float ratio, int direction) =>
float level = na
if direction > 0
level := swingL + (swingH - swingL) * ratio
else
level := swingH - (swingH - swingL) * ratio
level
Standard levels include 0.236, 0.382, 0.500, 0.618, and 0.786, each toggleable independently. Extensions at 1.618 and 2.272 are also available. When harmonic ratios are enabled, additional levels at 0.127, 0.414, 0.707, and 0.886 are drawn, covering the full spectrum of Fibonacci and harmonic trading levels.
Each level is drawn as a dashed line extending from the swing range to the right of the chart, with a label showing the ratio. Harmonic ratios receive a glow effect (thicker line, lower transparency) to visually distinguish them from standard levels.
2. FVG Detection with Premium/Discount Classification
Fair Value Gaps are detected using the standard three-bar pattern: a bullish FVG forms when the current bar's low is above the high from two bars ago. The indicator filters FVGs by a minimum size threshold (default 0.3x ATR) to avoid plotting insignificant gaps.
Each FVG is classified as premium or discount relative to the fair value of the middle candle:
Premium FVG: The gap's midpoint is above fair value — sellers may have an edge
Discount FVG: The gap's midpoint is below fair value — buyers may have an edge
FVGs are drawn as colored boxes. Premium FVGs use a gold color, discount FVGs use cyan, and neutral FVGs use the standard bull/bear colors. When mitigation tracking is enabled, the indicator monitors each FVG and updates its visual style (dotted border, faded color) when price fills the gap's midpoint.
Chart showing auto-drawn Fibonacci levels between swing high and swing low, with FVG boxes classified as premium (gold) and discount (cyan), and confluence diamonds where Fibonacci levels overlap with FVGs
3. Order Block Detection
The indicator identifies order blocks as the last opposing candle before a significant swing point, filtered by volume. A bullish order block is the last bearish candle before a swing high, but only if the volume on that candle exceeds 1.5x the 20-period volume average. This volume filter ensures that only institutionally significant order blocks are tracked.
Order blocks are drawn as semi-transparent boxes and monitored for sweeps. When price breaks through an order block, it is marked as swept and its visual is updated to a neutral, dotted style.
4. Confluence Detection Engine
The confluence engine is the core innovation of this indicator. It iterates through all active Fibonacci levels and checks each one against all unmitigated FVGs and active order blocks:
tolerance = atrVal * confluenceTol
for fib in fibLevels
if fib.isActive
for fvg in fvgZones
if not fvg.isMitigated
if math.abs(fib.price - fvg.mid) < tolerance
confStrength += 1
Each confluence point receives a strength score based on how many factors align:
Fibonacci level + FVG = base confluence
Add +1 if the Fibonacci level is a harmonic ratio (0.382, 0.618, etc.)
Add +1 if the FVG is in the premium or discount zone
Add +1 if the FVG has above-average volume
Add +1 if an order block also overlaps
Confluence points are drawn as labeled boxes showing which factors are present (e.g., "Harmonic+Discount+Volume"). A minimum confluence strength threshold (default 2) filters out weak confluences.
5. Entry Signal Generation
When entry signals are enabled, the indicator generates a bullish entry when price enters a bullish FVG zone that overlaps with a Fibonacci level in the 0.500-0.786 range (the "golden pocket") and the current candle closes bullish. The bearish entry is the inverse. These signals are plotted as circles below (bullish) or above (bearish) the price bars.
Visual Elements
Fibonacci Lines: Dashed lines at each active ratio with labels, harmonic ratios get glow effect
FVG Boxes: Color-coded by direction and premium/discount status, updated on mitigation
Order Block Boxes: Semi-transparent boxes with sweep tracking
Confluence Boxes: Highlighted zones where Fibonacci and FVG/OB overlap, with strength labels
Entry Signals: Circle markers for bullish/bearish entries at confluence zones
Structure Line: Line connecting the swing high and swing low
Background Coloring: Subtle trend-direction background tint
Dashboard: Displays current Fibonacci range, trend direction, active FVG count, confluence count, and entry status
Input Parameters
Fibonacci Settings:
Swing Lookback (default 50) and Pivot Strength (default 5)
Toggle each standard level (0.236, 0.382, 0.500, 0.618, 0.786) and extensions
FVG Detection:
FVG Max Age (default 50 bars)
Track Mitigation toggle
Min FVG Size (default 0.3 ATR)
Confluence Settings:
Confluence Tolerance (default 0.3 ATR)
Show Entry Signals and Confluence Strength
Min Confluence Strength (default 2)
Advanced Fibonacci:
Show Harmonic Ratios (0.127, 0.414, 0.707, 0.886)
Show Institutional Levels (volume-based levels near swings)
Show Smart Money Concepts and Order Blocks
Show Premium/Discount classification
Visual Settings:
Color Scheme: Quantum, Classic, Professional, or Minimal
Show Structure Lines, Dashboard, Glow Effects, Animation
Max Visual Elements (default 30)
How to Use This Indicator
Step 1: Let the indicator automatically identify the current swing range and draw Fibonacci levels. The structure line shows the swing high to swing low connection.
Step 2: Identify the trend direction from the structure line. In an uptrend (swing low formed after swing high), look for bullish setups at discount Fibonacci levels (0.618, 0.786). In a downtrend, look for bearish setups at premium levels.
Step 3: Watch for confluence diamonds. When a Fibonacci level overlaps with an unmitigated FVG, the confluence box appears. Higher strength confluences (3+) are more significant.
Step 4: If entry signals are enabled, wait for price to enter the confluence zone and print a confirming candle (bullish close for longs, bearish close for shorts).
Step 5: Use order blocks within the confluence zone as precise entry levels. The order block's range provides a natural stop-loss area (below the OB for longs, above for shorts).
Close-up of a high-strength confluence zone showing a 0.618 Fibonacci level overlapping with a discount FVG and a bullish order block, with an entry signal circle below the bar
Indicator Limitations
Automatic Fibonacci levels depend on pivot detection, which has an inherent delay. The swing points update only after the pivot is confirmed.
Fibonacci levels are drawn between the two most recent significant swings. In choppy markets with many equal swings, the selected range may not be the most relevant one.
FVG detection uses the standard three-bar pattern, which can produce many gaps on volatile instruments. Use the minimum size filter to manage this.
Confluence detection is proximity-based. A Fibonacci level near an FVG does not guarantee a price reaction — it identifies a zone of potential interest.
Entry signals are mechanical and do not account for broader market context. They should be used as alerts for further analysis, not as standalone trade triggers.
The indicator draws many visual elements. On busy charts, consider using the Max Visual Elements setting and disabling less critical features.
Originality Statement
This indicator is original in its automated confluence detection between Fibonacci analysis and Smart Money Concepts. While Fibonacci tools and FVG indicators exist separately, this indicator is justified because:
It programmatically detects overlap between Fibonacci levels and FVG zones, eliminating subjective visual assessment
The confluence strength scoring system quantifies how many institutional factors align at each zone
Premium/discount FVG classification adds a fair-value context layer to standard FVG detection
Volume-filtered order block detection integrated with Fibonacci levels creates a three-way confluence system
Harmonic ratio support extends beyond standard Fibonacci to cover the full spectrum of institutional trading levels
The entry signal system combines Fibonacci position, FVG presence, and candle confirmation into a structured trigger
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Fibonacci levels and FVG analysis are interpretive tools, not predictive guarantees. Always use proper risk management. The author is not responsible for any losses incurred from using this indicator.
-Made with passion by officialjackofalltrades
Indicator

Harmonic Resonance Field [JOAT]Harmonic Resonance Field
Introduction
The Harmonic Resonance Field is an open-source overlay indicator that combines dynamic range detection, Renko-style trend tracking, harmonic frequency analysis, and magnetic field visualization into a unified system for identifying consolidation zones, trend direction, and potential reversal points. It is designed for traders who want to understand where price is within its current range, how strong the prevailing trend is, and when conditions are ripe for a breakout or mean reversion.
Built with Pine Script v6, the indicator uses custom user-defined types for Renko state management, range detection, reversal signals, harmonic bands, magnetic fields, and resonance points.
Why This Indicator Exists
Range-bound markets account for a significant portion of trading time, yet most indicators are optimized for trending conditions. This indicator fills that gap by providing:
ADX-based range detection: Automatically identifies when the market is ranging versus trending using ADX with a configurable threshold, so traders know which strategy framework to apply
Multi-style band calculation: Offers four band calculation methods (ATR, Percentage, Standard Deviation, Harmonic) so traders can choose the volatility measure that best fits their instrument
Renko trend overlay: A smoothed Renko-style trend line that filters noise and shows the dominant direction without requiring a separate Renko chart
Harmonic frequency analysis: Uses sine-wave modulation to create bands that expand and contract with market rhythm, capturing cyclical behavior that static bands miss
Magnetic field visualization: Plots dynamic attraction/repulsion levels around the mean, helping traders visualize where price is likely to gravitate
Core Components Explained
1. Range Detection Engine
The indicator uses ADX to classify market conditions. When ADX falls below the configurable threshold (default 25), the market is classified as ranging, and the indicator highlights the range boundaries. When ADX rises above the threshold, the market is trending, and the indicator shifts focus to the Renko trend line and harmonic bands.
adxSmoothed = ta.rma(dx, adxLength)
isRanging = adxSmoothed < adxThreshold
During ranging conditions, the indicator calculates the highest high and lowest low over the range lookback period and draws a dynamic range box with upper, lower, and midline levels. This gives traders clear boundaries for mean reversion strategies.
2. Harmonic Band System
The band system supports four calculation styles:
ATR: Bands based on Average True Range multiplied by a configurable factor
Percentage: Bands at a fixed percentage distance from the mean
Standard Deviation: Bollinger-style bands using standard deviation
Harmonic: Bands modulated by a sine wave that creates rhythmic expansion and contraction
The harmonic mode is unique to this indicator. It calculates a phase and amplitude based on bar position and ATR, then modulates the band width with a sine function:
harmonicPhase = math.sin(bar_index * 2 * math.pi / bandLength) * 0.5 + 0.5
harmonicAmplitude = atrVal * bandMultiplier
bandWidth = harmonicAmplitude * (0.5 + harmonicPhase * 0.5)
This creates bands that breathe with the market's natural rhythm rather than remaining static or purely reactive.
Chart showing the Harmonic Resonance Field with harmonic bands expanding and contracting around price, Renko trend line, and range detection box during a consolidation period
3. Renko Trend Engine
Rather than requiring traders to switch to a Renko chart, this indicator calculates a Renko-style trend directly on the standard candlestick chart. The brick size can be set using ATR, a fixed percentage, or a static value. The Renko state is managed as a custom type that tracks the current level, direction, and brick boundaries.
When price moves by one brick size in the trend direction, the Renko level advances. When price reverses by the configurable reversal multiplier (default 2 bricks), the trend flips. The result is a stepped trend line overlaid on the chart that filters minor fluctuations and shows only significant directional changes.
4. Magnetic Field Visualization
The magnetic field creates a set of attraction levels around the mean price. These levels represent zones where price tends to gravitate based on the configurable field strength parameter. The field is calculated using the distance from the mean and the current ATR:
Strong attraction zone: Within 0.5x ATR of the mean — price tends to consolidate here
Moderate zone: 0.5x to 1.0x ATR from the mean — normal trading range
Weak zone: Beyond 1.0x ATR — price is extended and may revert
The magnetic field lines are drawn with gradient transparency, becoming more transparent as they move away from the mean, visually communicating the decreasing "pull" of the mean at greater distances.
5. Reversal and Resonance Detection
The indicator generates two types of signals:
Reversal signals: Triggered when price reaches the outer bands with momentum showing signs of exhaustion (RSI-based or rate-of-change based). These are plotted as directional markers on the chart.
Resonance signals: Triggered when multiple conditions align — price at a band extreme, ranging market detected, and volume above average. Resonance points represent higher-conviction mean reversion opportunities.
Visual Elements
Harmonic Bands: Upper and lower bands with gradient fill between them
Renko Trend Line: Stepped line showing the dominant trend direction
Range Box: Dynamic box highlighting the current consolidation range
Magnetic Field Lines: Gradient-colored attraction levels around the mean
Reversal Markers: Directional signals at potential turning points
Resonance Points: High-confluence mean reversion signals
Candle Coloring: Optional trend-based candle coloring
Dashboard: Displays trend direction, range status, band width, Renko state, and resonance count
Input Parameters
Range Detection:
Range Lookback (default 50)
ADX Length (default 14) and ADX Threshold (default 25)
Band Settings:
Band Style: ATR, Percentage, Standard Dev, or Harmonic
Band Length (default 20) and Band Multiplier (default 2.0)
Renko Settings:
Brick Size Style: ATR, Percentage, or Static
Brick Size (default 1.0) and Reversal Multiplier (default 2)
Magnetic Field:
Field Strength (0.1-2.0, default 1.0)
Visual Settings:
Show Candle Coloring, Gradient Fill, Dashboard, Glow Effects, Pulse Effects
How to Use This Indicator
Step 1: Check the dashboard for the current market regime. If the market is ranging, focus on the range box boundaries and magnetic field levels for mean reversion setups.
Step 2: In trending conditions, follow the Renko trend line. Stay with the trend as long as the Renko direction holds. A Renko reversal (direction flip) is a significant event that suggests the trend may be changing.
Step 3: Watch for price reaching the outer harmonic bands. In ranging markets, these represent potential reversal zones. In trending markets, they may indicate overextension.
Step 4: Look for resonance signals. These combine multiple conditions (band extreme + ranging + volume) and represent the highest-conviction mean reversion setups.
Step 5: Use the magnetic field levels as dynamic support and resistance. Price tends to gravitate toward the strong attraction zone near the mean.
Close-up showing reversal markers at band extremes with resonance signals highlighted during a ranging market, with the magnetic field gradient visible around the mean
Indicator Limitations
ADX-based range detection has an inherent lag. The transition from trending to ranging (and vice versa) is identified after it has already begun.
Harmonic bands use a fixed-frequency sine wave. Real market cycles are not perfectly periodic, so the harmonic modulation is an approximation.
Renko trend calculations on a candlestick chart are a simulation. They will not match a true Renko chart exactly due to differences in bar construction.
Reversal signals at band extremes do not guarantee reversals. In strong trends, price can ride the outer band for extended periods.
The magnetic field visualization is a conceptual tool for understanding mean reversion tendency, not a precise prediction of where price will go.
Performance may be affected on very low timeframes with many visual elements enabled. Consider reducing visual effects on sub-minute charts.
Originality Statement
This indicator is original in its synthesis of range detection, harmonic frequency analysis, and magnetic field visualization. While individual components (ADX range detection, Renko trends, Bollinger-style bands) are established concepts, this indicator is justified because:
The harmonic band mode introduces sine-wave modulation to create bands that rhythmically expand and contract, a method not found in standard band indicators
The magnetic field visualization provides a novel way to represent mean reversion tendency using gradient-based attraction zones
Combining Renko trend tracking with ADX range detection on a standard chart gives traders both trend-following and mean-reversion frameworks simultaneously
Resonance detection creates a multi-factor confluence signal by combining band position, range status, and volume conditions
The four-style band system (ATR, Percentage, StdDev, Harmonic) allows traders to adapt the indicator to different instruments and market conditions
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Range detection and band analysis are tools for understanding market structure, not guarantees of future price movement. Always use proper risk management. The author is not responsible for any losses incurred from using this indicator.
-Made with passion by officialjackofalltrades
Indicator

Harmonic Pulse Tracker [JOAT]Harmonic Pulse Tracker
Introduction
The Harmonic Pulse Tracker is an open-source institutional-grade wave and rhythm analysis system that combines Elliott Wave principles, Fibonacci harmonic analysis, WaveTrend oscillator mechanics, and cycle detection into a unified oscillator. This sophisticated system integrates multiple proven methodologies to identify high-probability reversal zones where harmonic patterns, wave cycles, and momentum indicators converge.
The indicator is designed for traders who understand that market movements follow natural harmonic patterns and cyclical rhythms. By synthesizing detrended price oscillation, Fibonacci retracement levels, WaveTrend momentum analysis, money flow dynamics, and volume confirmation, this tool helps identify structural market turning points with mathematical precision.
Why This Integration Exists
This indicator combines six distinct analytical frameworks that complement each other:
Harmonic Wave Analysis: Uses detrended price oscillation combined with Ehlers cycle detection to identify natural market rhythms
Fibonacci Harmonic Levels: Calculates dynamic Fibonacci retracements and extensions based on wave swing points
WaveTrend Oscillator: Implements LazyBear's WaveTrend algorithm for momentum and overbought/oversold detection
Money Flow Integration: Tracks institutional buying and selling pressure through Money Flow Index analysis
Volume Analysis: Confirms wave movements with volume spikes and directional volume pressure
Elliott Wave Counting: Simplified wave counting system to identify impulse and corrective wave phases
Each component addresses different aspects of market rhythm and harmony. The harmonic wave engine identifies natural price cycles, Fibonacci levels provide mathematical support/resistance, WaveTrend shows momentum extremes, money flow reveals institutional activity, volume confirms genuine moves, and Elliott Wave counting provides structural context. Together, they create a multi-dimensional view of market harmony and discord.
Core Components Explained
1. Harmonic Wave Engine
The core wave calculation combines two advanced techniques:
DPO (Detrended Price Oscillator) = close - sma(close, length/2 + 1)
Ehlers Cycle Component = High-pass filtered price with cycle smoothing
Harmonic Wave = Smoothed DPO + (Cycle Component * 0.5)
This creates a wave that removes trend bias while preserving cyclical components, revealing the natural harmonic rhythm of price movement.
Wave Derivatives:
- Wave Momentum: Rate of change in harmonic wave
- Wave Acceleration: Rate of change in momentum
- Wave Velocity: Percentage rate of change over 5 periods
These derivatives help identify wave phase transitions and momentum shifts before they become obvious in price.
2. Fibonacci Harmonic Level System
The indicator calculates dynamic Fibonacci levels based on harmonic wave swing points:
Standard Retracements:
- 23.6%, 38.2%, 50.0%, 61.8%, 78.6% of wave range
Extensions:
- 127.2%, 161.8%, 261.8% beyond wave high
Golden Pocket Zone:
The critical 61.8% to 78.6% retracement zone where most harmonic reversals occur. This zone represents the mathematical sweet spot where Fibonacci ratios converge with natural market rhythm.
Harmonic Resonance Detection:
The system identifies when price is within 5% of key Fibonacci levels and calculates confluence scores when multiple levels align.
3. WaveTrend Oscillator Integration
Implements the proven WaveTrend algorithm:
ESA = ema(hlc3, channel_length)
D = ema(abs(hlc3 - ESA), channel_length)
CI = (hlc3 - ESA) / (0.015 * D)
WT1 = ema(CI, average_length)
WT2 = sma(WT1, 4)
WaveTrend Signals:
- Crossovers in oversold zone (< -50): Bullish reversal signals
- Crossunders in overbought zone (> 50): Bearish reversal signals
- Regular crossovers: Momentum shift confirmation
4. Money Flow Analysis
Tracks institutional buying and selling pressure:
MFI = Money Flow Index over specified period
MFI Centered = (MFI - 50) * multiplier
- Positive MFI: Institutional buying pressure
- Negative MFI: Institutional selling pressure
- Strong MFI: Absolute value > 25 indicates significant institutional activity
5. Volume Analysis Engine
Comprehensive volume analysis including:
Volume Spikes: Volume > Average Volume * Threshold
Volume Ratio: Current volume / Average volume
Volume Strength: Normalized volume intensity (0-100)
Directional Volume:
- Bullish Volume Spike: High volume + green candle
- Bearish Volume Spike: High volume + red candle
6. Elliott Wave Phase Detection
Simplified wave analysis to identify market structure:
Impulse Waves:
- Impulse Up: Positive momentum + acceleration + velocity
- Impulse Down: Negative momentum + acceleration + velocity
Corrective Waves:
- Mixed momentum and acceleration signals indicating consolidation
Wave Counting:
Basic 5-wave count system that resets after wave 5 completion, helping identify potential reversal zones.
Multi-Factor Confluence Scoring System
The indicator calculates a real-time confluence score (0-100) by weighting each component:
Confluence Score Components:
- Fibonacci Zone: Up to 20 points (Golden Pocket = 20, other Fib levels = 4 each)
- Wave Strength: Up to 20 points (based on wave momentum intensity)
- WaveTrend: Up to 20 points (extreme zone crossovers = 20, regular = 15)
- Money Flow: Up to 20 points (strong institutional activity = 20)
- Volume: Up to 20 points (volume spikes = 20, elevated = 15)
Scores above 80 indicate exceptional confluence for potential trades. The dashboard displays individual component scores for transparency.
Perfect Harmonic Alignment Detection
The system identifies rare "Perfect Harmonic" setups when:
- Price is in Golden Pocket zone
- Impulse wave phase is active
- Wave strength > 70
- WaveTrend crossover in extreme zone
- Positive money flow (for bullish) or negative (for bearish)
- Volume spike confirmation
These setups represent the highest probability reversal opportunities.
Visual Elements
Harmonic Wave: Main oscillator with gradient coloring based on wave position
Wave Momentum: Histogram showing rate of change in wave movement
Fibonacci Levels: Key retracement and extension levels (38.2%, 50%, 61.8%, 78.6%, 161.8%)
Golden Pocket Zone: Highlighted area between 61.8% and 78.6% levels
WaveTrend Lines: WT1 and WT2 with overbought/oversold zones
Money Flow Columns: Institutional buying/selling pressure visualization
Volume Strength: Volume intensity histogram
Signal Markers: Perfect Harmonic signals and strong confluence alerts
Background Zones: Golden Pocket and Perfect Signal highlighting
Dashboard: Real-time display of all component values and confluence score
How Components Work Together
The integration creates a harmonic analysis approach:
Layer 1 - Wave Rhythm: Harmonic wave identifies natural market cycles and turning points
Layer 2 - Mathematical Levels: Fibonacci ratios provide precise support/resistance zones
Layer 3 - Momentum Context: WaveTrend shows overbought/oversold extremes
Layer 4 - Institutional Flow: Money flow reveals smart money positioning
Layer 5 - Volume Confirmation: Volume analysis validates genuine moves vs noise
Layer 6 - Wave Structure: Elliott Wave context provides structural framework
Example scenario: Harmonic wave reaches Golden Pocket zone (Layer 1 + 2) during WaveTrend oversold crossover (Layer 3) with positive money flow (Layer 4) and volume spike (Layer 5) in corrective wave phase (Layer 6). This confluence suggests exceptional reversal probability.
Input Parameters
Wave Settings:
Wave Length: Period for harmonic wave calculation (default: 34)
Smoothing Period: Wave smoothing factor (default: 5)
WaveTrend Settings:
Show WaveTrend: Toggle WaveTrend display
WT Channel Length: Channel calculation period (default: 9)
WT Average Length: Smoothing period (default: 12)
WT Overbought: Overbought threshold (default: 50)
WT Oversold: Oversold threshold (default: -50)
Money Flow Settings:
Show Money Flow: Toggle money flow display
MFI Length: Money Flow Index period (default: 14)
MFI Multiplier: Sensitivity adjustment (default: 1.5)
Volume Settings:
Show Volume Analysis: Toggle volume indicators
Volume Spike Threshold: Multiplier for spike detection (default: 1.5)
Fibonacci Settings:
Show Fibonacci Levels: Toggle Fibonacci level display
Fibonacci Lookback: Period for swing point calculation (default: 100)
Cycle Settings:
Cycle Period: Ehlers cycle detection period (default: 20)
Cycle Smoothing: Cycle component smoothing (default: 3)
How to Use This Indicator
Step 1: Identify Wave Phase
Check the dashboard for current wave phase (Impulse Up/Down, Corrective, Neutral) and Elliott Wave count.
Step 2: Locate Fibonacci Zones
Look for price approaching key Fibonacci levels, especially the Golden Pocket zone (61.8%-78.6%).
Step 3: Check WaveTrend Position
Identify if WaveTrend is in extreme zones and watch for crossovers in oversold/overbought areas.
Step 4: Analyze Money Flow
Confirm institutional positioning through Money Flow Index - positive for bullish setups, negative for bearish.
Step 5: Verify Volume Confirmation
Ensure volume supports the move - look for volume spikes in the direction of the expected reversal.
Step 6: Review Confluence Score
Check the dashboard confluence score. Scores above 80 indicate high-probability setups.
Step 7: Wait for Perfect Harmonic Signals
The highest probability trades occur when "PERFECT" signals appear, indicating all factors are aligned.
Best Practices
Use on 15-minute to 4-hour timeframes for optimal harmonic detection
Focus on Golden Pocket zone entries - this is where most harmonic reversals occur
Wait for WaveTrend crossovers in extreme zones for best risk:reward
Confirm with money flow direction - institutional flow should support the trade direction
Volume spikes add significant confirmation to harmonic setups
Perfect Harmonic signals are rare but offer exceptional probability
Wave 5 completions often coincide with major reversal opportunities
Use confluence scores above 80 as primary filter for trade selection
Indicator Limitations
Harmonic patterns can extend beyond expected Fibonacci levels
Perfect Harmonic signals are rare - patience is required for best setups
Wave counting is simplified and may not match complex Elliott Wave analysis
Fibonacci levels are dynamic and may adjust as new swing points form
Money flow can remain extreme longer than expected during strong trends
Volume confirmation may be less reliable in low-liquidity markets
Confluence scoring is mathematical, not predictive of future performance
Requires understanding of harmonic analysis principles for effective use
Technical Implementation
Built with Pine Script v6 using:
Advanced detrended price oscillation with Ehlers cycle detection
Dynamic Fibonacci calculation based on swing point analysis
LazyBear WaveTrend algorithm implementation
Real-time Money Flow Index with institutional bias detection
Volume analysis with spike detection and directional confirmation
Simplified Elliott Wave counting with phase detection
Multi-factor confluence scoring system with component weighting
Anti-overlap signal filtering to prevent signal clustering
The code is fully open-source and can be modified to suit individual trading styles and preferences.
Originality Statement
This indicator is original in its harmonic integration approach. While individual components (DPO, Fibonacci, WaveTrend, MFI, volume analysis, Elliott Wave) are established concepts, this integration is justified because:
It synthesizes six distinct methodologies that address different aspects of market harmony
The harmonic wave engine combines detrended oscillation with cycle detection for superior rhythm analysis
Dynamic Fibonacci levels adjust to current wave structure rather than using static retracements
Golden Pocket zone identification provides mathematical precision for reversal timing
Multi-factor confluence scoring quantifies setup quality across all components
Perfect Harmonic detection identifies rare, high-probability reversal opportunities
Each component contributes unique harmonic information: wave analysis reveals natural cycles, Fibonacci provides mathematical levels, WaveTrend shows momentum extremes, money flow indicates institutional positioning, volume confirms genuine moves, and Elliott Wave provides structural context. The integration's value lies in identifying moments when all these harmonic factors align simultaneously.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss and is not suitable for all investors.
Harmonic analysis and Fibonacci levels are mathematical concepts that do not guarantee future price movement. Past performance and backtested results do not guarantee future results. Market conditions change, and harmonic patterns that worked historically may not work in the future.
Always use proper risk management, including stop losses and position sizing appropriate for your account size and risk tolerance. Never risk more than you can afford to lose. Consider consulting with a qualified financial advisor before making investment decisions.
The author is not responsible for any losses incurred from using this indicator. Users assume full responsibility for all trading decisions made using this tool.
-Made with passion by officialjackofalltrades Indicator

Harmonic Confluence Wave Detector [JOAT]Harmonic Confluence Wave Detector
Introduction
The Harmonic Confluence Wave Detector is an open-source oscillator-based indicator that combines WaveTrend, Money Flow Index (MFI), RSI, MACD, and Stochastic RSI into a unified momentum analysis system. This mashup creates a multi-layered oscillator framework designed to identify momentum shifts, overbought/oversold conditions, and divergence patterns across multiple timeframes and calculation methods.
The indicator addresses a common trading challenge: single oscillators can give conflicting or premature signals. By synthesizing five different momentum calculations that use distinct mathematical approaches, this tool provides confluence-based signals that occur when multiple momentum indicators align, significantly reducing false signals compared to using any single oscillator alone.
Chart showing WaveTrend oscillator, MACD histogram, and multi-signal system on 1H timeframe
Why This Mashup Exists
This indicator combines five oscillators that complement each other through different calculation methodologies:
WaveTrend: Smoothed momentum oscillator based on price deviation from exponential moving average
Money Flow Index (MFI): Volume-weighted RSI showing buying/selling pressure
RSI: Classic momentum oscillator measuring speed and magnitude of price changes
MACD: Trend-following momentum indicator showing relationship between two EMAs
Stochastic RSI: Stochastic calculation applied to RSI for enhanced sensitivity
Each oscillator has unique strengths: WaveTrend excels at identifying wave-like momentum cycles, MFI incorporates volume for institutional flow analysis, RSI provides reliable overbought/oversold readings, MACD shows trend strength and direction, and Stochastic RSI catches early momentum shifts. Together, they create a comprehensive momentum picture that no single oscillator can provide.
The mashup is justified because these oscillators use fundamentally different calculations (price-based, volume-weighted, moving average convergence, stochastic) that respond to different market conditions. When they align, it indicates genuine momentum shift rather than noise.
Core Components Explained
1. WaveTrend Oscillator (Primary Signal Generator)
WaveTrend is the primary oscillator, calculated using this methodology:
// Calculate exponential average of HLC3
esa = ta.ema(hlc3, channelLength)
// Calculate deviation
d = ta.ema(abs(hlc3 - esa), channelLength)
// Calculate channel index
ci = (hlc3 - esa) / (0.015 * d)
// Apply smoothing to create WaveTrend 1
wt1 = ta.ema(ci, averageLength)
// Create WaveTrend 2 as simple moving average of WT1
wt2 = ta.sma(wt1, 4)
WaveTrend oscillates around zero, with:
Values above +60: Overbought zone
Values above +80: Extreme overbought
Values below -60: Oversold zone
Values below -80: Extreme oversold
Crossovers between WT1 and WT2: Momentum shift signals
The indicator plots WT1 and WT2 as lines with dynamic coloring based on momentum direction and strength.
2. Money Flow Index (MFI) - Volume-Weighted Momentum
MFI calculation incorporates both price and volume:
// Calculate typical price
typicalPrice = (high + low + close) / 3
// Calculate raw money flow
rawMoneyFlow = typicalPrice * volume
// Separate positive and negative money flow
positiveFlow = close > close ? rawMoneyFlow : 0
negativeFlow = close < close ? rawMoneyFlow : 0
// Sum over MFI period
positiveSum = sum(positiveFlow, mfiLength)
negativeSum = sum(negativeFlow, mfiLength)
// Calculate MFI
mfi = 100 - (100 / (1 + positiveSum / negativeSum))
MFI ranges from 0-100, with readings above 80 indicating buying pressure and below 20 indicating selling pressure. The indicator plots MFI as a line and uses it for confluence scoring.
3. RSI - Classic Momentum Oscillator
Standard RSI calculation over 14 periods (configurable):
RSI > 70: Overbought
RSI < 30: Oversold
RSI > 65 with other bearish signals: Potential reversal
RSI < 35 with other bullish signals: Potential reversal
RSI provides reliable baseline momentum readings and is used for divergence detection.
4. MACD - Trend Momentum Indicator
MACD uses standard 12/26/9 settings:
= ta.macd(close, 12, 26, 9)
The indicator displays MACD histogram with enhanced width (linewidth 8) for visibility. Histogram color changes based on:
Green: Positive and increasing (bullish momentum)
Light green: Positive but decreasing (weakening bulls)
Red: Negative and decreasing (bearish momentum)
Light red: Negative but increasing (weakening bears)
MACD histogram provides visual confirmation of momentum strength and direction.
5. Stochastic RSI - Enhanced Sensitivity
Stochastic calculation applied to RSI values:
stochRSI = ta.stoch(rsi, rsi, rsi, 14)
Stochastic RSI oscillates between 0-100 and is more sensitive than regular RSI, catching momentum shifts earlier. The indicator plots both K and D lines for crossover analysis.
Example showing all oscillators with divergence markers and signal labels
Multi-Signal System
The indicator generates six tiers of signals based on confluence strength:
BUY Signals:
BUY: WT1 crosses above WT2 in oversold zone (WT1 < -40)
STRONG BUY: BUY + volume above average + MACD histogram positive
MEGA BUY: STRONG BUY + WT1 < -60 (extreme oversold) + RSI < 35
ULTRA BUY: MEGA BUY + MFI < 30 + Stoch RSI oversold + bullish divergence
SELL Signals:
SELL: WT1 crosses below WT2 in overbought zone (WT1 > 40)
STRONG SELL: SELL + volume above average + MACD histogram negative
MEGA SELL: STRONG SELL + WT1 > 60 (extreme overbought) + RSI > 65
ULTRA SELL: MEGA SELL + MFI > 70 + Stoch RSI overbought + bearish divergence
Signal labels appear on chart with size proportional to signal strength (tiny for BUY/SELL, normal for ULTRA).
Divergence Detection System
The indicator detects divergences across multiple oscillators:
RSI Divergence:
Bullish: Price makes lower low, RSI makes higher low
Bearish: Price makes higher high, RSI makes lower high
WaveTrend Divergence:
Bullish: Price makes lower low, WT1 makes higher low
Bearish: Price makes higher high, WT1 makes lower high
MACD Divergence:
Bullish: Price makes lower low, MACD histogram makes higher low
Bearish: Price makes higher high, MACD histogram makes lower high
Divergences are marked with bright orange/yellow "D" labels (color.rgb(255, 200, 0)) with black text for maximum visibility. When multiple oscillators show divergence simultaneously, it signals strong momentum exhaustion and potential reversal.
Confluence Scoring System
The indicator calculates a real-time confluence score (0-100) by evaluating:
Confluence Components:
- WaveTrend Position: Up to 25 points (extreme zones add more weight)
- WaveTrend Momentum: Up to 15 points (WT1-WT2 relationship)
- RSI Level: Up to 15 points (extreme readings add weight)
- MFI Level: Up to 15 points (volume pressure confirmation)
- MACD Histogram: Up to 15 points (trend momentum)
- Stochastic RSI: Up to 10 points (early momentum detection)
- Divergence Presence: Up to 5 points (any divergence detected)
The dashboard displays the current confluence score with color coding:
Green (80-100): Strong bullish confluence
Light green (60-79): Moderate bullish confluence
Yellow (40-59): Neutral/mixed signals
Light red (20-39): Moderate bearish confluence
Red (0-19): Strong bearish confluence
Visual Elements
WaveTrend Lines: WT1 (blue) and WT2 (orange) with dynamic coloring
Overbought/Oversold Zones: Horizontal lines at +60/-60 and +80/-80
Zero Line: Reference line at 0
MACD Histogram: Large bars (linewidth 8) with gradient coloring
MFI Line: Purple line showing volume-weighted momentum
RSI Line: Green line with overbought/oversold reference levels
Stochastic RSI: K (blue) and D (red) lines
Signal Labels: BUY/SELL markers with size based on signal strength
Divergence Labels: Bright orange "D" markers at divergence points
Dashboard: Top-right table showing confluence score and oscillator readings
Chart demonstrating signal hierarchy from BUY to ULTRA BUY with divergence markers
How Components Work Together
The mashup creates a layered momentum analysis:
Layer 1 - Primary Momentum: WaveTrend identifies wave cycles and crossover signals
Layer 2 - Volume Confirmation: MFI validates moves with volume-weighted pressure
Layer 3 - Baseline Momentum: RSI provides reliable overbought/oversold context
Layer 4 - Trend Strength: MACD histogram shows underlying trend momentum
Layer 5 - Early Detection: Stochastic RSI catches momentum shifts before other oscillators
Layer 6 - Exhaustion Signals: Divergences across oscillators indicate momentum exhaustion
Example scenario: WT1 crosses above WT2 in oversold zone (Layer 1), MFI shows buying pressure increasing (Layer 2), RSI is below 35 (Layer 3), MACD histogram turns positive (Layer 4), Stochastic RSI crosses up (Layer 5), and RSI shows bullish divergence (Layer 6). This generates an ULTRA BUY signal with 90+ confluence score.
Input Parameters
WaveTrend Settings:
Channel Length: Period for EMA calculation (default: 10)
Average Length: Smoothing period for WT1 (default: 21)
Overbought Level: Upper threshold (default: 60)
Oversold Level: Lower threshold (default: -60)
Extreme OB Level: Extreme upper threshold (default: 80)
Extreme OS Level: Extreme lower threshold (default: -80)
Oscillator Settings:
RSI Length: Period for RSI calculation (default: 14)
MFI Length: Period for MFI calculation (default: 14)
MACD Fast: Fast EMA period (default: 12)
MACD Slow: Slow EMA period (default: 26)
MACD Signal: Signal line period (default: 9)
Stochastic RSI Length: Period for Stoch RSI (default: 14)
Signal Settings:
Show Signals: Toggle signal labels (default: enabled)
Show Divergences: Toggle divergence markers (default: enabled)
Volume Confirmation: Require volume for STRONG signals (default: enabled)
Min Confluence for Signals: Minimum score to display signals (default: 60)
Display Options:
Show Dashboard: Toggle confluence score table (default: enabled)
Show MACD Histogram: Toggle MACD display (default: enabled)
Show MFI Line: Toggle MFI display (default: enabled)
Show RSI Line: Toggle RSI display (default: enabled)
Show Stochastic RSI: Toggle Stoch RSI display (default: enabled)
Color Theme: Choose between multiple color schemes
How to Use This Indicator
Step 1: Monitor WaveTrend Oscillator
Watch for WT1/WT2 crossovers in extreme zones. Crossovers in oversold zone (< -60) suggest bullish reversals, crossovers in overbought zone (> 60) suggest bearish reversals.
Step 2: Check Confluence Score
Review the dashboard. Scores above 70 indicate strong momentum alignment. Higher scores generally produce more reliable signals.
Step 3: Identify Signal Strength
Pay attention to signal labels. ULTRA signals have highest probability but occur less frequently. STRONG signals offer good balance between frequency and reliability.
Step 4: Look for Divergences
Divergence markers indicate momentum exhaustion. When divergences appear with extreme oscillator readings, reversal probability increases significantly.
Step 5: Confirm with MACD Histogram
Check MACD histogram direction and strength. Large histogram bars confirm strong momentum, shrinking bars suggest momentum loss.
Step 6: Validate with Volume (MFI)
Ensure MFI supports the move. Bullish signals with rising MFI are stronger, bearish signals with falling MFI are stronger.
Best Practices
Use on 15-minute to 4-hour timeframes for optimal signal quality
Wait for STRONG or MEGA signals rather than acting on every BUY/SELL
Divergences work best when combined with extreme oscillator readings
Multiple oscillator divergences (RSI + WT + MACD) are most reliable
Use confluence score as filter - avoid signals below 60 score
MACD histogram size indicates momentum strength - larger bars = stronger moves
MFI divergence from price often precedes reversals (volume leads price)
Combine with price action and support/resistance for best results
Indicator Limitations
Oscillators can remain overbought/oversold longer than expected in strong trends
Divergences can persist for multiple bars before reversal occurs
Multiple signals in choppy markets can lead to whipsaws
Confluence score is mathematical calculation, not prediction of future movement
ULTRA signals are rare - waiting only for these may miss opportunities
Volume data quality varies across markets and can affect MFI reliability
Stochastic RSI is very sensitive and can generate premature signals
No indicator combination eliminates false signals entirely
Requires understanding of oscillator behavior for effective interpretation
Technical Implementation
Built with Pine Script v6 using:
Custom WaveTrend calculation with dual-line system
Proper MFI formula with volume-weighted money flow
Multi-oscillator divergence detection with pivot analysis
Confluence scoring algorithm with weighted components
Enhanced MACD histogram visualization (linewidth 8)
Dynamic color gradients for momentum visualization
Anti-overlap logic for signal labels
Real-time dashboard with oscillator readings
The code is fully open-source and can be modified to adjust oscillator weights, signal thresholds, and visual preferences.
Originality Statement
This indicator is original in its multi-oscillator integration approach. While individual components (WaveTrend, MFI, RSI, MACD, Stochastic RSI) are established oscillators, this mashup is justified because:
It combines five oscillators using fundamentally different calculation methods
The tiered signal system (BUY to ULTRA) provides graduated confidence levels
Multi-oscillator divergence detection catches momentum exhaustion across different timeframes
Confluence scoring quantifies momentum alignment across all oscillators
Volume integration through MFI adds institutional flow perspective
Enhanced visualization (large MACD histogram, bright divergence markers) improves usability
Each oscillator contributes unique information: WaveTrend provides wave-cycle analysis, MFI incorporates volume, RSI offers reliable baseline, MACD shows trend strength, and Stochastic RSI catches early shifts. The mashup's value lies in identifying when these different momentum calculations align, significantly reducing false signals compared to any single oscillator.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss and is not suitable for all investors.
Oscillator-based indicators are lagging tools that analyze past price data. They do not predict future price movement. Overbought conditions can persist in strong uptrends, and oversold conditions can persist in strong downtrends. Divergences can continue for extended periods before reversals occur.
The confluence score is a mathematical calculation, not a guarantee of trade success. High confluence scores do not ensure profitable trades. Past signal performance does not guarantee future results. Market conditions change, and oscillator behavior varies across different market regimes.
Always use proper risk management, including stop losses and position sizing appropriate for your account size and risk tolerance. Never risk more than you can afford to lose. Consider consulting with a qualified financial advisor before making investment decisions.
The author is not responsible for any losses incurred from using this indicator. Users assume full responsibility for all trading decisions made using this tool.
-Made with passion by officialjackofalltrades Indicator

Harmonic Patterns Library [TradingFinder]🔵 Introduction
Harmonic patterns blend geometric shapes with Fibonacci numbers, making these numbers fundamental to understanding the patterns.
One person who has done a lot of research on harmonic patterns is Scott Carney.Scott Carney's research on harmonic patterns in technical analysis focuses on precise price structures based on Fibonacci ratios to identify market reversals.
Key patterns include the Gartley, Bat, Butterfly, and Crab, each with specific alignment criteria. These patterns help traders anticipate potential market turning points and make informed trading decisions, enhancing the predictability of technical analysis.
🟣 Understanding 5-Point Harmonic Patterns
In the current library version, you can easily draw and customize most XABCD patterns. These patterns often form M or W shapes, or a combination of both. By calculating the Fibonacci ratios between key points, you can estimate potential price movements.
All five-point patterns share a similar structure, differing only in line lengths and Fibonacci ratios. Learning one pattern simplifies understanding others.
🟣 Exploring the Gartley Pattern
The Gartley pattern appears in both bullish (M shape) and bearish (W shape) forms. In the bullish Gartley, point X is below point D, and point A surpasses point C. Point D marks the start of a strong upward trend, making it an optimal point to place a buy order.
The bearish Gartley mirrors the bullish pattern with inverted Fibonacci ratios. In this scenario, point D indicates the start of a significant price drop. Traders can place sell orders at this point and buy at lower prices for profit in two-way markets.
🟣 Analyzing the Butterfly Pattern
The Butterfly pattern also manifests in bullish (M shape) and bearish (W shape) forms. It resembles the Gartley pattern but with point D lower than point X in the bullish version.
The Butterfly pattern involves deeper price corrections than the Gartley, leading to more significant price fluctuations. Point D in the bullish Butterfly indicates the beginning of a sharp price rise, making it an entry point for buy orders.
The bearish Butterfly has inverted Fibonacci ratios, with point D marking the start of a sharp price decline, ideal for sell orders followed by buying at lower prices in two-way markets.
🟣 Insights into the Bat Pattern
The Bat pattern, appearing in bullish (M shape) and bearish (W shape) forms, is one of the most precise harmonic patterns. It closely resembles the Butterfly and Gartley patterns, differing mainly in Fibonacci levels.
The bearish Bat pattern shares the Fibonacci ratios with the bullish Bat, with an inverted structure. Point D in the bearish Bat marks the start of a significant price drop, suitable for sell orders followed by buying at lower prices for profit.
🟣 The Crab Pattern Explained
The Crab pattern, found in both bullish (M shape) and bearish (W shape) forms, is highly favored by analysts. Discovered in 2000, the Crab pattern features a larger final wave correction compared to other harmonic patterns.
The bearish Crab shares Fibonacci ratios with the bullish version but in an inverted form. Point D in the bearish Crab signifies the start of a sharp price decline, making it an ideal point for sell orders followed by buying at lower prices for profitable trades.
🟣 Understanding the Shark Pattern
The Shark pattern appears in bullish (M shape) and bearish (W shape) forms. It differs from previous patterns as point C in the bullish Shark surpasses point A, with unique level measurements.
The bearish Shark pattern mirrors the Fibonacci ratios of the bullish Shark but is inverted. Point D in the bearish Shark indicates the start of a sharp price drop, ideal for placing sell orders and buying at lower prices to capitalize on the pattern.
🟣 The Cypher Pattern Overview
The Cypher pattern is another that appears in both bullish (M shape) and bearish (W shape) forms. It resembles the Shark pattern, with point C in the bullish Cypher extending beyond point A, and point D forming within the XA line.
The bearish Cypher shares the Fibonacci ratios with the bullish Cypher but in an inverted structure. Point D in the bearish Cypher marks the start of a significant price drop, perfect for sell orders followed by buying at lower prices.
🟣 Introducing the Nen-Star Pattern
The Nen-Star pattern appears in both bullish (M shape) and bearish (W shape) forms. In the bullish Nen-Star, point C extends beyond point A, and point D, the final point, forms outside the XA line, making CD the longest wave.
The bearish Nen-Star has inverted Fibonacci ratios, with point D indicating the start of a significant price drop. Traders can place sell orders at point D and buy at lower prices to profit from this pattern in two-way markets.
The 5-point harmonic patterns, commonly referred to as XABCD patterns, are specific geometric price structures identified in financial markets. These patterns are used by traders to predict potential price movements based on historical price data and Fibonacci retracement levels.
Here are the main 5-point harmonic patterns :
Gartley Pattern
Anti-Gartley Pattern
Bat Pattern
Anti-Bat Pattern
Alternate Bat Pattern
Butterfly Pattern
Anti-Butterfly Pattern
Crab Pattern
Anti-Crab Pattern
Deep Crab Pattern
Shark Pattern
Anti- Shark Pattern
Anti Alternate Shark Pattern
Cypher Pattern
Anti-Cypher Pattern
🔵 How to Use
To add "Order Block Refiner Library", you must first add the following code to your script.
import TFlab/Harmonic_Chart_Pattern_Library_TradingFinder/1 as HP
🟣 Parameters
XABCD(Name, Type, Show, Color, LineWidth, LabelSize, ShVF, FLPC, FLPCPeriod, Pivot, ABXAmin, ABXAmax, BCABmin, BCABmax, CDBCmin, CDBCmax, CDXAmin, CDXAmax) =>
Parameters:
Name (string)
Type (string)
Show (bool)
Color (color)
LineWidth (int)
LabelSize (string)
ShVF (bool)
FLPC (bool)
FLPCPeriod (int)
Pivot (int)
ABXAmin (float)
ABXAmax (float)
BCABmin (float)
BCABmax (float)
CDBCmin (float)
CDBCmax (float)
CDXAmin (float)
CDXAmax (float)
🟣 Genaral Parameters
Name : The name of the pattern.
Type: Enter "Bullish" to draw a Bullish pattern and "Bearish" to draw an Bearish pattern.
Show : Enter "true" to display the template and "false" to not display the template.
Color : Enter the desired color to draw the pattern in this parameter.
LineWidth : You can enter the number 1 or numbers higher than one to adjust the thickness of the drawing lines. This number must be an integer and increases with increasing thickness.
LabelSize : You can adjust the size of the labels by using the "size.auto", "size.tiny", "size.smal", "size.normal", "size.large" or "size.huge" entries.
🟣 Logical Parameters
ShVF : If this parameter is on "true" mode, only patterns will be displayed that they have exact format and no noise can be seen in them. If "false" is, the patterns displayed that maybe are noisy and do not exactly correspond to the original pattern.
FLPC : if Turned on, you can see this ability of patterns when their last pivot is formed. If this feature is off, it will see the patterns as soon as they are formed. The advantage of this option being clear is less formation of fielded patterns, and it is accompanied by the lateest pattern seeing and a sharp reduction in reward to risk.
FLPCPeriod : Using this parameter you can determine that the last pivot is based on Pivot period.
Pivot : You need to determine the period of the zigzag indicator. This factor is the most important parameter in pattern recognition.
ABXAmin : Minimum retracement of "AB" line compared to "XA" line.
ABXAmax : Maximum retracement of "AB" line compared to "XA" line.
BCABmin : Minimum retracement of "BC" line compared to "AB" line.
BCABmax : Maximum retracement of "BC" line compared to "AB" line.
CDBCmin : Minimum retracement of "CD" line compared to "BC" line.
CDBCmax : Maximum retracement of "CD" line compared to "BC" line.
CDXAmin : Minimum retracement of "CD" line compared to "XA" line.
CDXAmax : Maximum retracement of "CD" line compared to "XA" line.
🟣 Function Outputs
This library has two outputs. The first output is related to the alert of the formation of a new pattern. And the second output is related to the formation of the candlestick pattern and you can draw it using the "plotshape" tool.
Candle Confirmation Logic :
Example :
import TFlab/Harmonic_Chart_Pattern_Library_TradingFinder/1 as HP
PP = input.int(3, 'ZigZag Pivot Period')
ShowBull = input.bool(true, 'Show Bullish Pattern')
ShowBear = input.bool(true, 'Show Bearish Pattern')
ColorBull = input.color(#0609bb, 'Color Bullish Pattern')
ColorBear = input.color(#0609bb, 'Color Bearish Pattern')
LineWidth = input.int(1 , 'Width Line')
LabelSize = input.string(size.small , 'Label size' , options = )
ShVF = input.bool(false , 'Show Valid Format')
FLPC = input.bool(false , 'Show Formation Last Pivot Confirm')
FLPCPeriod =input.int(2, 'Period of Formation Last Pivot')
//Call function
= HP.XABCD('Bullish Bat', 'Bullish', ShowBull, ColorBull , LineWidth, LabelSize ,ShVF, FLPC, FLPCPeriod, PP, 0.382, 0.50, 0.382, 0.886, 1.618, 2.618, 0.85, 0.9)
= HP.XABCD('Bearish Bat', 'Bearish', ShowBear, ColorBear , LineWidth, LabelSize ,ShVF, FLPC, FLPCPeriod, PP, 0.382, 0.50, 0.382, 0.886, 1.618, 2.618, 0.85, 0.9)
//Alert
if BearAlert
alert('Bearish Harmonic')
if BullAlert
alert('Bulish Harmonic')
//CandleStick Confirm
plotshape(BearCandleConfirm, style = shape.arrowdown, color = color.red)
plotshape(BullCandleConfirm, style = shape.arrowup, color = color.green, location = location.belowbar )
Library

Smart Money Setup 04 [TradingFinder] Three Drive (Harmonic) + OB🔵 Introduction
The "Three Drive" pattern is a well-known formation in technical analysis, recognized for its ability to signal potential trend reversals in price action. Within the realm of trading, particularly in the context of "Reversal Patterns," the Three Drive pattern holds significance as a reliable indicator of shifts in market sentiment.
🟣 Bullish 3 Drive
This pattern typically manifests at a price bottom, where a sequence of lower lows suggests a prevailing negative trend. However, within the structure of the Three Drive pattern, a notable occurrence unfolds.
The second low breaches the range of the first low, followed by the third low surpassing the range of the second low. These penetrations signify a diminishing selling pressure and an emerging buying interest.
Traders often await the confirmation of the third low surpassing the second low as an entry point, with price targets set at the highs formed within the Three Drive pattern.
🟣 Bearish 3 Drive
Conversely, the Bearish Three Drive pattern emerges at a price top, characterized by a sequence of higher highs indicating an upward trend. Yet, amidst this apparent bullish momentum, a shift occurs.
The second high breaks beyond the range of the first high, succeeded by the third high exceeding the range of the second high. These breaches signify a waning buying strength and a resurgence in selling pressure.
Entry into a trade is often executed after the confirmation of the third high surpassing the second high, with targets set at the lows formed within the Three Drive pattern.
Importance :
Understanding the Three Drive pattern's significance extends beyond mere technical analysis. It bears resemblance to other established patterns, such as the Harmonic Pattern and Ending Diagonal within the Elliott Wave Theory.
Recognizing these parallels aids traders in comprehending broader market dynamics and potential price movements.
🔵 Formation of 3 Drive in Order Block Zone
The convergence of the Three Drive pattern with the concept of the Order Block Zone introduces a nuanced layer to traders' analytical approach.
In "Price Action" methodology, Order Blocks represent areas on the price chart where significant market players, such as institutional traders, have executed notable orders.
These zones often act as barriers, with price encountering resistance or support upon reaching them.
When the Three Drive pattern forms within an Order Block Zone, it signifies a confluence of market dynamics.
The completion of the pattern within this zone suggests a potential reversal in the prevailing trend, augmented by the presence of significant institutional orders.
Traders incorporate these Order Blocks into their analysis to identify probable levels where price may change direction, enhancing the reliability of their trading decisions.
🔵 How to Use :
To effectively utilize the Three Drive pattern within the Order Block Zone, traders seek alignment between the completion of the pattern and the presence of significant Order Blocks.
This convergence enhances the reliability of the pattern's signals, increasing the likelihood of successful trade outcomes.
Bullish Three Drive in Demand Zone :
Bearish Three Drive in Supply Zone :
Settings :
You can set your desired "Pivot Period" via settings for the indicator to identify setups based on it.
Indicator

Three Drive [TradingFinder] 3 Drive Harmonic Pattern Indicator🔵 Introduction
The "Three Drive" pattern is one of the light "RTM" setups suitable for identifying price trend reversals. For this reason, this pattern is considered one of the "Reversal Patterns."
🟣 Bullish 3 Drive
At a price bottom, a formation occurs where the negative trend appears to continue, and lower lows are made.
However, the second low penetrates the range of the first low, and the third low penetrates the range of the second low, indicating a decrease in selling pressure and an increase in buying pressure.
Entry point is issued after the penetration of the third low to the second low, and targets are the highs formed in the "3 Drive."
🟣 Bearish 3 Drive
At a price top, a formation occurs where the positive trend appears to continue, and higher highs are made.
However, the second high penetrates the range of the first high, and the third high penetrates the range of the second high, indicating a decrease in buyers' strength and an increase in sellers' strength.
Entry point is issued after the penetration of the third high to the second high, and targets are the lows formed in the "3 Drive."
Importance :
This pattern bears a striking resemblance to the some of "Harmonic Pattern" and "Ending Diagonal" in the "Elliott Pattern".
🔵 How to Use
There is no need for further confirmation to use this pattern, and you can use it as soon as the pattern forms. However, to reduce errors, it is better to use this pattern when it forms within a "Supply and Demand" or "Support and Resistance" structure.
Bullish 3 Drive in Demand Zone :
Bearish 3 Drive in Supply Zone :
🔵 Settings
You can set your desired "Pivot Period" via settings for the indicator to identify setups based on it.
Indicator
