Candle Pattern Forecast# Candle Pattern Forecast — Complete Guide
---
## What This Indicator Does
The Candle Pattern Forecast engine looks at the most recent candles on your chart and asks a simple question: **has the market made this same sequence of candles before, and if so, what happened next?**
Every candle tells a story beyond just where price closed. It reveals how decisive the move was (the body), whether buyers or sellers got rejected at the extremes (the wicks), and which side was in control (direction). This indicator reads those four characteristics on each of the last N candles, builds a structural fingerprint of that sequence, then scans back through history looking for every other time the market made a similar sequence.
Once it finds enough matching sequences, it looks at what price actually did in the bars that followed each match. It then plots the median of all those outcomes as a forecast midline, and draws confidence bands showing the range where the bulk of those historical outcomes actually landed.
In plain terms: **the last time the market made candles that looked like this, here is what typically happened next.**
---
## What It Is Not
This is not a crystal ball. It is not predicting the future with certainty. It is showing you a probability-weighted summary of historical behavior following similar candle patterns. The quality of that summary depends entirely on how many good matches exist in history and how consistently those matches behaved afterward. The info box tells you both of those things in real time.
---
## The Display
**Pattern Line** — a purple line tracing the closes of the Candle Lookback window. This shows you exactly which candles the engine read to build its fingerprint, ending at the anchor point where the forecast begins. When Historical Rewind is active, the pattern line shifts back with the rest of the indicator so you always see the sequence that generated the projection.
**Forecast Midline** — the median (or average, if you switch modes) of all the forward price paths observed after matched candle sequences. This is your central tendency line — where the market most commonly ended up after patterns like this.
**Confidence Bands** — the range between the 25th and 75th percentile of historical outcomes by default. The middle 50% of your matched sequences ended up inside these bands. Tight bands mean the matches behaved consistently. Wide bands mean outcomes were scattered and the pattern had no reliable follow-through.
The bands naturally widen as they extend further forward in time. This is correct behavior — the further out you project, the more historical paths diverge from each other.
---
## Inputs — Model Group
**Non-Repaint Mode** — when on, the indicator anchors itself to the last fully closed candle and never changes its projection mid-bar. This is the honest setting for real trading decisions. When off, it updates live on the current bar, which means the projection shifts as price moves.
**Candle Lookback** — how many candles back the engine reads to build its fingerprint. At 5, it reads the last 5 candles and uses their combined anatomy as the pattern it is trying to match in history. Shorter lookbacks find more matches because the fingerprint is simpler. Longer lookbacks find fewer but potentially more specific matches. For short-term intraday work, 3–7 is a practical range. Going much above 10–15 starts to starve the engine of good matches.
**Search Depth** — how far back in history the engine scans looking for matches, measured in bars. At 2000, it looks back 2000 bars. More depth gives more candidates to match against, which is generally better. The limit is how much data your chart actually has.
**Forecast Horizon** — how many bars forward the projection extends after the anchor point. At 10, you get a 10-bar forecast. Keep this in a sensible relationship to your Candle Lookback — projecting 50 bars forward on a 5-candle pattern will produce a technically valid but practically meaningless result as the historical outcomes diverge too much to average meaningfully.
**Pattern Matches** — the target number of historical matches the engine tries to collect. It starts with a very strict similarity requirement and automatically loosens it until it has found this many matches, stopping at the Similarity Floor. More matches produce a smoother, more stable midline but dilute the directional signal. Fewer matches are noisier but more specific. 15–30 is a practical range.
**Similarity Floor** — the absolute minimum similarity score the engine will accept for a match, expressed as a percentage. If it cannot find enough matches above this floor, it takes whatever it found and shows a warning in the info box. This prevents the engine from building a projection on essentially unrelated historical patterns. Raising this makes the engine more selective. Lowering it makes it more permissive.
---
## Inputs — Historical Rewind Group
**Enable Rewind** — when toggled on, the entire indicator shifts backward in time by the number of bars you specify. The fingerprint is read from that past point, the scan searches only history that existed at that time, and the projection extends forward from there — into what is now known history. This lets you visually compare what the indicator would have projected against what price actually did. The pattern line also shifts back to show the candle sequence that was read at that point in time. When off, the indicator runs live as normal.
**Bars Back** — how many bars back to anchor the rewind. At 50, the engine reads the candle sequence from 50 bars ago, finds matches from history prior to that point, and draws the projection forward from there. You can then see how closely the actual subsequent price action followed the forecast. Set to 0 when rewind is enabled but you want to temporarily pause without toggling it off.
The info box Rewind row shows **Live** when rewind is off and **⏪ N bars back** in orange when active, so it is always clear whether you are looking at a live projection or a historical replay.
---
## Inputs — Match Strictness Group
**Match Strictness** — a single dropdown from 1 (Weak) to 5 (Exact) that controls how the engine weighs the four candle anatomy dimensions against each other when measuring similarity.
- **1 — Weak** — all four dimensions (body, upper wick, lower wick, direction) matter equally. The engine is looking for a general structural resemblance. Finds the most matches.
- **2 — Relaxed** — slight emphasis on body conviction. Still broadly permissive.
- **3 — Balanced** — the default. Body size is the dominant signal but wicks and direction still contribute meaningfully.
- **4 — Strict** — strong body emphasis. The engine is primarily matching on how decisive each candle was. Fewer but structurally closer matches.
- **5 — Exact** — body conviction is the overwhelming signal. Only candle sequences with very similar body profiles will qualify. Hardest to match, fewest results.
Think of this as tuning what kind of candle similarity matters most to you. If you care primarily about whether candles were indecisive or committed, lean toward Strict or Exact. If you want a broader match that respects the full candle structure equally, use Weak or Relaxed.
---
## Inputs — Pattern Line Group
**Show Pattern Line** — toggles the pattern line on or off. Default is on.
**Color** — color of the pattern line. Default is purple.
**Width** — thickness of the pattern line. Default is 2.
---
## Inputs — Forecast Group
**Midline Mode** — controls how the central forecast line is calculated from the matched outcomes.
- **Median** (default) — takes the middle value when all outcomes are sorted. More robust to outliers. If one matched sequence had a massive move that was atypical, it gets pushed to the edge rather than pulling the midline toward it.
- **Average** — takes the arithmetic mean of all outcomes. More sensitive to outliers and extreme moves in either direction.
For most use cases Median is the more honest representation of what typically happened.
**Midline Color / Width / Style** — visual styling for the forecast midline.
**Show Confidence Bands** — toggles the upper and lower bands on or off.
**Confidence Band Mode** — controls how the bands are calculated.
- **Percentile** (default) — sorts all historical outcomes at each forecast step and draws the bands at the exact percentile you specify. No assumptions about the shape of the distribution. The bands directly show you where real historical outcomes clustered.
- **Std Deviation** — draws the bands at mean ± N standard deviations. Assumes outcomes are roughly bell-shaped. Can be distorted by outliers inflating the standard deviation even when most matches behaved similarly.
**Lower Percentile / Upper Percentile** — only active in Percentile mode. Default is 25 and 75, meaning the bands show where the middle 50% of historical outcomes landed. Moving to 10/90 widens the bands to capture 80% of outcomes. Moving to 5/95 captures 90%. The right setting depends on whether you want to see the typical range or the full plausible range.
**Band Std Deviation** — only active in Std Deviation mode. At 1.0, the bands cover approximately 68% of outcomes. At 2.0, approximately 95%.
**Upper / Lower Band Color, Width, Style** — visual styling for the confidence bands.
---
## Inputs — Info Box Group
The info box displays the engine's live diagnostic state so you always know what is actually running.
**Show Info Box** — toggles the info box on or off.
**Position** — where on the chart the info box appears.
**Text Size** — size of the info box text.
**Background / Border / Header colors** — visual styling.
---
## Reading the Info Box
**Candle Lookback** — confirms how many candles the fingerprint is built from.
**Forecast Horizon** — confirms how many bars forward the projection extends.
**Matches Used** — how many historical sequences qualified. If this is orange, no matches were found — the engine has nothing to project from. Try lowering the Similarity Floor, reducing the Candle Lookback, or increasing the Search Depth.
**Sim Floor / Fit** — two numbers. The left is the similarity threshold the engine actually settled on to reach your target match count. The right is the average similarity score of all the matches it found. Higher is better. A warning symbol next to the left number means the engine hit the Similarity Floor and could not find enough matches above it.
**Match Quality** — a composite score from Low to High that combines the average similarity of your matches, how close you got to your target match count, and whether the floor was hit. High means the engine found well-matched patterns. Low means the projection is built on weaker material and should be treated with more skepticism.
**Search Depth** — confirms the search depth setting currently active.
**Strictness** — confirms which Match Strictness level is active.
**Midline** — confirms whether you are running Median or Average.
**Bands** — confirms the active band mode and parameters. Shows either "Pctl 25/75" style or "StdDev ×1.0" style depending on your selection.
**Rewind** — shows Live when the indicator is running on the current bar, or ⏪ N bars back in orange when Historical Rewind is active.
---
## Practical Usage Tips
The forecast midline being relatively flat is not a failure — it often means the candle pattern genuinely did not predict a strong directional move historically. In that case the bands are the more useful signal, showing you the range of outcomes rather than pretending to know direction.
Tight bands with a flat midline means the pattern historically resolved with small moves in both directions — a low-conviction setup. Wide bands means the pattern was followed by large moves but in inconsistent directions. A midline with meaningful slope and tight bands is the highest-quality signal the engine can produce.
Treat Match Quality as your confidence filter. When it reads Low or Weak, reduce the weight you place on the projection. When it reads High, the engine found genuinely similar historical sequences and the projection has more structural basis behind it.
Use Historical Rewind to build intuition for the indicator before trusting it live. Step back 50 or 100 bars, observe how the projection compared to what actually happened, experiment with different Candle Lookback and Match Strictness settings, and develop a feel for when the indicator tends to be more or less reliable on your instrument and timeframe. The pattern line makes this especially useful — you can see exactly which candle sequence triggered the projection and compare it visually to where price went next. Indicator

Order Flow Footprint [JOAT]ORDER FLOW FOOTPRINT
A full intrabar footprint engine — POC, Value Area, per-row imbalance detection, stacked imbalance zones, delta-flip alerts, POC-shift alerts, and per-bar footprint ladder labels — built to read like a Bookmap-style auction view directly on a TradingView chart. Uses the native Footprint API when your plan provides it, with a graceful fallback to lower-timeframe tick-rule reconstruction so the script works on every account tier.
Data source — Footprint API or reconstructed
Three modes, behaviourally identical:
Footprint API — uses request.footprint() with a configurable aggregation (Auto / 1m / 3m / 5m / 15m / 30m). Native bid/ask volume per row when your plan supports it.
Reconstructed — uses request.security_lower_tf() to sample intrabar prints, then assigns each tick to buy or sell via the standard tick rule. Configurable LTF (1m / 3m / 5m / 15m / 30m).
Auto — picks Footprint when available, falls back to Reconstructed. The recommended default.
A configurable Profile Rows input (default 24, max 80) sets the vertical resolution — each chart bar's intrabar volume is bucketed into N horizontal price slices and the footprint is built from those buckets.
Imbalance detection (Bookmap diagonal)
The institutional definition of an imbalance is diagonal , not lateral :
A buy row is imbalanced when buy ≥ ratio × sell (this row's buys vs the row below it's sells).
A sell row is imbalanced when sell ≥ ratio × buy (this row's sells vs the row above it's buys).
The ratio is configurable (default 3.0× — the institutional norm). An optional minimum-row-volume filter mutes illiquid wick rows from being counted as imbalances. When N or more same-side imbalances occur inside a single bar, the Burst alert fires.
Stacked imbalance zones (the headline)
Stacked imbalances are the textbook order-flow structural read: N consecutive same-side imbalanced rows on top of each other. They mark where price had to gap through multiple thin levels to print — and they are reliable revisit zones.
Minimum stack count is configurable (default 4 consecutive rows).
Each stack zone is drawn as a box extending right by a configurable bar count.
Optional glow border on stack zones (toggleable).
Maximum active zones is capped (default 8) — older zones shift out FIFO.
POC + Value Area
Per-bar Point of Control (the row with the highest volume), Value Area High and Value Area Low (the 70%-volume centred range) are computed and toggleable. POC is rendered as a dot; VAH / VAL as lines. A configurable POC Shift Threshold (in mintick units) fires the POC Shift alert when the POC jumps more than the threshold bar-over-bar.
Delta flip detection
Per-bar delta (buy − sell) is computed continuously. The delta-flip alert fires only when delta switches sign after at least N consecutive same-sign bars (configurable, default 5). This filters out the micro-fluctuations that pure-sign-flip detectors would noise on.
Per-bar footprint ladder (optional, heavy)
When enabled, inline labels at every row of every recent bar (configurable history depth) show the buy × sell tuple per row — the full Bookmap-style read. This is visually rich but rendering-heavy; keep it off when scrolling long histories or running on low-end hardware.
Visual system
POC dot in accent yellow.
Value Area lines (VAH / VAL).
Imbalance cells highlighted in palette colour per row.
Stacked imbalance zones with optional glow.
Bar colouring by delta sign (toggleable).
Per-bar delta annotations every N bars (configurable).
Per-bar ladder labels (optional).
A locked Iridescent palette (magenta bull / cyan bear / yellow POC accent on pure black) gives the chart a cyberpunk holographic identity that reads as institutional rather than retail.
Dashboard
Monospaced table positionable to any of nine corners. Surfaces:
Source mode in use (Footprint / Reconstructed) with aggregation/LTF.
Current bar's delta value and sign.
POC price and intrabar volume share.
Imbalance count this bar (buy / sell).
Active stack zone count.
Last delta-flip direction with bar-age.
Alerts
Five alert conditions, each independently controllable:
Stacked Imbalance Zone Formed
POC Shift (POC jumped > threshold)
Delta Flip After Run (delta sign change after N+ same-sign bars)
Buy Imbalance Burst (N+ buy imbalances in one bar)
Sell Imbalance Burst (N+ sell imbalances in one bar)
How to read it
Three reads, in order of conviction:
Stacked imbalance zone — the highest-conviction read. Price had to plough through multiple thin levels to print. Future revisits are reliable reactive zones.
Delta flip after run — regime-change signal. When delta has been net-buying for many bars and finally flips net-selling, the auction direction has just rotated.
POC shift through a structural level — value migration. When the POC moves through a previous-day VAH or VAL, value has migrated and the next session's bias often follows.
Suggested settings
Defaults (1m reconstruction LTF, 24 rows, 3.0× imbalance ratio, 4-stack minimum) are tuned for 5m–15m charts on liquid markets. For 1m scalping, drop rows to 16 and stack minimum to 3. For HTF macro (1H+), raise rows to 36 and stack minimum to 5. The 3.0× imbalance ratio is the institutional Bookmap norm; tighten to 2.5× for more frequent imbalance prints.
Originality
The implementation — the Auto/Footprint/Reconstructed source router, the diagonal-Bookmap imbalance detector with row-volume filter, the consecutive-row stack zone builder with glow border, the POC-shift detector with mintick-unit threshold, the run-length-gated delta-flip alert, the per-bar ladder renderer with history depth control, and the dashboard's holographic palette — is JOAT-original. No third-party code reused. The footprint vocabulary (POC, VAH/VAL, imbalance, stacked imbalance, delta) is public-domain auction-theory language; the implementation here is purpose-built for chart-based Pine v6.
Limitations
Reconstructed footprints are an approximation — the tick rule is the accepted public-market inference for assigning intrabar trades to buy/sell but it is not a direct read of bid/ask volume. Footprint API requires a TradingView Premium or Ultimate plan and is unavailable on some instruments. The per-bar ladder labels are rendering-heavy; keep them off when historical performance matters. Stacked-imbalance zones honour the max active cap (FIFO eviction) and the extension bars cap.
—
-made with passion by jackofalltrades
Indicator

Indicator

Precision Candle Close Alert [Anti-Lag] for Scalper & DaytraderAs a scalper or day trader, timing is everything. Standard TradingView alerts often fire 2-3 seconds after the candle has closed due to tick-dependency and server lag. If you are trading the 1m or 5m chart, that delay can cost you money.
The Candle Close Alert (CCA) solves this problem. It is designed for absolute precision and includes a built-in "Anti-Lag" feature. This allows you to trigger the alert slightly before the actual close. By the time the push notification or sound reaches your device, the candle is closing at that exact millisecond.
Key Features:
⚡ Anti-Lag Offset: Compensate for server delays by firing the alert a customizable number of seconds (e.g., 2s) before the candle actually closes.
🎯 True Close Only: Uses strict condition matching to ensure the alert NEVER fires randomly in the middle of a candle. It only triggers on the exact target close.
🔢 Custom Alert Limit: Set a maximum number of alerts (e.g., alert me for the next 5 closes, then automatically stop).
🔄 One-Click Reset: Easily reset the alert counter directly from the indicator settings without having to delete and recreate the alert.
⏱️ Multi-Timeframe Support: Select your target timeframe (from 1m up to Monthly) independently of your current chart resolution.
How to set it up correctly:
Add the indicator to your chart. (Note: Your chart timeframe must be equal to or lower than your selected alert timeframe).
Open the indicator settings and set your target timeframe, the max alert count, and the Anti-Lag Offset (2 to 3 seconds is the recommended sweet spot).
Open the TradingView Alert Menu (clock icon) and click "Create Alert".
Condition: Select "Candle Close Alert" -> "Any alert() function call".
Go to the "Notifications" tab, check "Play Sound", and select a specific sound for this alert.
Click "Create".
Note: Because Pine Script triggers on price ticks, the anti-lag feature will fire on the first tick that occurs within your defined pre-close window.
Tags:
#Scalping #DayTrading #Alerts #CandleClose #Precision #Forex #Crypto #Utility Indicator

Top-Down Candle Panel
Top-Down Candle Panel
The Top-Down Candle Panel is a premium multi-timeframe candle visualization system built for traders who rely on top-down analysis, market structure, and higher-timeframe confirmation.
Instead of constantly switching between charts and timeframes, this indicator projects multiple higher-timeframe candles directly onto your active chart, allowing you to instantly read market pressure, candle behavior, and higher-timeframe sentiment in real time.
Designed for precision traders, scalpers, intraday traders, and swing traders alike, the panel helps simplify market context while reducing chart clutter and decision fatigue.
━━━━━━━━━━━━━━━━━━
KEY FEATURES
━━━━━━━━━━━━━━━━━━
Displays up to 4 fully customizable timeframes simultaneously
Default structure includes 5M, 15M, 1H, and 4H analysis
Hybrid, Price Accurate, and Aligned Dashboard display modes
Smart candle projection system
Built-in candle behavior recognition
Premium minimalist dashboard styling
Adjustable candle scaling and spacing controls
Light and dark mode compatibility
Optional real-price hybrid markers
Multi-timeframe alignment visualization
Clean top-down workflow integration
━━━━━━━━━━━━━━━━━━
ADVANCED CANDLE ANALYSIS
━━━━━━━━━━━━━━━━━━
The panel automatically classifies candle behavior to help traders quickly interpret higher-timeframe intent and momentum.
Included candle reads:
Bullish Expansion
Bearish Expansion
Upper Rejection
Lower Rejection
Doji
Bullish / Bearish pressure candles
This allows traders to instantly identify:
Expansion strength
Rejection zones
Momentum continuation
Possible exhaustion
Higher-timeframe buying or selling pressure
━━━━━━━━━━━━━━━━━━
WHY THIS TOOL EXISTS
━━━━━━━━━━━━━━━━━━
Most traders perform top-down analysis by manually flipping through multiple charts and timeframes. This process is slow, distracting, and often causes traders to lose focus on current price action.
The Top-Down Candle Panel was built to solve that problem.
By placing multiple timeframe candles directly beside live price action, traders can maintain situational awareness without leaving the active chart.
This creates a faster and cleaner workflow for:
Multi-timeframe confirmation
Trend continuation analysis
Rejection candle recognition
Trade filtering
Directional bias
Context-based execution
Avoiding trades against higher-timeframe pressure
━━━━━━━━━━━━━━━━━━
IMPORTANT
━━━━━━━━━━━━━━━━━━
This indicator is not designed to generate automatic buy or sell signals.
Its purpose is to improve decision quality through clearer market context, cleaner visualization, and stronger higher-timeframe awareness.
The goal is simple:
Help traders see what the higher timeframes are doing before entering the trade.
Indicator

Regression-Aligned Candlestick Architect [MarkitTick]💡 The Regression-Aligned Candlestick Architect is an advanced, institutional-grade technical analysis instrument engineered to seamlessly fuse structural market context with precise, deterministic candlestick morphology. Rather than presenting isolated, noisy signals, this indicator operates as a holistic market mapping system. It dynamically identifies changes in market character (CHoCH), anchors statistical regression channels to these pivotal structural nodes, and overlays a rigorously filtered, strength-tiered candlestick pattern recognition engine. This tool empowers analysts to visualize the exact mathematical relationship between micro-level price action anomalies and macro-level statistical deviations.
● ✨ Originality and Utility
Standard candlestick recognition tools often suffer from a fatal flaw: signal noise. By identifying every single pattern across the chart regardless of context, they overwhelm the analyst with false positives. This indicator revolutionizes pattern detection by introducing a multi-dimensional filtering matrix.
Contextual Awareness: Patterns are cross-referenced against a dynamic Simple Moving Average (SMA) baseline, ensuring that continuation patterns are only validated when aligned with the prevailing macroeconomic trend.
Hierarchical Strength Matrix: Patterns are not treated equally. They are mathematically scored and classified into five distinct strength tiers, from baseline indecision to highly reliable structural anomalies.
Anchored Statistical Modeling: Instead of static support and resistance lines, this tool maps volatility using an anchored Linear Regression Channel (LRC) that resets automatically upon validated structural breaks (CHoCH), providing an evolving map of fair value and extreme deviation.
Institutional Automation Ready: Built-in webhook templates format high-conviction signals directly into actionable JSON payloads, bridging the gap between discretionary charting and algorithmic execution.
● 🔬 Methodology and Concepts
The architecture of this script relies on a confluence of three primary mathematical and logical engines.
• Quantitative Pattern Recognition
The core engine deconstructs each individual candlestick into absolute mathematical variables: body size, total high-low range, upper shadow ratio, and lower shadow ratio. By applying rigid algorithmic tolerance thresholds (e.g., Dojis strictly requiring a body-to-range ratio of less than 5%), the script actively eliminates subjective interpretation.
• The Strength Stratification System
The indicator systematically grades market geometry into five actionable categories:
Strength 1 (Indecision): Identifies market equilibrium phases and compression (e.g., Doji, Spinning Tops).
Strength 2 (Weak Signals): Early signs of exhaustion that require further context (e.g., Hanging Man, Inverted Hammer).
Strength 3 (Moderate Confirmations): Standard two-candle reversal structures (e.g., Harami, Piercing Line, Dark Cloud Cover).
Strength 4 (Strong Confirmations): High-conviction multi-candle configurations (e.g., Engulfing setups, Morning/Evening Stars, Marubozu).
Strength 5 (Extreme Conviction): Rare, highly reliable setups signaling massive structural imbalances (e.g., Three White Soldiers, Breakaway Gaps).
• Structural CHoCH and LRC Anchoring
The script continuously scans for localized Pivot Highs and Pivot Lows using customizable look-left and look-right parameters. When the price closes beyond the most recent opposing pivot node, a Change of Character (CHoCH) is registered. This event immediately triggers the recalculation of the Linear Regression Channel, anchoring the starting point to the critical pivot and projecting statistical deviation bands forward to track the new trend's trajectory.
● 🎨 Visual Guide
The interface is meticulously designed with a 3D holographic aesthetic to ensure clarity without cluttering the primary price action.
• Candlestick Labels and Holographic Colors
Indigo Glass (Strength 1): Muted, translucent tones denoting indecision and market pauses without demanding immediate attention.
Cyber Blue & Violet (Strength 2 & 3): Intermediate colors highlighting developing reversals or moderate continuation patterns.
Neon Mint (Bullish Strength 4-5): Bright, high-contrast markers indicating strong bullish dominance (e.g., BE+, 3WS), plotted below the bar.
Hot Pink (Bearish Strength 4-5): Intense, high-visibility markers warning of severe bearish pressure (e.g., BE-, 3BC), plotted above the bar.
Cyber Gold (Special/Exhaustion): Reserved strictly for profound trend exhaustion signatures, such as the Three Line Strike configuration.
To learn more about Candlestick patterns, access the following link:
Quantitative Analysis of Algorithmic Candlestick Pattern
• Linear Regression Channel Bands
Active LRC: Displays a Neon Cyan midline representing the mean regression. Soft Cyan and Deep Azure dashed and dotted lines represent the first and second standard deviation bands respectively, filled with translucent gradient shading to represent volatility zones.
Historical LRC: Previous channels are preserved in deep Magenta and Blue-Violet hues. This allows the analyst to review past structural behavior, momentum shifts, and how price transitioned between volatility states.
● 📖 How to Use
This indicator is optimized for confluence trading. Discretionary traders should look for optimal alignment between the LRC boundaries and high-tier candlestick patterns.
Define the Structural Boundary: Observe the active Neon Cyan LRC. Determine if the current micro-trend is contained safely within the inner standard deviation bands or if it is stretching into extreme statistical anomaly (touching or piercing Band 2).
Wait for Signal Convergence: A standalone pattern is interesting, but confluence is key. A Strength 4 (Neon Mint) Bullish Engulfing pattern occurring exactly at the lower boundary (Band 2) of an ascending LRC presents an exceptionally high-probability mean-reversion or trend-continuation setup.
Automate Execution: Utilize the built-in alert system to capture the exact entry price alongside dynamically calculated ATR-based Stop Loss and Take Profit levels when a tier 4 or 5 pattern confirms.
Adapt to Trend Shifts: If a CHoCH occurs, the channel will instantly snap to the new trajectory. Immediately shift your directional bias and await new pattern formations that align with the updated regression mean.
● ⚙️ Inputs and Settings
The indicator provides granular control over internal parameters, allowing adaptation to varying asset classes and timeframes.
• General & Strength Filters
Max Patterns to Display: Limits historical label rendering to keep the chart performant and visually clean.
Show Only Trend-Appropriate Patterns: A critical toggle that forces the engine to ignore counter-trend signals by filtering outputs through the internal SMA logic.
Strength Toggles (S1 - S5): Allows the user to independently enable or disable specific tiers. Professional traders often disable tiers 1-3 to focus exclusively on high-probability tier 4 and 5 formations.
• Current Anchored CHoCH LRC
Pivot Left/Right Bars: Dictates the sensitivity of the Change of Character detection. Higher numbers require major macro swings to shift the channel, while lower numbers tightly track micro-structure fluctuations.
Band Multipliers (1 & 2): Adjusts the mathematical standard deviation widths of the regression channel. Defaulted to standard 1.0 and 2.0 deviations.
• Webhook Execution Configuration
Action Strings: Define custom text identifiers (e.g., 'long', 'closeshort') that will be injected into the automated JSON payload when high-strength signals or CHoCH events trigger on a confirmed bar close.
● 🔍 Deconstruction of the Underlying Scientific and Academic Framework
The analytical depth of this script is heavily grounded in established statistical mathematics and heuristic geometric modeling.
• Statistical Modeling via Ordinary Least Squares (OLS)
The dynamic Linear Regression Channel is derived using the Ordinary Least Squares method. The script iteratively loops through the dynamically anchored period (from the algorithmic CHoCH trigger to the current bar index) to calculate the line of best fit. It computes the summation of price coordinates, calculating the slope and y-intercept to minimize the sum of the squared residuals.
Furthermore, the indicator calculates the population standard deviation of these residuals (errors) to project the outer variance bands. In a normally distributed financial dataset, approximately 68% of price action should remain within Band 1, and 95% within Band 2. When price forcefully breaches Band 2, it statistically indicates an unsustainable momentum extreme, shifting the probability matrix heavily toward imminent mean-reversion.
• Quantitative Candlestick Heuristics
Traditional Japanese Candlestick theory relies heavily on qualitative visual assessment. This indicator transforms it into a rigorous quantitative science. By expressing wicks, shadows, and true bodies as strict fractional ratios of the total period variance, the algorithm entirely removes psychological bias. For instance, an Engulfing pattern is not merely determined by a visual overlap; the internal logic mathematically validates that the current open and close parameters completely eclipse the previous period's boundaries, while simultaneously verifying that the absolute body size explicitly exceeds the prior via comparative array lookbacks. Furthermore, advanced configurations like the 'Three Line Strike' necessitate the sequential tracking of four independent vector arrays to confirm precise exhaustion geometry and statistical anomaly.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicator

Volatility Regime Classifier [JOAT]Volatility Regime Classifier
Introduction
The Volatility Regime Classifier is an overlay indicator that continuously classifies the current market environment into one of four distinct volatility regimes — TRENDING , RANGING , VOLATILE , or MIXED — and adapts its visual output accordingly. Rather than simply measuring how much volatility is present, this indicator identifies what type of volatility environment is active, a distinction that is directly relevant to strategy selection.
The classification is built on three independent measures — ATR Z-score, ATR percentile, and EMA directional ratio — each capturing a different dimension of market behavior. Their combination produces a regime map that is both statistically grounded and practically actionable.
---
Core Concepts
1. ATR Z-Score — Detecting Statistically Extreme Volatility
The Z-score measures how far the current ATR deviates from its own historical mean, in units of standard deviation:
atrZ = (atr14 - ta.sma(atr14, lookback)) / ta.stdev(atr14, lookback)
A Z-score above the Volatile Z Threshold (default 2.0) means current volatility is more than two standard deviations above the recent average — a statistically uncommon spike. This is the trigger for the VOLATILE regime, indicating conditions where position sizing, stop distances, and strategy assumptions built around normal ranges may no longer apply.
The Z-score is a mean-reverting measure. An extreme reading does not tell you which direction price will move. It tells you the current volatility environment is atypical relative to recent history.
2. ATR Percentile — Identifying Volatility Compression
The percentile ranks current ATR linearly within its own recent range:
atrPercentile = (atr14 - ta.lowest(atr14, lookback)) / (ta.highest(atr14, lookback) - ta.lowest(atr14, lookback)) * 100
A percentile below the Ranging Percentile threshold (default 35%) means ATR is near its lowest levels of the lookback window — a compression signal. This is the trigger for the RANGING regime, which historically precedes expansion but does not predict its direction or timing. It is a descriptor of the current state, not a forecast.
Using percentile rather than a fixed ATR threshold makes the measure adaptive: it adjusts to the instrument's own volatility character and the current lookback window.
3. EMA Directional Ratio — Testing Movement Quality
Directional quality is measured by the separation between a fast and slow EMA, expressed in ATR units:
directional = math.abs(ema_fast - ema_slow) / atr14 > dirStrength
When the EMA separation exceeds the Directional Strength threshold (default 1.5 ATR units), the market is showing sustained, coherent movement in one direction relative to its current volatility level. This is the trigger for the TRENDING regime.
Expressing EMA separation in ATR units normalizes for volatility: a large EMA gap during a high-volatility period may be less directionally significant than the same gap during a low-volatility period.
4. Regime Classification Logic
The three measures are evaluated in priority order:
VOLATILE — if ATR Z-score exceeds the volatile threshold. Extreme volatility takes precedence over all other conditions.
RANGING — else if ATR percentile is below the ranging threshold. Volatility compression is checked next.
TRENDING — else if the EMA directional ratio is satisfied. Directional movement is confirmed if not in a spike or compression.
MIXED — else. The market does not clearly fit any of the above categories: volatility is average, not directional, and not compressed.
Regime transitions are confirmed on barstate.isconfirmed bars only, preventing labels and state changes from appearing on unfinished candles.
5. Adaptive Bands
Each regime applies a different ATR multiplier to a central EMA band:
VOLATILE: multiplier 3.0 — wide bands reflecting extreme range
TRENDING: multiplier 2.0 — moderate bands supporting trend context
MIXED: multiplier 1.5 — standard bands for undifferentiated conditions
RANGING: multiplier 1.0 — tight bands appropriate for compressed, mean-reverting conditions
upper = ema_center + baseMult * atr14
lower = ema_center - baseMult * atr14
The band envelope therefore scales automatically to the current regime, providing contextually appropriate support and resistance structure without manual adjustment.
6. Smooth Color Transitions
Regime colors are smoothed by applying a 10-period EMA to each RGB channel independently. This prevents abrupt color jumps at regime boundaries and provides a visual blending effect as the market transitions between states. The smoothing period is fixed at 10 bars and is not user-configurable, as it is a presentational feature rather than an analytical one.
7. Regime Transition Labels
A label is plotted at each confirmed regime change, marking the bar where the classification shifted. This creates a visual audit trail of regime history on the chart, allowing traders to review how conditions evolved across the session or swing.
8. Information Table
A compact table in the top-right corner displays the current state of all key measurements:
Current regime classification
ATR value (absolute)
ATR Z-score
ATR percentile
EMA trend direction (bullish/bearish based on fast vs slow EMA)
Band width (upper minus lower)
Directional threshold met (yes/no)
Active band multiplier
---
Features
Four-state regime classification: TRENDING, RANGING, VOLATILE, MIXED
ATR Z-score for statistical volatility spike detection
ATR percentile for volatility compression identification
EMA directional ratio normalized to ATR units
Priority-ordered regime logic with clear precedence rules
Adaptive ATR-based bands that scale multiplier per regime
Smooth RGB-channel EMA color blending at regime transitions
Regime transition labels at every confirmed state change
Per-bar color coding reflecting the active regime
Background tint per regime (high transparency, non-intrusive)
Real-time information table with all underlying metrics
---
Input Parameters
ATR Length (default 14): Period for all ATR calculations. Shorter values make the Z-score and percentile more reactive; longer values smooth them out.
Regime Lookback (default 100): The historical window used for Z-score (mean and standard deviation) and percentile (highest/lowest) calculations. Shorter lookbacks make the regime more sensitive to recent conditions; longer lookbacks require more extreme readings to trigger transitions.
Volatile Z Threshold (default 2.0): ATR Z-score level required to trigger the VOLATILE regime. 2.0 corresponds to a two-standard-deviation event relative to the lookback window.
Ranging Percentile (default 35%): ATR percentile below which the RANGING regime is triggered. Lower values require a tighter compression before classifying as ranging.
Directional Strength (default 1.5): EMA separation threshold in ATR units required for the TRENDING regime. Higher values require a stronger, more sustained directional move.
Fast EMA (default 20): Period for the fast EMA used in directional ratio and the band center.
Slow EMA (default 50): Period for the slow EMA used in directional ratio.
Band EMA (default 50): Period for the central EMA from which adaptive bands project. Can be set independently from the directional EMAs.
---
How to Use
Regime-to-strategy mapping: The four regimes map to four broad strategy postures:
TRENDING: Conditions are directional. Trend-following approaches — momentum entries, trailing stops, breakout continuation — have historically performed better in this state.
RANGING: Volatility is compressed. Mean-reversion approaches — fading extremes, range-bound entries — are more aligned with this environment. Be aware that compression often precedes expansion.
VOLATILE: Volatility is statistically extreme. Reduce position size. Wider-than-usual stops are required to avoid being shaken out by noise. Many strategies based on normal ATR assumptions will malfunction in this state.
MIXED: No strong signal. Conditions do not clearly favor trending, ranging, or risk-off postures. Waiting for a clearer regime or reducing exposure are reasonable responses.
Reading the bands: The adaptive bands are not support/resistance in a traditional sense. They represent a contextually appropriate price envelope for the current regime. In ranging conditions, expect price to interact with the tight bands; in volatile conditions, the wider bands reflect the expanded true range.
Using the table: The information table provides the underlying metric values at a glance. If a regime seems unexpected, check the raw Z-score, percentile, and directional values directly — this helps distinguish borderline cases from clear ones.
Transition labels: Regime transition labels mark where conditions shifted on historical bars. Reviewing these labels on historical data can help calibrate whether the default thresholds suit a particular instrument and timeframe.
---
Limitations
All three underlying measures are based on ATR and EMA — both of which are lagging indicators. Regime classification reflects recently confirmed conditions, not instantaneous market state.
The lookback window is critical to the behavior of both the Z-score and percentile. A short lookback makes the indicator reactive but prone to frequent transitions; a long lookback produces more stable regimes but may lag real condition changes.
The four-state classification is a simplification of a continuous, multidimensional market reality. Real market conditions exist on a spectrum; the regime labels are useful approximations, not rigid categories.
On instruments with low liquidity, thin volume, or irregular trading sessions (certain futures contracts, crypto on illiquid exchanges, small-cap equities), ATR behavior may be distorted by gaps or thin-market artifacts, producing unreliable Z-score and percentile readings.
Regime classification performs best when applied within a single session or consistent trading context. Applying it across major session boundaries (e.g., Asia open to New York close on forex) without adjustment may produce spurious transitions driven by liquidity changes rather than structural market behavior.
This indicator does not predict regime changes. It classifies the current regime after it has formed. The RANGING regime, for example, does not predict that expansion will occur — it describes that compression is currently present.
No indicator, including this one, predicts future price direction or magnitude. Regime classification informs which type of strategy is currently better aligned with conditions — it does not guarantee that any strategy will be profitable.
---
Originality Statement
Many volatility indicators answer the question "how volatile is the market?" — ATR, Bollinger Band width, historical volatility, and similar tools all provide variants of this measurement. This indicator answers a different question: "what type of volatility environment is the market currently in?"
The distinction matters because different volatility types require different responses. A spike in volatility during a strong trend calls for different handling than a spike caused by a news event in a ranging market. Compression before a directional breakout is a different environment than compression within an established range. The MIXED regime acknowledges that not all market conditions are clearly classifiable — a honesty that most binary volatility tools omit.
Three independent measures are combined by design, not convenience:
The Z-score is statistical — it grounds the VOLATILE trigger in the instrument's own distributional history rather than an arbitrary fixed threshold.
The percentile is rank-based and linear — it identifies compression relative to the full range of recent ATR values without being sensitive to individual outliers.
The EMA directional ratio tests movement quality in ATR-normalized units — a common EMA crossover system would classify direction identically regardless of whether price is moving coherently or chopping. Normalizing to ATR removes that ambiguity.
The adaptive band multiplier is a direct mechanical expression of the regime classification — not a cosmetic addition. It means the envelope drawn on the chart is always scaled to the current environment, rather than applying a single fixed multiplier that is simultaneously too tight for volatile conditions and too wide for ranging ones.
---
Disclaimer
This indicator is provided for informational and educational purposes only. It does not constitute financial advice, investment advice, or a recommendation to buy or sell any asset. Regime classification describes current market conditions based on historical data — it does not predict future conditions, price direction, or strategy outcomes. All trading involves risk. You are solely responsible for your own trading decisions.
-Made with passion by officialjackofalltrades
Indicator

High Timeframe Candles - HTFHigh Timeframe Candles - HTF
High Timeframe Candles - HTF indicator is a professional analysis dashboard developed for traders who want to maintain a clear view of Higher Timeframe (HTF) market structure and liquidity gaps while operating on Lower Timeframes (LTF). Based on ICT (Inner Circle Trader) concepts, this tool dynamically draws up to six selected higher timeframes and their respective imbalances on the right side of the chart (offset). The indicator is specifically designed for "upward" timeframe analysis, meaning it displays only periods higher than your current chart (e.g., viewing 15m, 1H, and 4H candles while on a 5m chart) and does not show lower timeframe data on the dashboard.
One of the indicator's strongest features is its real-time data synchronization. HTF candles are updated instantaneously with every price movement on the lower timeframe. This allows you to monitor the formation, wick length, and expansion of a 15-minute or hourly candle while actively trading on a 1-minute chart. Additionally, it maximizes time management by providing dynamic countdown timers for each HTF candle closing and Day of Week (DOW) labels for daily candles.
In terms of imbalance detection, this tool offers advanced features by automatically identifying Fair Value Gap (FVG) and Volume Imbalance (VI) zones directly on the HTF candles. This functionality enables you to see which high-timeframe gap the price is gravitating toward or which levels it might react to without ever switching charts. Specifically, it includes options to align daily candle calculations with critical ICT "True Day Open" benchmarks, such as Midnight, 08:30, or 09:30 New York time.
Designed with a user-friendly interface, this indicator is fully customizable and optimized to reduce workspace clutter while protecting trader psychology. By eliminating the need to constantly flip through different timeframes, it helps you maintain focus during execution. Coded with the latest Pine Script v6 performance standards, this tool provides a comprehensive roadmap for both scalping and intraday trading strategies. Indicator

Dissonance Ledger [JOAT]Dissonance Ledger
Introduction
Dissonance Ledger is an advanced open-source divergence intelligence system that simultaneously monitors four independent oscillators — RSI, MACD histogram, Money Flow Index (MFI), and Momentum — for both regular and hidden divergences against price. Rather than relying on a single oscillator (which produces frequent false divergences), this indicator uses a confluence scoring system that requires multiple oscillators to confirm the same divergence before generating a signal. The result is a divergence detection engine with substantially fewer false positives than any single-oscillator approach.
The fundamental problem with traditional divergence trading is reliability. A bearish RSI divergence (price making higher highs while RSI makes lower highs) fails more often than it succeeds when used in isolation. This is because a single oscillator can diverge from price for structural reasons unrelated to an impending reversal. Dissonance Ledger solves this by requiring a minimum number of oscillators (configurable, default 2 out of 4) to independently confirm the same divergence pattern. When RSI, MACD, MFI, and Momentum all agree that momentum is weakening despite price advancing, the probability of a genuine reversal increases substantially.
Core Concepts
1. Multi-Oscillator Divergence Architecture
The indicator calculates four oscillators at global scope to ensure proper history tracking:
RSI (Relative Strength Index): Measures the ratio of average gains to average losses. Divergences in RSI indicate that the magnitude of price moves is changing relative to the trend
MACD Histogram: The difference between the MACD line and its signal line. Divergences in the histogram indicate that the rate of momentum change is shifting
MFI (Money Flow Index): A volume-weighted RSI that incorporates buying and selling pressure. MFI divergences indicate that volume is not confirming the price move
Momentum: Raw rate of change (close minus close N bars ago). Momentum divergences indicate that the absolute speed of price movement is declining
Each oscillator provides a different lens on momentum. RSI measures relative strength, MACD measures momentum acceleration, MFI measures volume-confirmed pressure, and Momentum measures raw speed. When multiple lenses agree, the signal is more reliable.
2. Fractal Pivot Anchoring
Divergences are anchored to fractal pivot points rather than arbitrary lookback windows. The indicator uses `ta.pivothigh()` and `ta.pivotlow()` with configurable left and right bar counts to identify genuine swing highs and lows. Each pivot's price and all four oscillator values are stored in arrays:
if not na(pivHigh)
array.unshift(phPrices, pivHigh)
array.unshift(phBars, bar_index - pivotRight)
array.unshift(phRSI, rsiAtBar)
array.unshift(phMACD, macdAtBar)
// ... MFI, MOM stored similarly
When a new pivot forms, the indicator compares it against the previous pivot. If price made a higher high but one or more oscillators made a lower high, that oscillator registers a bearish divergence vote. The confluence count is the total number of oscillators that agree.
3. Regular vs Hidden Divergences
The indicator detects both types:
Regular Divergence (Reversal): Price makes a higher high / lower low while oscillators make a lower high / higher low. This suggests the current trend is losing momentum and a reversal may follow
Hidden Divergence (Continuation): Price makes a lower high / higher low while oscillators make a higher high / lower low. This suggests the underlying trend remains strong despite a surface-level pullback, and continuation is likely
Regular divergences are drawn with solid lines; hidden divergences use dashed lines in distinct colors (arctic cyan for hidden bull, amber for hidden bear) to differentiate them visually.
4. Divergence Strength Scoring
Each detected divergence receives a strength score (0-100) based on three factors:
Confluence Weight (50%): More oscillators confirming = higher score. 4/4 confluence scores maximum
Price Divergence Magnitude (25%): Larger percentage difference between the two pivot prices = stronger divergence
Oscillator Divergence Magnitude (25%): Larger absolute difference in oscillator readings between pivots = stronger signal
This scoring system helps traders prioritize high-conviction divergences over marginal ones.
5. ATR Target Projections
When a divergence is confirmed, the indicator projects a target level using a configurable ATR multiple from the pivot point. For bullish divergences, the target is projected above the pivot low; for bearish, below the pivot high. These targets provide a measured-move expectation for the potential reversal.
6. Oscillator Aggregate Bias
Beyond divergence detection, the indicator calculates an aggregate bias across all four oscillators. Each oscillator's reading is normalized to a -1 to +1 scale, and the average is smoothed with an EMA. This provides a continuous measure of overall momentum direction and strength, independent of divergence signals.
Features
Confluence-Scored Divergence Labels: Each divergence signal shows its confluence count (e.g., "3/4 REG" for a regular divergence confirmed by 3 of 4 oscillators) and whether it is regular or hidden
Divergence Lines: Solid lines for regular divergences, dashed lines for hidden divergences, connecting the two pivot points that form the divergence pattern
ATR Target Projections: Dashed horizontal lines with price labels showing the projected target for each divergence
Oscillator Momentum Ribbon: An EMA-based ribbon on the price chart that fills bullish or bearish based on the aggregate oscillator bias, providing continuous momentum context
Divergence Decay Tracking: After a divergence signal, a fading background zone tracks the "decay" period — the window during which the divergence is still considered active. The zone fades progressively over the configurable decay duration
Confluence-Weighted Bar Coloring: Candle colors shift on a gradient based on how many oscillators agree on direction. Full agreement produces vivid colors; mixed signals produce muted colors
Divergence History Chain: The dashboard tracks the last three divergence signals in sequence (e.g., "BULL > BEAR > H-BULL"), revealing the pattern of momentum shifts
Pivot Markers: Small circles mark fractal pivots that did not produce divergences, maintaining structural awareness
16-Row Dashboard: Displays all four oscillator values, agreement count, aggregate bias, last bull/bear divergence details, strength scores, hidden divergence tracking, history chain, decay status, and total divergence counts
Input Parameters
Pivot Detection:
Left/Right Bars: Fractal pivot detection sensitivity (default: 5/5)
Lookback Window: Maximum bars between pivots for divergence comparison (default: 60)
Oscillators:
RSI Length (default: 14), MACD Fast/Slow/Signal (default: 12/26/9), MFI Length (default: 14), Momentum Length (default: 14)
Confluence:
Min Confluence: Minimum oscillators required to confirm a divergence (default: 2, range: 1-4)
Target Projection:
ATR Target Multiple: Multiplier for target distance (default: 1.5)
Target ATR Length: ATR period for projection calculation (default: 14)
Visuals:
Toggles for divergence lines, hidden divergences, target projections, oscillator ribbon, bar coloring, signal background, decay zones, and dashboard
Decay Duration: Number of bars the divergence decay zone persists (default: 20)
How to Use This Indicator
Step 1: Set Your Confluence Threshold
Start with the default minimum confluence of 2. If you want fewer but higher-conviction signals, increase to 3 or 4. A 4/4 confluence divergence is rare but highly significant.
Step 2: Watch for Divergence Labels
When a label appears (e.g., "3/4 REG" below a pivot low), it means 3 of 4 oscillators confirmed a regular bullish divergence at that pivot. The higher the confluence, the more attention the signal deserves.
Step 3: Check the Strength Score
In the dashboard, review the divergence strength percentage. Scores above 60 indicate strong divergences with large price and oscillator magnitude differences. Scores below 30 are marginal.
Step 4: Use Target Projections for Planning
The dashed target line shows where a measured-move reversal might reach. Use this for take-profit planning, not as a guaranteed level.
Step 5: Monitor the Decay Zone
The fading background after a divergence signal shows the active window. If price hasn't responded by the time the decay zone expires, the divergence has likely failed.
Step 6: Read the History Chain
A sequence like "BEAR > BEAR > BEAR" in the history chain suggests persistent bearish momentum divergences — the trend may be weakening structurally. Alternating "BULL > BEAR > BULL" suggests choppy, unreliable conditions.
Close-up showing a 4/4 confluence bearish divergence with all four oscillator divergence lines visible, the strength score in the dashboard reading 78%, and the ATR target projection line below
Indicator Limitations
Divergences are identified at fractal pivots, which require right-bar confirmation. This means divergences are detected with a delay equal to the right-bar count (default 5 bars after the actual pivot)
Even with multi-oscillator confluence, divergences can fail. Strong trends can produce multiple consecutive divergences before any reversal occurs — this is known as "divergence stacking" and is a well-known limitation of divergence trading
The four oscillators used (RSI, MACD, MFI, Momentum) are all derived from price and volume. They are not truly independent — they share common inputs and can produce correlated false signals during certain market conditions
MFI requires reliable volume data. On forex pairs or instruments with synthetic/tick volume, MFI-based confluence may be less meaningful
Target projections use ATR as a distance measure, which is backward-looking. In rapidly changing volatility environments, projected targets may overshoot or undershoot
Hidden divergences are continuation signals, not reversal signals. Confusing the two types leads to trading against the trend
Originality Statement
This indicator is original in its multi-oscillator confluence approach to divergence detection. While divergence indicators exist for individual oscillators, this indicator is justified because:
The four-oscillator confluence system (RSI + MACD + MFI + Momentum) provides a reliability filter not available in single-oscillator divergence detectors. Each oscillator measures a different aspect of momentum, and their agreement substantially reduces false positives
The divergence strength scoring system quantifies signal quality using confluence weight, price magnitude, and oscillator magnitude — providing an objective measure for prioritizing signals
Fractal pivot anchoring ensures divergences are measured between genuine swing points rather than arbitrary lookback windows
The divergence decay tracking system provides a visual time-window for signal validity, addressing the common question of "how long is this divergence still relevant?"
The aggregate oscillator bias ribbon provides continuous momentum context independent of divergence signals
The history chain tracking reveals patterns in divergence sequences that can indicate structural trend weakening or choppy 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. Divergences are probabilistic patterns, not certainties — even high-confluence divergences can and do fail. Past divergence patterns do not guarantee future reversals. Target projections are mathematical estimates, not price predictions. Always use proper risk management including stop losses and position sizing. The author is not responsible for any losses incurred from using this indicator.
-Made with passion by officialjackofalltrades
Indicator

Indicator

Indicator

Indicator

Indicator

Session Auction State Engine (SASE) Summary in one paragraph
Session Auction State Engine (SASE) is a session context indicator for liquid futures, FX, equities, and crypto on intraday to daily timeframes. It classifies the current session into one of four auction regimes, Balanced, Early trend, Trend continuation, or Failed auction, so you act only when multiple acceptance and expansion conditions align. It is original because it outputs a single interpretable auction state, not buy and sell signals, by combining time acceptance, range expansion, and return to value logic into a compact dashboard. Add it to a clean chart, read the table for Action and permissions, and use the optional markers and bands for quick visual context. Shapes can move while the bar is open and settle on close, for conservative workflows use alerts on bar close.
Scope and intent
• Markets. Major index futures, major FX pairs, large cap equities, liquid crypto
• Timeframes. 1 minute to daily
• Default demo used in the publication. ES1! on 5 minute
• Purpose. Prevent premature directional decisions by forcing regime confirmation before direction is considered actionable
• Limits. Indicator only. No backtest, no execution, no performance claims
Originality and usefulness
This is not a mashup of common indicators. It is a session auction classifier with an explicit decision hierarchy.
• Unique concept or fusion. A regime engine that gates trading by session auction state using Initial Balance, value acceptance, expansion, and return to value confirmation
• What failure mode it addresses. False starts in chop, early breakouts that never gain acceptance, and trend chasing inside balanced sessions
• Testability. Inputs expose each component and the table shows the state, direction, and pass or fail checklist so users can verify why a state appears and tune thresholds
• Portable yardstick. Expansion is normalized by an expected range unit (ATR based), so thresholds scale across symbols with different point values
Method overview in plain language
SASE runs inside a user defined session window. It builds an Initial Balance (IB), then evaluates whether the market is accepting prices outside value and outside IB, whether the session is expanding beyond IB, and whether price returns to value after a failed excursion.
Base measures
• Range basis. Value width is ATR of the chart timeframe over the Width ATR length, multiplied by Width ATR multiplier
• Normalization basis. Expected range is ATR, either daily or intraday based on Expected range mode, used to normalize session extension
Components
• Initial Balance (IB). High and low during the first IB minutes of the session. IB defines the first acceptance boundary
• Value anchor. A session anchored VWAP or TWAP (or auto) used as a value center
• Value width. ATR based band around value used to measure inside value and outside value
• Acceptance. Two acceptance channels are tracked, closes outside value in the breakout direction and closes outside IB in the breakout direction. An EMA plus a short streak score turns this into an acceptance strength metric
• Extension. Maximum distance beyond IB, normalized by expected range, measures range expansion
• Balance. An EMA of time spent inside the value band measures how rotational versus directional the session is
• Failed auction. Requires a real excursion outside value first, then a sustained return inside value, plus an acceptance collapse and a rebalance increase, optionally requiring price to be back inside IB
Fusion rule
SASE outputs exactly one state per bar inside the session.
• Balanced. No confirmed breakout from IB, or conditions indicate rotational trade, high balance, low acceptance, low extension
• Early trend. Breakout exists, but trend continuation checklist is not complete yet
• Trend continuation. All trend gates pass at once: enough time since breakout, acceptance above threshold, extension above threshold, and balance below threshold
• Failed auction. After an excursion outside value, price returns and holds inside value while acceptance collapses and balance rises, optionally requiring price back inside IB
Signal rule
This script does not issue trade signals. It outputs context.
• Direction is shown only when state is not Balanced
• The dashboard shows a Trend checklist (T, A, E). Trend continuation requires T pass, A pass, and E pass
• Early trend indicates direction may be forming but confirmation is incomplete
• Failed auction indicates the prior directional attempt was rejected and mean reversion conditions are stronger
What you will see on the chart
• Optional markers. Key markers appear on state transitions, typically when Trend continuation or Failed auction begins, depending on the Markers setting
• Optional reference levels. IB high and IB low lines, and value center plus value bands
• Optional background and bar color. Off by default for chart cleanliness
• Compact dashboard. A table showing state, direction, Action, permissions, IB progress, checklist, and component gauges
Table fields and quick reading guide
• State badge. Current auction state
• Direction. Up or Down when state is not Balanced, otherwise None
• Action. Plain language instruction for the current state
• Use. Two permissions, Trend and MeanRev, shown as ON or OFF
• IB. Progress and status, Wait until Complete
• Trend. Ready percent plus checklist T, A, E
• Accept. Acceptance strength and whether it meets the trend threshold
• Extend. Extension strength and whether it meets the trend threshold
• Balance. Balance score and whether it is low enough for trend continuation
• Fail. Excursion and return to value progress when relevant
Reading tip. Trend continuation is only intended when T, A, and E are all passing. If Balanced, do not force direction.
Inputs with guidance
Setup
• Session. Defines when the engine is active. Verify timezone and hours when changing symbol or venue
• Session timezone. Exchange or a named timezone
• Show last session snapshot when closed. When enabled, the table displays the last in session state after the session ends
Logic
• IB minutes. Typical 30 to 90. Higher reduces noise but delays classification
• Value anchor. Auto is recommended. VWAP requires reliable volume, TWAP is volume agnostic
• Value reference. Freeze at IB reduces value drift and makes acceptance and failed auction logic more stable
• Width ATR length. Typical 14 to 30. Higher smooths value width
• Width ATR multiplier. Typical 0.5 to 1.2. Higher widens value and increases Balanced time
• Breakout buffer as width fraction. Typical 0.1 to 0.4. Higher requires cleaner breakouts
• Acceptance EMA length. Typical 20 to 60. Higher reduces flicker
• Acceptance streak bars. Typical 4 to 10. Higher requires sustained acceptance
• Early trend acceptance threshold. Typical 0.25 to 0.45
• Trend continuation acceptance threshold. Typical 0.45 to 0.70
• Balance EMA length. Typical 30 to 80
• Trend continuation max balance. Typical 0.30 to 0.55. Lower makes trend continuation stricter
• Balanced min balance. Typical 0.55 to 0.80
• Trend continuation min bars since breakout. Typical 10 to 30
• Extension thresholds. Early 0.10 to 0.25, Trend 0.20 to 0.50, in expected range units
• Failed auction window bars. Typical 15 to 40. Larger windows require more sustained rejection
• Failed auction thresholds. Acceptance max 0.10 to 0.30, Balance min 0.55 to 0.80
• State change confirm bars. Typical 1 to 4
• Return to Balanced confirm bars. Typical 4 to 12
• Minimum bars to keep non Balanced state. Typical 6 to 20, increases stability
UI
• Theme. Dark or Light
• Dashboard position. Corner selection
• Markers. Off, Key only, or All changes
• Background tint and bar color. Off by default to keep charts readable
• Show IB lines and Show value bands. Off by default, enable for learning or debugging
Usage recipes
Intraday trend focus
• IB minutes 60
• Value reference Freeze at IB
• Breakout buffer 0.25
• Trend confirm bars 18
• Accept trend threshold 0.55
• Extend trend threshold 0.30
• Trend max balance 0.40
Goal. Trade only when Trend continuation is active and checklist is fully passing
Intraday mean reversion focus
• IB minutes 30 to 60
• Value reference Freeze at IB
• Wider value width, raise Width ATR multiplier to 0.9 to 1.2
• Raise Balanced min balance to 0.70
• Keep Markers on Key only
Goal. Focus on Balanced and Failed auction states, avoid early trend and trend continuation trades
Swing continuation
• Use 60 minute or 240 minute chart
• Expected range mode Daily ATR
• Trend confirm bars 12 to 30 depending on timeframe
• Raise Width ATR length to 30
Goal. Use Trend continuation as a higher level regime gate, then use your own entry timing tool inside that regime
Realism and responsible publication
• No performance claims. Past results never guarantee future outcomes
• Intrabar motion reminder. Shapes and table values can update while a bar forms and settle on close
• Session windows use the chart exchange time unless you override timezone. Verify hours when changing symbol or venue
Honest limitations and failure modes
• News releases and liquidity gaps can break normal auction behavior and can trigger rapid state transitions
• Symbols with unreliable volume may work better using TWAP or Auto rather than VWAP only
• Very quiet regimes can reduce contrast between Balanced and Early trend, consider longer windows or higher thresholds
• Non standard chart types can distort session and IB calculations, use standard candles for evaluation
Open source reuse and credits
None
Legal
Education and research only. Not investment advice. You are responsible for your decisions. Test on historical data and in simulation before any live use. Use realistic costs in any external testing workflow. Indicator

Oliver Velez System Visual Helper [CocoChoco]Not endorsed by or related to Oliver Velez himself.
🐘 Oliver Velez System Visual Helper
🎯 Overview
Unlock the power of Institutional Trading with this precision tool designed for followers of the Oliver Velez (OV) methodology. This indicator specializes in identifying the "Narrow State"—the coiled spring of the market—and highlighting the high-probability entry candles that signal institutional participation.
Unlike standard indicators that lag, this helper focuses on the transition from low to high volatility, giving you a front-row seat to the moves that matter.
🧩 The Core Philosophy: The Narrow State
According to Oliver Velez, the most explosive moves in the market occur when the 20 SMA and the 200 SMA converge into a Narrow State. This represents a moment of equilibrium where both short-term and long-term traders are in agreement, and the next move is likely to be a significant expansion.
This indicator automates that discovery by:
Measuring Distance: It calculates the exact percentage gap between the SMAs to find the "coil."
Verifying Parallelism: It ensures the SMAs are moving "somewhat horizontal" and parallel, filtering out chaotic crossovers.
Multi-Timeframe Confirmation: It checks your higher timeframe (e.g., 15m) to ensure the big players are aligned before you take a trade on the smaller timeframe.
⚡ Power Entry Highlights
Once a Narrow State is confirmed, the indicator "paints" the chart with specific Velez-style entry patterns. These bars only highlight when Price > 20 SMA > 200 SMA (Bullish) or Price < 20 SMA < 200 SMA (Bearish), ensuring you never trade against the trend.
EB (Elephant Bar): The "Institutional Footprint." Large, solid-bodied bars that represent massive buying or selling.
TB (Tail Bar): Bottoming and Topping tails that show clear rejection of the SMAs, signaling a reversal into the main trend.
180 (Bull/Bear 180): A two-bar reversal pattern where the current bar completely engulfs the body of the previous bar, effectively "flipping" the momentum.
🛠️ Key Features
Dynamic Cloud Ribbon: A solid visual zone between the 20 and 200 SMAs that appears only when the Narrow State and MTF alignment are perfect.
Smart Bar Coloring: Only the specific institutional breakout bars change color, keeping your chart clean and professional.
Dual Alert System:
Narrow State Start: Get notified the second the market begins to coil.
Entry Candle Close: Get a ping exactly when a valid EB, TB, or 180 closes.
Consolidated Style: A clean UI that allows you to manage all pattern colors with a single picker.
🚀 How to Use
Wait for the Cloud: When the ribbon appears between the SMAs, the market is in a Narrow State.
Look for the Color: Watch for an Aqua (default) candle to form.
Check the Label: Verify the entry type (EB, TB, or 180).
Execute: Per OV's rules, enter on the break of the entry bar’s high/low with a stop at the tail/low of the bar.
Disclaimer: Trading involves significant risk. This tool is a visual aid, and may be significantly different from Oliver Velez system, and does not constitute financial advice. Always practice proper risk management. Indicator

Smart Trader, Episode 04, by Ata Sabanci, Candles and Z ScoresSmart Trader, Episode 04
Candles and Z-Scores: A Statistical Approach to Market Analysis
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
OVERVIEW
This indicator applies Z-Score statistical analysis to measure how unusual current market conditions are compared to historical norms. It simultaneously analyzes five key metrics: Price, Total Volume, Buy Volume, Sell Volume, and Delta (Buy minus Sell) . The system detects 60 academically-researched market scenarios and provides visual feedback through Z-Lines (support/resistance levels), Event Markers, Trend Channels, and a comprehensive Dashboard.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CORE CONCEPT: WHY Z-SCORE?
A Z-Score measures how many standard deviations a value is from its mean. In financial markets, extreme Z-Scores indicate statistically rare events that often precede significant price movements.
Mathematical Formula:
Z = (Current Value - Mean) / Standard Deviation
Interpretation:
• Z ≥ +2.0: Extremely high (occurs approximately 2.5% of the time)
• Z ≥ +1.0: Above average
• Z ≈ 0: Normal (near the mean)
• Z ≤ -1.0: Below average
• Z ≤ -2.0: Extremely low (occurs approximately 2.5% of the time)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ACADEMIC FOUNDATION
This indicator is inspired by / grounded in market microstructure literature (abbreviated citations in-script) from market microstructure literature:
• Price-Volume Relationship - Karpoff (1987), Journal of Financial and Quantitative Analysis, Cambridge
Volume is positively correlated with price change magnitude
• Order Flow Imbalance - Cont, Kukanov, Stoikov (2014), Journal of Financial Econometrics
Order imbalance drives price more reliably than raw volume
• Informed Trading (PIN Model) - Easley, Kiefer, O'Hara, Paperman (1996), Journal of Finance
Buy/Sell imbalance reveals informed trader activity
• Mixture of Distributions - Tauchen & Pitts (1983), Clark (1973)
Volume clusters with volatility regimes
• Volume Predictability - Gervais, Kaniel, Mingelgrin (2001)
Volume shocks predict future returns
• Liquidity & Order Imbalance - Chordia, Roll, Subrahmanyam (2002)
Order imbalance affects short-term returns
• Volume-Return Dynamics - Llorente, Michaely, Saar, Wang (2002)
Speculation vs. risk-sharing patterns
• Reversal vs. Continuation - Campbell, Grossman, Wang (MIT)
High volume predicts lower autocorrelation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
VOLUME ENGINE
The indicator offers two methods for decomposing total volume into Buy and Sell components:
Method 1: Geometry (Approximation)
Uses candle structure to estimate buying and selling pressure:
Buy Volume = Total Volume × (Close - Low) / (High - Low)
Sell Volume = Total Volume × (High - Close) / (High - Low)
• Works on all instruments without additional data requirements
• Fast calculation
• Less precise than intrabar method
Method 2: Intrabar (Precise)
Uses Lower Timeframe (LTF) tick/second data to aggregate actual up-ticks versus down-ticks:
• More accurate volume decomposition
• Requires LTF data availability
• Configurable LTF: 1T (tick), 1S, 15S, 1M
Delta Calculation:
Delta = Buy Volume - Sell Volume
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Z-SCORE SYSTEM
The system calculates Z-Scores for five metrics simultaneously, using a configurable lookback period (default: 20 bars):
• Zp (Price Z-Score): Measures price deviation from its mean
• Zv (Volume Z-Score): Measures total volume deviation
• Zbuy (Buy Volume Z-Score): Measures buying pressure deviation
• Zsell (Sell Volume Z-Score): Measures selling pressure deviation
• ZΔ (Delta Z-Score): Measures order flow imbalance deviation
Threshold Constants:
• ZH (Z High) = 2.0: Extreme threshold
• ZM (Z Medium) = 1.0: Moderate threshold
• Z0 (Z Zero) = 0.5: Near-zero threshold
Group System:
The analysis window is divided into groups (default: 5 groups × 20 bars = 100 bar total window). Group numbers (1, 2, 3...) are displayed above candles when enabled, helping identify the relative age of detected levels.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Z-LINES (SUPPORT/RESISTANCE LEVELS)
When any metric reaches an extreme Z-Score, the system marks that price level as a significant support or resistance zone.
Detection Logic:
• Upper Z-Line: Drawn from the HIGH when Z ≥ upper threshold (default +2.0)
• Lower Z-Line: Drawn from the LOW when Z ≤ lower threshold (default -2.0)
Multi-Metric Detection:
Z-Lines can be triggered by any of the five metrics (Price, Volume, Buy, Sell, Delta). When multiple metrics trigger at similar price levels, they are clustered together into a single combined label showing all contributing metrics.
Persistence:
Z-Lines persist for the entire analysis window (Period × Groups bars) and are NOT removed when price touches them. This allows traders to see historical support/resistance levels that may still be relevant.
Anti-Overlap System:
Labels are automatically repositioned to prevent overlap. The "Label Min Gap (%)" setting controls minimum vertical separation between ALL labels (both upper and lower), ensuring readability even when multiple levels cluster together.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EVENT DETECTION ENGINE (60 SCENARIOS)
The system analyzes 60 distinct market scenarios based on Z-Score combinations. Each scenario is derived from academic research and assigned a confidence score based on signal strength and alignment.
Notation:
• Zp = Price Z-Score
• Zv = Total Volume Z-Score
• Zbuy = Buy Volume Z-Score
• Zsell = Sell Volume Z-Score
• ZΔ = Delta Z-Score
• dirP = Price direction (+1 if Zp > 0.5, -1 if Zp < -0.5, else 0)
• = Previous bar value
• ZH = 2.0 (High threshold)
• ZM = 1.0 (Medium threshold)
• Z0 = 0.5 (Zero threshold)
─────────────────────────────────────────────────────────────
CATEGORY A: PRICE-VOLUME (Events 1-10)
Based on: Karpoff (1987), Tauchen-Pitts (1983), Clark (1973)
─────────────────────────────────────────────────────────────
Event 1: Breakout Confirmed
|Zp| ≥ ZH AND Zv ≥ ZH AND sign(ZΔ) = dirP AND dirP ≠ 0
Direction: Bullish/Bearish (follows price direction)
Event 2: Trend Strength Confirmed
|Zp| ≥ ZH AND Zv ≥ ZH
Direction: Follows price direction
Event 3: Fragile Move
|Zp| ≥ ZH AND Zv ≤ -ZM
Direction: Warning (price move without volume support)
Event 4: Weak Rally
Zp ≥ ZH AND Zv ≤ -ZH
Direction: Warning (price up without volume)
Event 5: Weak Selloff
Zp ≤ -ZH AND Zv ≤ -ZH
Direction: Warning (price down without volume)
Event 6: Momentum Build
ZM ≤ |Zp| < ZH AND Zv ≥ ZH
Direction: Follows price direction
Event 7: Churn
|Zp| ≤ Z0 AND Zv ≥ ZH
Direction: Neutral (high volume, low price movement)
Event 8: Quiet Compression
|Zp| ≤ Z0 AND Zv ≤ -ZH
Direction: Neutral (low volume, low price movement)
Event 9: High Volume Regime
Zv ≥ ZH
Direction: Neutral
Event 10: Low Volume Regime
Zv ≤ -ZH
Direction: Neutral
─────────────────────────────────────────────────────────────
CATEGORY B: ORDER-FLOW / DELTA (Events 11-16)
Based on: Cont, Kukanov, Stoikov (2014), Easley, Kiefer, O'Hara, Paperman (1996)
─────────────────────────────────────────────────────────────
Event 11: Imbalance Drives Price
|ZΔ| ≥ ZH AND sign(ZΔ) = dirP AND dirP ≠ 0
Direction: Follows price direction (dirP), with delta alignment required
Event 12: Divergence Top
Zp ≥ ZH AND ZΔ ≤ -ZH
Direction: Warning (distribution at top)
Event 13: Divergence Bottom
Zp ≤ -ZH AND ZΔ ≥ ZH
Direction: Warning (accumulation at bottom)
Event 14: Absorption Positive
|Zp| ≤ Z0 AND Zv ≥ ZH AND ZΔ ≥ ZH
Direction: Bullish (buy absorption, support forming)
Event 15: Absorption Negative
|Zp| ≤ Z0 AND Zv ≥ ZH AND ZΔ ≤ -ZH
Direction: Bearish (sell absorption, resistance forming)
Event 16: Depth Wall
Zv ≥ ZH AND |ZΔ| ≥ ZH AND |Zp| ≤ Z0
Direction: Neutral (market depth absorbing)
─────────────────────────────────────────────────────────────
CATEGORY C: BUY VS SELL (Events 17-23)
Based on: Easley, Kiefer, O'Hara, Paperman (1996), Chordia, Roll, Subrahmanyam (2002)
─────────────────────────────────────────────────────────────
Event 17: Aggressive Buy Dominance
Zbuy ≥ ZH AND ZΔ ≥ ZH AND Zsell ≤ -ZM
Direction: Bullish
Event 18: Aggressive Sell Dominance
Zsell ≥ ZH AND ZΔ ≤ -ZH AND Zbuy ≤ -ZM
Direction: Bearish
Event 19: Two-Sided Battle
Zbuy ≥ ZH AND Zsell ≥ ZH AND |ZΔ| ≤ Z0
Direction: Neutral (buyers and sellers equally strong)
Event 20: Battle with Buy Edge
Zbuy ≥ ZH AND Zsell ≥ ZH AND ZM ≤ ZΔ < ZH
Direction: Bullish
Event 21: Battle with Sell Edge
Zbuy ≥ ZH AND Zsell ≥ ZH AND -ZH < ZΔ ≤ -ZM
Direction: Bearish
Event 22: Hidden Accumulation
Zbuy ≥ ZH AND |Zp| ≤ Z0 AND Zv ≥ ZH
Direction: Bullish (buy shock without price movement)
Event 23: Hidden Distribution
Zsell ≥ ZH AND |Zp| ≤ Z0 AND Zv ≥ ZH
Direction: Bearish (sell shock without price movement)
─────────────────────────────────────────────────────────────
CATEGORY D: PREDICTABILITY (Events 24-26)
Based on: Gervais, Kaniel, Mingelgrin (2001), Karpoff (1987)
─────────────────────────────────────────────────────────────
Event 24: Volume Shock Positive Drift
Zv ≥ ZH AND |Zp| ≤ ZM
Direction: Follows price direction
Event 25: Volume Shock Negative Drift
Zv ≤ -ZH AND |Zp| ≤ ZM
Direction: Opposite to price direction
Event 26: Abnormal Volume Info Arrival
Zv ≥ ZH
Direction: Neutral
─────────────────────────────────────────────────────────────
CATEGORY E: REVERSAL VS CONTINUATION (Events 27-30)
Based on: Campbell, Grossman, Wang (MIT), Llorente, Michaely, Saar, Wang (2002)
─────────────────────────────────────────────────────────────
Event 27: High Vol Reversal Risk
Zv ≥ ZH
Direction: Warning (high volume implies lower positive autocorrelation)
Event 28: Low Vol Continuation Risk
Zv ≤ -ZH
Direction: Follows price direction (trend likely continues)
Event 29: Speculation Continuation
Zv ≥ ZH AND |ZΔ| ≥ ZM AND sign(ZΔ) = dirP AND dirP ≠ 0
Direction: Follows price direction
Event 30: Risk Sharing Reversal
Zv ≥ ZH AND |ZΔ| ≤ Z0
Direction: Warning (potential reversal)
─────────────────────────────────────────────────────────────
CATEGORY F: IMBALANCE LAG (Events 31-33)
Based on: Chordia, Roll, Subrahmanyam (2002)
─────────────────────────────────────────────────────────────
Event 31: Persistent Imbalance Push
|ZΔ| ≥ ZM AND |ZΔ | ≥ ZM AND sign(ZΔ) = sign(ZΔ )
Direction: Follows delta direction (persistent pressure)
Event 32: Imbalance Pressure Decay
(ZΔ ≥ ZM AND ZΔ ≤ -ZM) OR (ZΔ ≤ -ZM AND ZΔ ≥ ZM)
Direction: Warning (imbalance sign flip)
Event 33: Intraday Imbalance Predicts
|ZΔ| ≥ ZM
Direction: Follows delta direction
─────────────────────────────────────────────────────────────
CATEGORY G: SUPPORT/RESISTANCE (Events 34-36)
Based on: Peskir (Manchester)
─────────────────────────────────────────────────────────────
Event 34: SR Barrier Event
|Zp| ≤ Z0 AND Zv ≥ ZH
Direction: Neutral (price stalls with high volume)
Event 35: Volume Backed SR Level
|Zp| ≤ Z0 AND Zv ≥ ZH AND |ZΔ| ≥ ZM
Direction: Follows delta direction
Event 36: Volume Poor SR Level
|Zp| ≤ Z0 AND Zv ≤ -ZM
Direction: Warning (weak S/R without volume)
─────────────────────────────────────────────────────────────
CATEGORY H: EXTENDED ANALYSIS (Events 37-50)
Based on: Extended market microstructure analysis
─────────────────────────────────────────────────────────────
Event 37: Climax Buy
Zbuy ≥ ZH AND Zp ≥ ZH AND Zv ≥ ZH
Direction: Warning (extreme buying exhaustion, potential top)
Event 38: Climax Sell
Zsell ≥ ZH AND Zp ≤ -ZH AND Zv ≥ ZH
Direction: Warning (extreme selling exhaustion, potential bottom)
Event 39: Stealth Accumulation
Zbuy ≥ ZM AND |Zp| ≤ Z0 AND Zv ≤ Z0
Direction: Bullish (quiet buying)
Event 40: Stealth Distribution
Zsell ≥ ZM AND |Zp| ≤ Z0 AND Zv ≤ Z0
Direction: Bearish (quiet selling)
Event 41: Volume Divergence Bull
Zp ≤ -ZM AND Zv ≤ -ZM
Direction: Bullish (price down but volume declining)
Event 42: Volume Divergence Bear
Zp ≥ ZM AND Zv ≤ -ZM
Direction: Bearish (price up but volume declining)
Event 43: Delta Price Alignment
|Zp| ≥ ZM AND |ZΔ| ≥ ZM AND sign(Zp) = sign(ZΔ)
Direction: Follows price direction (strong trend confirmation)
Event 44: Extreme Compression
|Zp| ≤ Z0 AND Zv ≤ -ZH
Direction: Neutral (very low volatility)
Event 45: Volatility Expansion
|Zp| ≥ ZH AND Zv ≥ ZH
Direction: Follows price direction (breakout from compression)
Event 46: Buy Exhaustion
Zbuy ≥ ZH AND Zp ≤ Z0
Direction: Warning (high buy but price fails)
Event 47: Sell Exhaustion
Zsell ≥ ZH AND Zp ≥ -Z0
Direction: Warning (high sell but price holds)
Event 48: Trend Acceleration
|Zp| ≥ ZM AND |Zp| > |Zp | AND Zv ≥ ZM
Direction: Follows price direction (increasing momentum)
Event 49: Trend Deceleration
|Zp| ≥ ZM AND |Zp| < |Zp | AND sign(Zp) = sign(Zp )
Direction: Warning (decreasing momentum)
Event 50: Multi Divergence
(Zp ≥ ZM AND ZΔ ≤ -ZM) OR (Zp ≤ -ZM AND ZΔ ≥ ZM) + |Zp| ≥ ZM AND Zv ≤ -ZM
Direction: Warning (multiple divergence signals)
─────────────────────────────────────────────────────────────
CATEGORY I: TREND-INTEGRATED (Events 51-60)
Based on: Combined price-volume-delta trend analysis
─────────────────────────────────────────────────────────────
Event 51: Trend Breakout Confirmed
|Zp| ≥ ZH AND Zv ≥ ZH AND |ZΔ| ≥ ZM AND sign(ZΔ) = dirP AND dirP ≠ 0
Direction: Follows price direction
Event 52: Trend Support Test
Zp ≥ ZM AND Z0 ≤ Zp < ZM AND ZΔ ≥ Z0
Direction: Bullish (pullback in uptrend)
Event 53: Trend Resistance Test
Zp ≤ -ZM AND -ZM < Zp ≤ -Z0 AND ZΔ ≤ -Z0
Direction: Bearish (rally in downtrend)
Event 54: Trend Reversal Signal
sign(Zp) ≠ sign(Zp ) AND |Zp| ≥ ZM AND |Zp | ≥ ZM
Direction: Follows new price direction (momentum flip)
Event 55: Channel Absorption
|Zp| ≤ Z0 AND Zv ≥ ZH
Direction: Neutral (range-bound with volume)
Event 56: Trend Continuation Volume
|Zp| ≥ ZM AND Zv ≥ ZM AND sign(ZΔ) = dirP AND dirP ≠ 0
Direction: Follows price direction (healthy trend with volume)
Event 57: Trend Exhaustion
|Zp| ≥ ZM AND Zv ≤ -ZM AND |Zp| < |Zp |
Direction: Warning (trend losing steam)
Event 58: Range Breakout Pending
|Zp| ≤ Z0 AND Zv ≤ -ZH AND |ZΔ| ≥ ZM
Direction: Follows delta direction (compression with imbalance)
Event 59: Trend Quality High
|Zp| ≥ ZM AND sign(ZΔ) = dirP AND Zv ≥ Z0 AND dirP ≠ 0
Direction: Follows price direction (strong aligned signals)
Event 60: Trend Quality Low
|Zp| ≥ ZM AND sign(ZΔ) ≠ dirP AND dirP ≠ 0
Direction: Warning (conflicting signals)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
TREND CHANNEL SYSTEM
The trend channel system is adapted from Smart Trader Episode 03 to provide consistent visual context for price action analysis.
How It Works:
• Divides the chart into blocks based on Z-Score groups
• Calculates OHLC (Open, High, Low, Close) for each block
• Detects Higher Highs/Higher Lows (uptrend) or Lower Highs/Lower Lows (downtrend) patterns
• Draws channel lines connecting block extremes
• Classifies by angle: steep angles indicate trends, flat angles indicate ranges
Channel Classifications:
• UPTREND: Higher highs and higher lows detected
• DOWNTREND: Lower highs and lower lows detected
• RANGE: Channel angle below threshold (default 10 degrees)
Label Information:
• Trend direction (UPTREND/DOWNTREND/RANGE)
• Channel boundary prices
• Distance from current price (absolute and percentage)
• Channel angle in degrees
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DASHBOARD
The dashboard provides a comprehensive real-time view of all Z-Score metrics and detected events.
Dashboard Sections:
1. Header Row
Displays indicator name and current calculation mode (CLOSED or LIVE).
2. Metric Rows (Price, Total Volume, Buy Volume, Sell Volume, Delta)
Each row displays:
• Value: Current metric value
• Z: Calculated Z-Score
• Visual: Graphical Z-bar showing position relative to mean
• Status: Interpretation (Extreme High, Above Avg, Normal, Below Avg, Extreme Low)
• Upper: Oldest active upper Z-Line in window (Label Mirror)
• Lower: Oldest active lower Z-Line in window (Label Mirror)
3. Event Detection Section
• Count of triggered events out of 60 total scenarios
• Market Bias: Bull/Bear/Neutral percentage with visual bar
• Strongest Event: Highest confidence event currently triggered
• #2 Event: Second highest confidence event
4. Footer
Shows engine type (Geometry/Intrabar), Z-Score period, calculation basis, and number of valid bars.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ALERT SYSTEM
The indicator uses native alertcondition() functions, keeping the settings menu clean while providing comprehensive alert options in TradingView's alert dialog.
Available Alert Categories:
• Master Alerts: Any event, Any bullish, Any bearish, Any warning
• Single Event Alerts: Individual alerts for key events (Breakout, Climax, Divergence, etc.)
• Category Alerts: Alerts by event category (Price-Volume, Order-Flow, etc.)
• Confluence Alerts: 2+, 3+, 4+, or 5+ aligned events
• Bias Shift Alerts: 10%, 20%, or 30% shifts in market bias
• High Confidence Alerts: Events with 60%+, 70%+, 80%+, or 90%+ confidence
• Divergence Alerts: Price vs Volume or Price vs Delta divergences
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DATA ACCURACY AND LIMITATIONS
This indicator is 100% VOLUME-BASED and requires Lower Timeframe (LTF) intrabar data for accurate calculations when using the Intrabar method.
Data Accuracy Levels:
• 1T (Tick): Most accurate, real volume distribution per tick
• 1S (1 Second): Reasonably accurate approximation
• 15S (15 Seconds): Good approximation, longer historical data available
• 1M (1 Minute): Rough approximation, maximum historical data range
Backtest and Replay Limitations:
• Replay mode results may differ from live trading due to data availability
• For longer backtest periods, use higher LTF settings (15S or 1M)
• Not all symbols/exchanges support tick-level data
• Crypto and Forex typically have better LTF data availability than stocks
A Note on Data Access:
Higher TradingView plans provide access to more historical intrabar data, which directly impacts the accuracy of volume-based calculations. More precise volume data leads to more reliable calculations.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
LANGUAGE SUPPORT (TRI-LINGUAL UI)
This indicator includes a built-in language switch with three interface languages :
• English (EN)
• Türkçe (TR)
• 한국어 (KO)
The selected language updates key interface text such as the Dashboard headers/rows , tooltips , and the Event Engine outputs (event names, category names, and direction labels). Turkish diacritics and Korean Hangul are supported for clean, native readability.
Why only three languages?
Each additional language requires duplicating strings throughout the code, which increases script size/memory usage and compilation time. To keep the indicator optimized and responsive, language options are intentionally limited to three.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ DISCLAIMER
FOR EDUCATIONAL AND RESEARCH PURPOSES ONLY
This indicator is designed as an educational and research tool based on academic market microstructure literature. It is NOT financial advice and should NOT be used as the sole basis for trading decisions.
Important Notices:
• Past performance does not guarantee future results
• All trading involves risk of substantial loss
• The indicator's signals are statistical probabilities, not certainties
• Always conduct your own research and consult qualified financial advisors
• The creator assumes no responsibility for trading losses
Research Sources:
This indicator is built upon peer-reviewed academic research from:
• Journal of Financial and Quantitative Analysis (Cambridge University Press)
• Journal of Finance
• Journal of Financial Econometrics
• MIT Working Papers
• arXiv Financial Mathematics Indicator

Indicator

Smart Trader, Episode 02, by Ata Sabanci | Battle of Candles ⚠️ CRITICAL: READ BEFORE USING ⚠️
This indicator is 100% VOLUME-BASED and requires Lower Timeframe (LTF) intrabar data for accurate calculations. Please understand the following limitations before using:
📊 DATA ACCURACY LEVELS:
• 1T (Tick) — Most accurate, real volume distribution per tick
• 1S (1 Second) — Reasonably accurate approximation
• 15S (15 Seconds) — Good approximation, longer historical data available
• 1M (1 Minute) — Rough approximation, maximum historical data range
⚠️ BACKTEST & REPLAY LIMITATIONS:
• Replay mode results may differ from live trading due to data availability
• For longer back test periods, use higher LTF settings (15S or 1M)
• Not all symbols/exchanges support tick-level data
• Crypto and Forex typically have better LTF data availability than stocks
💡 A NOTE ON TOOLS:
Successful trading requires proper tools. Higher TradingView plans provide access to more historical intrabar data, which directly impacts the accuracy of volume-based calculations. More precise volume data leads to more reliable signals. Consider this when evaluating your trading infrastructure.
📌 OVERVIEW
Smart Trader Episode 02: Battle of Candles is an advanced educational indicator that combines multiple analysis engines to help traders identify market scenarios and understand market dynamics. This is NOT financial advice or a trading signal service — it's a learning tool designed to help you understand how institutional traders might interpret price action.
The indicator integrates 7 major analysis engines into a unified dashboard, providing real-time insights into volume flow, trend structure, market phases, and potential trade setups.
⚡ KEY FEATURES
🎯 16-Pattern Scenario Engine
Automatically detects and classifies market conditions into 16 distinct scenarios, from strong continuation moves to potential reversals and traps.
💰 Trade Advisor Panel
Aggregates all signals into actionable suggestions with confidence levels, suggested entry/SL/TP levels, and risk/reward calculations.
📊 Volume Engine
Splits volume into buy/sell components using either Geometry (candle shape) or Intrabar (LTF data) methods for precise delta analysis.
📈 CVD (Cumulative Volume Delta)
Tracks the running total of buying vs selling pressure to identify accumulation, distribution, and divergences.
🎯 Stop-Hunt Detection
Identifies potential stop-hunt patterns where price sweeps liquidity levels before reversing.
📐 Pure Structure Trend Engine
Zero-lag trend detection based on swing highs/lows (HH/HL/LH/LL) without any lagging indicators.
⚡ Effort vs Result Analysis
Measures energy spent (volume) versus ground taken (price movement) to detect stalls, breakthroughs, and exhaustion.
🎯 SCENARIO ENGINE — 16 Market Patterns
The Scenario Engine analyzes multiple factors (candle anatomy, volume, forces, CVD, wick analysis) to classify each candle into one of 16 scenarios:
Continuation Scenarios (1-3)
1. ⚔️ STRONG MOVE — Big body candle (>60%) with volume confirming direction. Indicates strong momentum continuation.
2. 🛡️ ABSORPTION — One side attacks but the other absorbs the pressure. Price holds despite volume. Continuation expected in the absorbing side's favor.
3. 📉 PULLBACK — Small move against the trend with low volume. Indicates a healthy retracement before trend continuation.
Reversal Scenarios (4-6, 13-16)
4. 💥 REJECTION — Big wick (>40%) with small body and high volume. Price was rejected
at a level, potential reversal.
5. 🪤 TRAP — Pin direction disagrees with delta. Extreme wick size. Looks bullish/bearish but the opposite may happen.
6. 😫 EXHAUSTION — High energy spent (volume) but low ground taken (price movement). Both sides active but momentum fading.
13. 🔄 CVD BULL DIV — Price falling but CVD rising. Hidden buying detected (accumulation). Potential bullish reversal.
14. 🔄 CVD BEAR DIV — Price rising but CVD falling. Hidden selling detected (distribution). Potential bearish reversal.
15. 🎯 STOP HUNT BULL — Shorts were liquidated below support. Price swept liquidity and reversed. Expect bullish move.
16. 🎯 STOP HUNT BEAR — Longs were liquidated above resistance. Price swept liquidity and reversed. Expect bearish move.
Range/Stalemate Scenarios (7-9)
7. ⚖️ DEADLOCK — Market in balance. Force ratio between 0.4-0.6. Low volume. No side winning.
8. 🔥 BATTLE — High volume fight in a range. Both sides attacking. Wicks on both ends of candle.
9. 🎯 WAITING — Building phase with quiet volume. Market is preparing but no trigger yet. Wait for breakout.
Pre-Breakout Scenarios (10-12)
10. 🚀 BULL SETUP — Buyers accumulating in a building phase. Positive delta building. Bullish pressure growing.
11. 💣 BEAR SETUP — Sellers distributing in a building phase. Negative delta building. Bearish pressure growing.
12. ⚡ BREAKOUT — Price at boundary with strong candle and volume supporting. Imminent breakout expected.
💰 TRADE ADVISOR ENGINE
The Trade Advisor aggregates all signals from the different engines into a single actionable output. It uses a weighted scoring system:
Scoring Weights:
• Scenario Signal: 30%
• Trend Alignment: 20%
• CVD Momentum: 15% + Divergence Bonus
• Pin Forces: 15%
• Liquidity Sweep: 12%
• Stop-Hunt Detection: 10%
• Effort vs Result: 10%
Possible Actions:
• ⏳ WAIT — Edge not strong enough (stay patient)
• 🟢 LONG ENTRY — Buyers have strong advantage + signals align
• 🔴 SHORT ENTRY — Sellers have strong advantage + signals align
• ⚠️ CLOSE LONG/SHORT — Position at risk (reversal/trend flip)
• 🛑 STOP LOSS — Price hit risk threshold
• 💰 TAKE PROFIT — Target threshold reached
📊 EXTENDED INFO PANEL (Detailed Explanations)
The Extended Info panel is hidden by default (toggle: Show Extended Info in settings). It provides detailed metrics that feed into the main engines:
CVD ANALYSIS
What is CVD?
Cumulative Volume Delta (CVD) is the running total of Buy Volume minus Sell Volume. It reveals the underlying buying/selling pressure that may not be visible in price alone.
CVD Value & Slope:
• ↗ Rising: CVD increasing = net buying pressure (bullish)
• ↘ Falling: CVD decreasing = net selling pressure (bearish)
• → Flat: No clear pressure direction
Accumulation vs Distribution:
• Accumulation %: Shows buying pressure strength (0-100). High accumulation with CVD rising = strong bullish bias.
• Distribution %: Shows selling pressure strength (0-100). High distribution with CVD falling = strong bearish bias.
Divergence Alerts:
• ⚠️ BULLISH DIVERGENCE: Price falling but CVD rising. Hidden buying = potential reversal UP.
• ⚠️ BEARISH DIVERGENCE: Price rising but CVD falling. Hidden selling = potential reversal DOWN.
WICK ANALYSIS
Wick Torque:
Torque measures the "rotational force" from wicks. It's calculated from wick length, volume, and body efficiency.
• Positive Torque (Bullish): Bottom wick power dominates. Buyers defended lower prices.
• Negative Torque (Bearish): Top wick power dominates. Sellers defended higher prices.
• ⚡ High Torque (>30): Strong signal, significant wick rejection occurred.
Stop-Hunt Detection:
The engine detects when price has likely swept stop-losses clustered at key levels:
• Stop Hunt Risk %: Likelihood score (0-100). Above 55% = confirmed hunt.
• "Shorts hunted": Price swept below support, liquidating shorts, expect bounce UP.
• "Longs hunted": Price swept above resistance, liquidating longs, expect drop DOWN.
LIQUIDITY SWEEPS
This section appears only when a liquidity sweep is detected. The engine monitors for price sweeping recent highs/lows and then reversing:
• 🎯 LIQUIDITY SWEPT ABOVE: Price broke recent highs but closed back below. Longs trapped, expect DOWN.
• 🎯 LIQUIDITY SWEPT BELOW: Price broke recent lows but closed back above. Shorts trapped, expect UP.
POWER BALANCE
The Power Balance meter shows the real-time strength comparison between buyers and sellers.
Force Ratio:
• 0% = Complete seller dominance
• 50% = Perfect balance
• 100% = Complete buyer dominance
Visual Bar:
• Left side (▓): Bear territory
• Right side (▓): Bull territory
• The bar is smoothed over recent history to reduce noise.
EFFORT vs RESULT
This section measures the efficiency of price movement relative to volume expended.
Energy:
How much volume was spent relative to the average. Energy > 1.0x means above-average volume activity.
Ground:
How much price movement occurred relative to average range. Ground > 1.0x means above-average price movement.
STALL Warning:
A STALL is detected when high energy is spent but low ground is taken (high effort, low result). This often indicates institutional battle, exhaustion, or imminent reversal.
MARKET PHASE
The Phase Engine classifies the current market regime:
RANGE : No clear trend. Price confined to middle of channel. Low ADX. Balanced forces. Trade breakouts with caution.
BUILDING : Compression/preparation phase. Channel tightening or boundary penetration without follow-through. Watch for breakout direction.
TRENDING : Active directional move. Clear slope, good efficiency, price on trending side of channel. Favor pullback entries.
Strength:
0-100% score combining slope, volume validity, and force/efficiency filters.
Bars: How many candles the current phase has persisted.
TRACK RECORD (Validation Panel)
Enable with Show Validation Panel in settings. This section tracks the historical accuracy of scenario predictions:
Accuracy: Percentage of validated predictions that were correct.
Best/Worst Scenario: Shows which scenarios have the highest and lowest accuracy on the current symbol.
Recent Signals: Last 5 predictions with their outcomes. ✓ = correct, ✗ = wrong, ⏳ = pending validation.
⚙️ SETTINGS GUIDE
📊 Volume Analysis
Volume Calculation: Choose Geometry (estimates from candle shape) or Intrabar (precise LTF data).
Intrabar Resolution: LTF for precise mode. Try 1S, 15S, or 1T. Must be lower than chart timeframe.
History Depth: Candles stored in memory (5-50). Higher = more context, slower.
Memory Lookback: Bars for moving averages and Z-scores (10-100).
🏷️ Market Phase
Range Zone Width: How much of channel center is considered "range" (0.1-0.8).
Trend Sensitivity: Minimum slope to detect trending. Lower = more sensitive.
Min Episode Length: Minimum bars before phase can change. Prevents flickering.
🎯 Scenarios
Min Confidence to Show: Only display scenarios above this confidence level (30-90).
Bars to Validate: How many bars to wait before checking if prediction was correct.
Success Move %: Minimum price movement to consider prediction successful.
💰 Trade Advisor
Min Confidence for Entry: Minimum confidence to suggest a trade entry (50-90).
Default Risk %: Stop loss distance as % of price (0.5-5.0).
Min Risk/Reward: Minimum acceptable R:R ratio (1.0-5.0).
🔔 ALERT CONDITIONS
The indicator provides the following alert conditions you can configure:
• 🟢 LONG Entry Signal
• 🔴 SHORT Entry Signal
• ⚠️ Close LONG Signal
• ⚠️ Close SHORT Signal
• 🛑 STOP LOSS Alert
• 💰 Take Profit Alert
• 🚨 High Urgency Signal
⚠️ IMPORTANT DISCLAIMER
EDUCATIONAL TOOL ONLY
This indicator is designed for educational purposes to help users identify different market scenarios and understand how various signals might be interpreted.
The Trade Advisor is NOT a recommendation to buy, sell, or invest.
• Past performance does not guarantee future results
• All trading involves risk of loss
• The creator is not a licensed financial advisor
• Always do your own research (DYOR)
• Consult a qualified financial advisor before making any investment decisions
By using this indicator, you acknowledge that you understand these risks and accept full responsibility for your trading decisions.
Indicator

Smart Candlestick Pattern Filter [MarkitTick]💡 This Script is a sophisticated technical analysis tool designed to identify, grade, and display over 40 distinct candlestick formations based on a proprietary strength and context filtering system. Unlike standard pattern finders that often clutter charts with conflicting signals, this script utilizes a hierarchy logic to display only the most significant pattern detected on any given candle, ensuring chart clarity and actionable data.
● Originality and Utility
The primary utility of this script lies in its filtering engine. Standard indicators often flag every minor Doji or Spinning Top, creating noise. This indicator categorizes patterns into five distinct levels of strength, ranging from simple indecision to very strong reversal or continuation signals.
Furthermore, it incorporates a Trend Context filter, which checks the relationship between price and a Simple Moving Average (SMA). This ensures that reversal patterns (like Hammers) are prioritized during downtrends, while continuation patterns are highlighted during established moves, reducing false positives.
● Methodology
The indicator evaluates price action using specific ratios between the Open, High, Low, and Close, alongside the body size relative to the total range. It assigns a strength score to each detected pattern.
• Pattern Strength Grading
Strength 1 (Indecision): Includes patterns like Doji, Spinning Tops, Dragonfly, and Gravestone Dojis. These signal a pause in momentum.
Strength 2 (Weak): Includes patterns like Hanging Man, Inverted Hammer, Belt Holds, and In-Neck lines. These suggest potential movement but often require confirmation.
Strength 3 (Moderate): Includes classic reversals like Hammers, Shooting Stars, Haramis, Dark Cloud Cover, and Piercing Lines.
Strength 4 (Strong): Includes major signals like Engulfing patterns, Morning/Evening Stars, and Marubozu candles.
Strength 5 (Very Strong): Reserved for rare, high-probability multi-candle formations like Three White Soldiers, Three Black Crows, Rising/Falling Three Methods, and Breakaway gaps.
The script calculates all potential patterns for the current bar and then compares their strength scores. Only the pattern with the highest strength is displayed. If the Show Trend Context option is enabled, the script further validates the pattern against the current market direction (determined by the SMA and slope) before plotting.
● How to Use
Traders can use this tool to identify potential entry and exit points based on the strength of the signal.
• Visual Signals
Patterns are labeled directly on the chart:
Green Labels/Text: Indicate Bullish patterns.
Red Labels/Text: Indicate Bearish patterns.
Gray/White Labels: Indicate Indecision or Weak patterns.
Hovering over any label provides the full name of the pattern and its strength rating (e.g., "Bullish Engulfing - Strength: Strong").
• Trading Logic
High Strength Signals (Levels 4-5): These can be used as primary triggers for trend reversals or strong continuations.
Moderate Signals (Level 3): Useful for adding confluence to existing analysis or anticipating a setup.
Indecision (Level 1): Often useful for taking profits or tightening stop-losses, as they indicate the current trend may be stalling.
● Settings
Show Only Strong Patterns: When enabled, filters out Strength 1, 2, and 3, showing only the most significant signals (Strength >= 4).
Max Patterns to Display: Limits the number of historical labels to prevent chart clutter.
Max Candles to Check Engulfing: Adjusts how far back the script looks to validate the size of an engulfing candle.
Trend Detection Period: Sets the length of the SMA used to determine the background trend context.
Show Only Trend-Appropriate Patterns: If checked, bullish reversals are only shown in downtrends, and bearish reversals in uptrends.
● Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicator

Indicator

HTF Control Shift + Prev Candle Break Sequence 🧭 HTF Control Shift + Previous Candle Break Sequence
Overview
The HTF Control Shift + Previous Candle Break Sequence indicator identifies high-probability shift candles that suggest a potential change in market control — from sellers to buyers or vice versa — and then tracks whether price confirms that shift by breaking the previous candle’s high or low.
This tool is designed to help traders detect institutional control shifts and confirm them with price structure breaks, providing a framework for spotting early trend reversals or strong continuation moves.
How It Works
Control Shift Candle Detection
A Bullish Control Shift occurs when a candle shows:
A long lower wick (≥ Wick % Threshold of total range).
A close near the high (within Body % Threshold of the top).
A Bearish Control Shift occurs when a candle shows:
A long upper wick (≥ Wick % Threshold of total range).
A close near the low (within Body % Threshold of the bottom).
These candles are highlighted in green (bullish) or red (bearish), and optionally labeled on the chart.
Previous Candle High/Low Tracking
The script automatically plots horizontal lines at the previous candle’s high (green) and low (red).
These act as key reference levels for breakout confirmation.
Breakout Confirmation Sequence
A Bullish Sequence triggers when a Bullish Control Shift candle is followed by a break above the previous candle’s high.
A Bearish Sequence triggers when a Bearish Control Shift candle is followed by a break below the previous candle’s low.
When either sequence completes, the indicator can send a TradingView alert confirming the directional breakout.
How to Use
Timeframe:
Optimized for higher timeframes (1H, 4H, Daily) to filter out intraday noise and identify structural market shifts.
Trend Reversal Identification:
Watch for Control Shift candles at major highs/lows, order blocks, or liquidity zones — a confirmed breakout often signals a trend reversal or new directional push.
Continuation Confirmation:
In trending markets, a Control Shift candle that breaks in the direction of trend can validate a strong continuation setup.
Alert Usage:
Set alerts for:
Bullish Control Shift Confirmed Breakout
Bearish Control Shift Confirmed Breakdown
Optional: raw Control Shift or Break alerts.
Customization
Wick % Threshold: Adjusts the required wick size to define a control shift.
Body % Threshold: Controls how close the close must be to the high/low for confirmation.
Label Toggle: Optionally display labels only on control shift candles.
Best Practices
Combine with higher-timeframe trend filters.
Avoid using it alone in tight consolidation zones.
Strongest signals occur when:
Control Shift appears at key structure levels.
The breakout bar closes firmly beyond the previous high/low.
Volume supports the breakout.
Summary
✅ Detects when market control flips (buyers ↔ sellers).
✅ Confirms shift with breakout above/below previous candle.
✅ Ideal for 1H–4H swing or position trading.
✅ Provides visual, structural, and alert-based confirmation. Indicator

3D Candles (Zeiierman)█ Overview
3D Candles (Zeiierman) is a unique 3D take on classic candlesticks, offering a fresh, high-clarity way to visualize price action directly on your chart. Visualizing price in alternative ways can help traders interpret the same data differently and potentially gain a new perspective.
█ How It Works
⚪ 3D Body Construction
For each bar, the script computes the candle body (open/close bounds), then projects a top face offset by a depth amount. The depth is proportional to that candle’s high–low range, so it looks consistent across symbols with different prices/precisions.
rng = math.max(1e-10, high - low ) // candle range
depthMag = rng * depthPct * factorMag // % of range, shaped by tilt amount
depth = depthMag * factorSign // direction from dev (up/down)
depthPct → how “thick” the 3D effect is, as a % of each candle’s own range.
factorMag → scales the effect based on your tilt input (dev), with a smooth curve so small tilts still show.
factorSign → applies the direction of the tilt (up or down).
⚪ Tilt & Perspective
Tilt is controlled by dev and translated into a gentle perspective factor:
slope = (4.0 * math.abs(dev)) / width
factorMag = math.pow(math.min(1.0, slope), 0.5) // sqrt softens response
factorSign = dev == 0 ? 0.0 : math.sign(dev) // direction (up/down)
Larger dev → stronger 3D presence (up to a cap).
The square-root curve makes small dev values noticeable without overdoing it.
█ How to Use
Traders can use 3D Candles just like regular candlesticks. The difference is the 3D visualization, which can broaden your view and help you notice price behavior from a fresh perspective.
⚪ Quick setup (dual-view):
Split your TradingView layout into two synchronized charts.
Right pane: keep your standard candlestick or bar chart for live execution.
Left pane: add 3D Candles (Zeiierman) to compare the same symbol/timeframe.
Observe differences: the 3D rendering can make expansion/contraction and body emphasis easier to spot at a glance.
█ Go Full 3D
Take the experience further by pairing 3D Candles (Zeiierman) with Volume Profile 3D (Zeiierman) , a perfect complement that shows where activity is concentrated, while your 3D candles show how the price unfolded.
█ Settings
Candles — How many 3D candles to draw. Higher values draw more shapes and may impact performance on slower machines.
Block Width (bars) — Visual thickness of each 3D candle along the x-axis. Larger values look chunkier but can overlap more.
Up/Down — Controls the tilt and strength of the 3D top face.
3D depth (% of range) — Thickness of the 3D effect as a percentage of each candle’s own high–low range. Larger values exaggerate the depth.
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
Indicator

Cnagda Pure Price ActionCnagda Pure Price Action (CPPA) indicator is a pure price action-based system designed to provide traders with real-time, dynamic analysis of the market. It automatically identifies key candles, support and resistance zones, and potential buy/sell signals by combining price, volume, and multiple popular trend indicators.
How Price Action & Volume Analysis Works
Silver Zone – Logic, Reason, and Trade Planning
Logic & Visualization:
The Silver Zone is created when the closing price is the lowest in the chosen window and volume is the highest in that window.
Visually, a large silver-colored box/rectangle appears on the chart.
Thick horizontal lines (top and bottom) are drawn at the high and low of that candle/bar, extending to the right.
Reasoning:
This combination typically occurs at strong “accumulation” or support areas:
Sellers push the price down to the lowest point, but aggressive buyers step in with high volume, absorbing supply.
Indicates potential exhaustion of selling and likely shift in market control to buyers.
How to Plan Trades Using Silver Zone:
Watch if price returns to the Silver Zone in the future: It often acts as powerful support.
Bullish entries (buys) can be planned when price tests or slightly pierces this zone, especially if new buy signals occur (like yellow/green candle labels).
Place your stop-loss below the bottom line of the Silver Zone.
Target: Look for the nearest resistance or opposing zone, or use indicator’s bullish label as confirmation.
Extra Tip:
Multiple touches of the Silver Zone reinforce its importance, but if price closes deeply below it with high volume, that’s a caution signal—support may be breaking.
Black Zone – Logic, Reason, and Trade Planning (as CPPA):
Logic & Visualization:
The Black Zone is created when the closing price is the highest in the chosen window and volume is the lowest in that window.
Visually, a large black-colored box/rectangle appears on the chart, along with thick horizontal lines at the top (high) and bottom (low) of the candle, extending to the right.
Reasoning:
This combination signals a strong “distribution” or resistance area:
Buyers push the price up to a local high, but low volume means there is not much follow-through or conviction in the move.
Often marks exhaustion where uptrend may pause or reverse, as sellers can soon step in.
How to Plan Trades Using Black Zone:
If price revisits the Black Zone in the future, it often acts as major resistance.
Bearish entries (sells) are considered when price is near, testing, or slightly above the Black Zone—especially if new sell signals appear (like blue/red candle labels).
Place your stop-loss just above the top line of the Black Zone.
Target: Nearest support zone (such as a Silver Zone) or next indicator’s bearish label.
Extra Tip:
Multiple touches of the Black Zone make it stronger, but if price closes far above with rising volume, be cautious—resistance might be breaking.
Support Line – Logic, Reason, and Trade Planning (as Cppa):
Logic & Visualization:
The Support Line is a dynamically drawn dashed line (usually blue) that marks key price levels where the market has previously shown significant buying interest.
The line is generated whenever a candle forms a high price with high volume (orange logic).
The script checks for historical pivot lows, past support zones, and even higher timeframe (HTF) supports, and then extends a blue dashed line from that price level to the right, labeling it (sometimes as “Prev Support Orange, HTF”).
Reasoning:
This line helps you visually identify where demand has been strong enough to hold price from falling further—essentially a floor in the market used by professional traders.
If price approaches or re-tests this line, there’s a good chance buyers will defend it again.
How to Plan Trades Using Support Line:
Watch for price to approach the Support Line during down moves. If you see a bullish candlestick pattern, buy labels (yellow/green), or other indicators aligning, this can be a high-probability entry zone.
Great for planning stop-loss for long trades: place stops just below this line.
Target: Next resistance zone, Black Zone, or the top of the last swing.
Extra Tip:
Multiple confirmations (support line + Silver Zone + bullish label) provide powerful entry signals.
If price closes strongly below the Support Line with volume, be cautious—support may be breaking, and a trend reversal or deeper correction could follow.
Resistance Line – Logic, Reason, and Trade Planning (from CPPA):
Logic & Visualization:
The Resistance Line is a dynamically drawn dashed line (usually purple or red) that identifies price levels where the market has previously faced significant selling pressure.
This line is created when a candle reaches a high price combined with high volume (orange logic), or from a historical pivot high/resistance,
The script also tracks higher timeframe (HTF) resistance lines, labeled as “Prev Resistance Orange, HTF,” and extends these dashed lines to the right across the chart.
Reasoning:
Resistance Lines are visual markers of “supply zones,” where buyers previously failed, and sellers took control.
If the price returns to this line later, sellers may get active again to defend this level, halting the uptrend.
How to Plan Trades Using Resistance Line:
Watch for price to approach the Resistance Line during up moves. If you see bearish candlestick patterns, sell labels (blue/red), or bearish indicator confirmation, this becomes a strong shorting opportunity.
Perfect for placing stop-loss in short trades—put your stop just above the Resistance Line.
Target: Next support zone (Silver Zone) or bottom of the last swing.
If the price breaks above with high volume, avoid shorting—resistance may be failing.
Extra Tip:
Multiple resistances (Resistance Line + Black Zone + bearish label) make short signals stronger.
Choppy movement around this line often signals indecision; wait for a clear rejection before entering trades.
Bullish / Bearish Label – Logic, Reason, and Trade Planning:
Logic & Visualization:
The indicator constantly calculates a "Bull Score" and a "Bear Score" based on several factors:
Trend direction from price slope
Confirmation by popular indicators (RSI, ADX, SAR, CMF, OBV, CCI, Bollinger Bands, TWAP)
Adaptive scoring (higher score for each bullish/bearish condition met)
If Bull Score > Bear Score, the chart displays a green "BULLISH" label (usually below the bar).
If Bear Score > Bull Score, the chart displays a red "BEARISH" label (usually above the bar).
If neither dominates, a "NEUTRAL" label appears.
Reasoning:
The labels summarize complex price action and indicator analysis into a simple, actionable sentiment cue:
Bullish: Majority of conditions indicate buying strength; trend is up.
Bearish: Majority signals show selling pressure; trend is down.
How to Use in Trade Planning:
Use the Bullish label as confirmation to enter or hold long (buy) positions, especially if near support/Silver Zone.
Use the Bearish label to enter/hold short (sell) positions, especially if near resistance/Black Zone.
For best results, combine with candle color, volume analysis, or other labels (yellow/green for buys, blue/red for sells).
Avoid trading against these labels unless you have strong confluence from zones/support levels.
Yellow Label (Buy Signal) – Logic, Reason & Trade Planning:
Logic & Visualization:
The yellow label appears below a candle (label.style_label_up, yloc.belowbar) and marks a potential buy signal.
Script conditions:
The candle must be a “yellow candle” (which means it’s at the local lowest close, not a high, with normal volume).
Volume is decreasing for 2 consecutive candles (current volume < previous volume, previous volume < second previous).
When these conditions are met, a yellow label is plotted below the candle.
Reasoning:
This scenario often marks the end of selling pressure and start of possible accumulation—buyers may be stepping in as sellers exhaust.
Decreasing volume during a local price low means selling is slowing, possibly hinting at a reversal.
How to Trade Using Yellow Label:
Entry: Consider buying at/just above the yellow-labeled candle’s close.
Stop-loss: A bit below the candle’s low (or Silver Zone line, if present).
Target: Next resistance level, Black Zone, or chart’s bullish label.
Extra Tip:
If the yellow label is found at/near a Silver Zone or Support Line, and trend is “Bullish,” the setup gets even stronger.
Avoid trading if overall indicator shows “Bearish.”
Green Label (Buy with Increasing Volume) – Logic, Reason & Trade Planning:
Logic & Visualization:
The green label is plotted below a candle (label.style_label_up, yloc.belowbar) and marks a strong buy signal.
Script conditions:
The candle must be a “yellow candle” (at the local lowest close, normal volume).
Volume is increasing for 2 consecutive candles (current volume > previous volume, previous volume > second previous).
When these conditions are met, a green label is plotted below the candle.
Reasoning:
This scenario signals that buyers are stepping in aggressively at a local price low—the end of a downtrend with strong, rising activity.
Increasing volume at a price low is a classic sign of accumulation, where institutions or large players may be buying.
How to Trade Using Green Label:
Entry: Consider buying at/just above the green-labeled candle’s close for a momentum-based reversal.
Stop-loss: Slightly below the candle’s low, or the Silver Zone/support line if present.
Target: Nearest resistance zone/Black Zone, indicator’s bullish label, or next swing high.
Extra Tip:
If the green label is near other supports (Silver Zone, Support Line), the setup is extra strong.
Use confirmation from Bullish labels or trend signals for best results.
Green label setups are suitable for quick, high momentum trades due to increasing volume
Blue Label (Sell Signal on Decreasing Volume) – Logic, Reason & Trade Planning:
Logic & Visualization:
The blue label is plotted above a candle (label.style_label_down, yloc.abovebar) as a potential sell signal.
Script conditions:
The candle is a “blue candle” (local highest close, but not also lowest, and volume is neither highest nor lowest).
Volume is decreasing over 2 consecutive candles (current volume < previous, previous < two ago).
When these match, a blue label appears above the candle.
Reasoning:
This typically signals buyer exhaustion at a local high: price has gone up, but volume is dropping, suggesting big players may not be buying any more at these levels.
The trend is losing strength, and a reversal or pullback is likely.
How to Trade Using Blue Label:
Entry: Look to sell at/just below the candle with the blue label.
Stop-loss: Just above the candle’s high (or above the Black Zone/resistance if present).
Target: Nearest support, Silver Zone, or a swing low.
Extra Tip:
Blue label signals are stronger if they appear near Black Zones or Resistance Lines, or when the general market label is "Bearish."
As with buy setups, always check for confirmation from trend or volume before trading aggressively.
Blue Label (Sell Signal on Decreasing Volume) – Logic, Reason & Trade Planning:
Logic & Visualization:
The blue label is plotted above a candle (label.style_label_down, yloc.abovebar) as a potential sell signal.
Script conditions:
The candle is a “blue candle” (local highest close, but not also lowest, and volume is neither highest nor lowest).
Volume is decreasing over 2 consecutive candles (current volume < previous, previous < two ago).
When these match, a blue label appears above the candle.
Reasoning:
This typically signals buyer exhaustion at a local high: price has gone up, but volume is dropping, suggesting big players may not be buying any more at these levels.
The trend is losing strength, and a reversal or pullback is likely.
How to Trade Using Blue Label:
Entry: Look to sell at/just below the candle with the blue label.
Stop-loss: Just above the candle’s high (or above the Black Zone/resistance if present).
Target: Nearest support, Silver Zone, or a swing low.
Extra Tip:
Blue label signals are stronger if they appear near Black Zones or Resistance Lines, or when the general market label is "Bearish."
As with buy setups, always check for confirmation from trend or volume before trading aggressively.
Here’s a summary of all key chart labels, zones, and trading logic of your Price Action script:
Silver Zone: Powerful support zone. Created at lowest close + highest volume. Best for buy entries near its lines.
Black Zone: Strong resistance zone. Created at highest close + lowest volume. Ideal for short trades near its levels.
Support Line: Blue dashed line at historical demand; buyers defend here. Look for bullish setups when price approaches.
Resistance Line: Purple/red dashed line at supply; sellers defend here. Great for bearish setups when price nears.
Bullish/Bearish Labels: Summarize trend direction using price action + multiple indicator confirmations. Plan buys, holds on bullish; sells, shorts on bearish.
Yellow Label: Buy signal on decreasing volume and local price low. Entry above candle, stop below, target next resistance.
Green Label: Strong buy on increasing volume at a price low. Entry for momentum trade, stop below, target next zone.
Blue Label: Sell signal on dropping volume and local price high. Entry below candle, stop above, target next support.
Best Practices:
Always combine zone/label signals for higher probability trades.
Use stop-loss near zones/lines for risk management.
Prefer trading in the trend direction (bullish/bearish label agrees with your entry).
if Any Question, Suggestion Feel free to ask
Disclaimer:
All information provided by this indicator is for educational and analysis purposes only, and should not be considered financial advice. Indicator
