Sweep CISD FVG Key LevelsThis is a chart that marks the hr sweep levels, shows cisd, and multi chart levelsIndicador Pine Script®por redgatamusixb3
Volatility Gated Supertrend [BackQuant]Volatility Gated Supertrend Overview Volatility Gated Supertrend is a regime-aware trend-following indicator built around a modified Supertrend engine with an integrated volatility filter . Unlike a traditional Supertrend, which flips direction whenever price crosses its trailing bands, this version introduces a gating mechanism that can block trend reversals during low-volatility conditions . The purpose of the indicator is simple: Keep the responsiveness and structure of a Supertrend. Reduce false flips during sideways or compressed conditions. Allow trend transitions primarily when volatility is expanding enough to justify participation. The result is a smoother and more selective trend engine designed to suppress whipsaws while still reacting to meaningful directional movement. The full source structure for the indicator can be referenced here: :contentReference {index=0} Core idea Traditional Supertrend indicators work well during directional markets but struggle in compressed environments: Price repeatedly crosses the trailing bands. Trend direction flips too frequently. False reversals appear during chop. This indicator attempts to solve that problem by asking: “Is there enough volatility expansion to justify accepting a new trend?” Instead of blindly allowing every flip, the indicator measures: Current volatility, Baseline volatility, Relative expansion or compression. Only when volatility conditions are sufficient does the trend engine allow a directional transition. What the Supertrend is The Supertrend is a volatility-based trailing trend indicator built from: ATR (Average True Range) A central price source A directional trailing stop structure The classic logic: Upper band = price source + ATR × multiplier Lower band = price source − ATR × multiplier These bands trail price dynamically: In bullish conditions, the lower band ratchets upward. In bearish conditions, the upper band ratchets downward. When price crosses one of the bands: The trend flips direction. This creates a clean directional regime model. How this version differs The major difference is the volatility gate . A normal Supertrend asks: “Did price cross the band?” This indicator asks: “Did price cross the band, and is volatility strong enough to trust the move?” That additional filter dramatically changes behavior in sideways conditions. ATR and volatility structure The indicator uses two ATR measurements: Fast ATR → current short-term volatility Slow ATR → baseline long-term volatility The core ratio: Volatility Ratio = Fast ATR / Slow ATR Interpretation: Ratio above threshold → volatility expansion Ratio below threshold → volatility compression This becomes the gate logic. Volatility Gate Logic The gate opens only when: Fast ATR / Slow ATR ≥ Gate Threshold If volatility is too compressed: The gate closes. Trend flips are blocked. Importantly: The Supertrend bands still calculate normally. Price can still cross them. But the directional state will not update while the gate is closed. This distinction matters because it means: The market may technically trigger a reversal, But the indicator intentionally ignores it if volatility conditions are weak. Why this helps Most trend-following systems fail in chop because: Small meaningless moves trigger directional flips. There is insufficient range expansion. The market lacks trend persistence. By requiring volatility confirmation: Weak reversals are filtered out. Trend state becomes more stable. Noise is reduced. This makes the indicator particularly useful during: Low-volatility consolidations, Mean-reverting conditions, Slow drifting ranges. Band construction The indicator uses: hl2 as the central source, ATR for dynamic width, A configurable multiplier for sensitivity. Formulas: Upper Band = hl2 + ATR × multiplier Lower Band = hl2 − ATR × multiplier The trailing logic prevents the bands from moving backward unnecessarily: Bullish lower band only rises. Bearish upper band only falls. This creates the staircase-style trailing structure common in Supertrend systems. Trend state Trend direction is binary: 1 = bullish -1 = bearish A raw bullish flip occurs when: Close > trailing upper band A raw bearish flip occurs when: Close < trailing lower band However: The trend only updates if the volatility gate is open. This is the defining behavior of the script. Blocked flips One of the most important features is the visualization of blocked signals . When: Price crosses a band, But volatility is insufficient, The script: Plots an X-cross marker, Keeps the existing trend state, Refuses the flip. This gives traders visibility into: Potential but unconfirmed reversals, Areas of weak participation, Fake breakouts or low-energy transitions. Visual behavior Trend band The active trailing band changes color based on trend direction: Bullish → bullish color Bearish → bearish color Gate closed → gated color (dimmed) Trend fill The script fills the space between price and the active band: Bullish fill during bullish regimes Bearish fill during bearish regimes This creates a cleaner directional overlay. Outer glow An additional glow layer expands slightly beyond the trend band: Adds directional emphasis, Improves trend readability, Visually reinforces active regime. When the gate closes: The band and candles dim. This visually communicates: “The trend engine is currently suppressing flips.” Candle coloring Candles can optionally inherit the trend state: Bullish regime → bullish candles Bearish regime → bearish candles Gate closed → dimmed neutral appearance This allows the indicator to function as a full-chart regime overlay. Signal logic Bullish signal Occurs when: Trend flips from bearish to bullish, AND the gate is open. Bearish signal Occurs when: Trend flips from bullish to bearish, AND the gate is open. Blocked signal Occurs when: A raw flip condition appears, BUT volatility ratio is below threshold. This distinction is important: A blocked signal is not ignored information. It is a rejected transition. How to interpret the gate Gate open Volatility is active. Market expansion is sufficient. Trend flips are allowed. Gate closed Market is compressed. Conditions are likely choppy. Trend reversals are suppressed. This effectively turns the indicator into a: Trend-following system during expansion, Trend-holding system during compression. Why ATR ratio works well ATR ratio is a powerful regime detector because it measures: Current volatility relative to normal volatility. Not just: “Is volatility high?” But: “Is volatility high relative to its recent baseline?” This adaptive behavior allows the gate to work across: Different assets, Different timeframes, Different volatility environments. Input guide ATR Multiplier Controls band width: Higher = wider bands, fewer flips Lower = tighter bands, more sensitivity ATR Length Controls volatility calculation for the Supertrend itself. Fast ATR Short-term volatility measure. Slow ATR Long-term baseline volatility measure. Gate Threshold Controls how strict the gate is: Lower threshold = more permissive Higher threshold = more restrictive Example: 0.6 → allows more flips 1.0 → requires current volatility to match baseline 1.2 → requires expansion regime Strengths Reduces Supertrend whipsaws in chop. Adds regime awareness. Uses adaptive volatility filtering. Clean trend visualization. Blocked-signal logic provides extra context. Limitations Can delay reversals during early expansion. Very high thresholds may suppress legitimate transitions. Still fundamentally a trend-following system. Not designed for low-volatility mean reversion trading. Best use case Volatility Gated Supertrend works best as: A directional regime filter, A swing trend overlay, A volatility-aware trend confirmation tool, A way to suppress noise during consolidations. It is particularly useful for traders who: Like Supertrend logic, But dislike how often it flips in sideways markets. Summary Volatility Gated Supertrend extends the classic Supertrend framework by introducing a volatility-aware gating engine that blocks trend reversals during compressed market conditions. By comparing fast ATR against slow ATR, the script determines whether enough volatility expansion exists to justify a directional transition. The result is a cleaner, more stable trend system that retains the strengths of Supertrend logic while dramatically reducing whipsaws during low-energy market regimes.Indicador Pine Script®por BackQuant88 1.3 K
Volatility Hull Ribbon [BackQuant]Volatility Hull Ribbon Overview Volatility Hull Ribbon is a trend-following overlay built from a Hull-style moving average that replaces traditional volume weighting with volatility weighting . Instead of weighting price by traded volume, this indicator weights price by the absolute True Range of each bar, meaning bars with larger range expansion have more influence on the final trend estimate. The goal is to create a smoother but responsive trend line that pays more attention to bars where the market actually moved with force. It then plots this volatility-weighted Hull structure as either a clean line or a ribbon-style band, with gradient fill, candle coloring, and long/short flip markers. At a high level, the indicator does three things: Builds a volatility-weighted moving average using True Range as the weighting source. Applies Hull-style lag reduction to produce a faster trend-following curve. Visualizes trend direction using slope, ribbon fill, candles, and flip signals. Core idea Most moving averages treat each bar equally or weight only by time. That means a quiet candle and a high-range expansion candle can have similar influence depending on the MA type. Volatility Hull Ribbon takes a different approach: Bars with larger True Range are treated as more important. Bars with smaller True Range have less influence. Recent bars are also weighted more heavily than older bars. This creates a trend estimate that responds more strongly when the market expands, while remaining smoother during lower-energy movement. What “volatility-weighted” means here The custom weighting function uses: Price source Absolute True Range A decreasing time weight For each bar inside the lookback: Weighted price contribution = source * abs(True Range ) * recency weight Weight contribution = abs(True Range ) * recency weight Then: Volatility-weighted average = weighted price sum / weighted True Range sum So price movement on wide-range bars matters more than price movement on quiet bars. Why True Range is used True Range captures more than just high-low movement. It accounts for gaps and previous close displacement. This makes it a broader volatility proxy than simple candle range. Using True Range as the weight means the filter gives more importance to bars where: Range expanded, Price displaced aggressively, Volatility increased, Market participation likely intensified. This is useful because strong trend moves often occur during volatility expansion, not during quiet drift. Hull-style construction The indicator then applies a Hull-style transformation to the volatility-weighted average. The structure is: VWHMA = VWMA_TR( 2 * VWMA_TR(src, len / 2) - VWMA_TR(src, len), sqrt(len) ) Where VWMA_TR means the custom True-Range-weighted moving average. This follows the same logic as the classic Hull Moving Average: Use a faster half-length average. Use a slower full-length average. Subtract the lagging component. Smooth the result with sqrt(length). The difference is that every smoothing step is volatility-weighted instead of standard weighted-average based. Why this matters A classic Hull Moving Average is already designed to reduce lag. This version modifies the internal weighting so the curve becomes more sensitive to volatility-backed price movement . That means: Large expansion bars can pull the filter faster. Weak low-range chop has less effect. Trend changes during strong movement can be reflected more clearly. Trend detection Trend direction is based on the slope of the VWHMA: Bullish when VWHMA > VWHMA Bearish when VWHMA < VWHMA This is a simple but effective regime definition: Rising volatility-weighted Hull = bullish trend pressure. Falling volatility-weighted Hull = bearish trend pressure. The script uses this slope state to color: The main line, The ribbon fill, Optional candles, Signal markers. Ribbon mode When “Plot as Band?” is enabled, the script creates a second line: onebar_off = WMA(VWHMA , 10) This is a delayed and smoothed version of the VWHMA. The area between the current VWHMA and this offset line becomes the ribbon. Interpretation: Ribbon expansion shows separation between current trend structure and its delayed reference. Ribbon compression shows trend slowing or flattening. A clean flip in the ribbon often coincides with trend transition. The ribbon is not a volatility band. It is a trend displacement ribbon built from the difference between the current VWHMA and its delayed smoothed version. Gradient fill logic The fill is directional: If VWHMA is above the offset line, fill intensity is stronger near the VWHMA and fades toward the offset. If VWHMA is below the offset line, the gradient reverses. This creates a cleaner visual than a flat fill because it emphasizes the active side of the ribbon. In practice: Strong bright ribbon = trend line leading the delayed reference. Faded/narrow ribbon = weaker separation. Ribbon reversal = trend pressure has shifted. Signal logic Signals are generated when the VWHMA slope changes direction: Long signal: crossover(VWHMA, VWHMA ) Short signal: crossunder(VWHMA, VWHMA ) This means: A long signal prints when the current VWHMA turns upward relative to the previous value. A short signal prints when the current VWHMA turns downward. These are slope-flip signals, not price crossover signals. Important interpretation A signal does not mean “buy blindly” or “sell blindly.” It means the volatility-weighted trend estimate has changed direction. The quality of the signal depends on: Market structure, Higher timeframe trend, Volatility conditions, Whether the ribbon is expanding or compressing. Candle coloring When enabled, candles are painted according to the VWHMA slope: Bullish slope = long color. Bearish slope = short color. This makes the indicator easier to read as a regime overlay. You can quickly see when the market is consistently aligned with the volatility-weighted trend. How to use it 1) Trend filter Use the VWHMA color as a bias filter: Only favor longs when the VWHMA is rising. Only favor shorts when the VWHMA is falling. 2) Trend transition tool Slope flips can identify early trend shifts: Long marker = VWHMA has turned upward. Short marker = VWHMA has turned downward. Because the filter is Hull-style and volatility-weighted, it can react faster than slower trend filters while still suppressing some low-range noise. 3) Ribbon strength reading The ribbon gives additional context: Expanding ribbon = stronger separation and cleaner trend pressure. Contracting ribbon = momentum weakening. Ribbon flattening = chop or transition risk. 4) Pullback structure In strong trends, price often respects the VWHMA or ribbon area: Bull regime: pullbacks into the ribbon can act as support. Bear regime: rallies into the ribbon can act as resistance. 5) Volatility-backed trend confirmation Because large True Range bars influence the calculation more, this tool is useful for identifying whether trend changes are being supported by actual range expansion. If price moves but the VWHMA does not respond strongly, the move may lack volatility-backed confirmation. Input guide Price Source Defines the input series used for the calculation. Close is standard, but hl2, hlc3, or ohlc4 can be used for smoother structural behavior. Lookback Period Controls the smoothing length: Lower values = faster response, more signals, more noise. Higher values = smoother trend, fewer flips, more lag. Plot as Band Enables the ribbon view using the delayed smoothed VWHMA reference. Line Width Controls the main line thickness when not relying heavily on band mode. Show Trend Candles Paints candles by current trend state. Show Signals Toggles the long/short slope-flip markers. Strengths Uses volatility-weighted smoothing instead of equal weighting. Combines volatility sensitivity with Hull-style lag reduction. Clean ribbon visualization for trend displacement. Simple slope-based regime interpretation. Works well as a trend overlay or bias filter. Limitations Slope flips can still whipsaw in sideways markets. Large wick bars can influence the filter strongly because True Range is used as weight. It does not measure volume, despite using a VWMA-style internal function. It is a trend tool, not a complete trading system. Best use case Volatility Hull Ribbon works best when used as a visual trend structure layer: Use color for bias. Use ribbon expansion/compression for strength. Use slope flips for regime transitions. Use price interaction with the ribbon for pullback context. Summary Volatility Hull Ribbon is a Hull-style trend overlay that replaces traditional weighting with True Range weighting, making the moving average more responsive to volatility-backed price movement. It builds a low-lag volatility-weighted Hull curve, compares it to a delayed smoothed reference to form a ribbon, and uses slope changes to define trend direction and signals. The result is a clean, responsive trend ribbon that highlights when volatility-backed trend pressure is rising, fading, or reversing.Indicador Pine Script®por BackQuant314
Measured Move Projection Zones [AGPro Series]Measured Move Projection Zones 🔹 OVERVIEW Measured Move Projection Zones is a premium price-action visualization tool built around one clear sequence: impulse, base, projection, and invalidation. The script detects a qualified impulse leg, waits for a compact base range, then projects a measured-move target band from the base boundary. It also displays invalidation context, event labels, and a compact AGPro panel so the structure can be reviewed quickly on the chart. The default profile is tuned for 1-hour charts, where measured-move structures need enough responsiveness to appear consistently while still avoiding low-quality micro-swings. The result is a clean projection map for traders who want structured continuation context without turning the chart into a dense extension grid. This script is not designed to promise outcomes or mark every possible target. It is designed to make the measured-move workflow easier to see, compare, and audit. 🔹 WHAT MAKES IT DIFFERENT Most projection tools start from a manual anchor, a generic extension grid, or a simple breakout distance. Measured Move Projection Zones is more selective. It requires a directional impulse first. It then waits for a compact base. Only after the base qualifies does it create the projected target band and invalidation framework. That sequence matters because it prevents the chart from becoming a collection of random forward boxes. The visual logic is always tied to a specific price-action chain: Impulse leg -> base range -> projection band -> invalidation context. The script also avoids the look of a traditional support/resistance map. The rectangles are not generic zones. They represent measured-move components: impulse body, base range, projected target band, and invalidation reference. For public TradingView presentation, the script is deliberately visual but controlled: moderated labels, visible structure boxes, no expired-label flood, and a compact panel that summarizes the current state. 🧭 WHY THIS DOES NOT OVERLAP WITH OTHER AGPRO TOOLS This script stays in a narrow measured-move projection lane. It does not overlap with ATR compression or volatility-map scripts because the core logic is not volatility contraction, expansion, or envelope behavior. ATR is only used for normalization, tolerance, and spacing. It does not overlap with breakout-quality tools because it does not score a breakout event as the main product. Breakout beyond the base boundary only changes the measured-move state from armed to active. It does not overlap with premium/discount or valuation-zone tools because it does not map equilibrium, discount, OTE, rebalance pockets, or fair value areas. Its target band is derived from an impulse leg and base boundary, not a valuation model. It does not overlap with wedge, reversal, or pattern-scanner tools because it does not require converging rails, neckline behavior, double tops, double bottoms, head-and-shoulders logic, or multi-pattern classification. It does not overlap with liquidity heatmap, bias dashboard, or volume-profile tools because it does not estimate liquidity fields, higher-timeframe directional bias, POC gravity, acceptance ladders, or volume shelves. The differentiator is simple and specific: this is an impulse-base measured-move projection visualizer with target-band and invalidation context. ⚙️ METHODOLOGY The methodology is built in stages: 1. Swing Confirmation The script uses pivot confirmation to identify meaningful swing points. The default pivot setting is tuned for 1-hour chart rhythm. 2. Impulse Qualification After a valid pivot sequence appears, the script measures the leg size in ATR units. The impulse must be large enough and must form within a reasonable bar window. 3. Base Validation Once the impulse is confirmed, the script waits for a compact base range. The base must stay within a defined ATR height and avoid excessive retracement from the impulse end. 4. Projection Construction When the base qualifies, the script projects a measured-move target band from the base boundary. The default multiplier is 1.00, representing a classic equal measured move. 5. Invalidation Context The opposite side of the base receives an ATR-buffered invalidation guide. This does not create a trade command; it simply marks where the measured-move structure is no longer clean. 6. State Tracking The setup moves through clear states: Waiting, Building Base, Armed, Projecting, Target Band, Invalidated, and Expired. 7. Visual Management The script keeps a moderated amount of historical structure visible. Event labels are capped, expired labels are disabled by default, and the projection guide line is optional to keep the chart clean. 📊 PANEL The AGPro panel is designed for quick structure review. Panel rows include: - State - Direction - Impulse Quality - Projection Progress - Target Distance - Target Band - Base Range - Invalidation The first panel row follows the AGPro public-release standard: one merged blue header row containing only the panel title. Panel location is adjustable. Panel theme is adjustable. Panel font size is adjustable. The default size is Normal for a clean public-chart look. 🎛️ KEY INPUTS 1H Pivot Confirmation Length Controls the swing confirmation used to anchor impulse legs. Lower values are more responsive. Higher values are more selective. 1H Minimum Impulse Size Defines the minimum impulse strength in ATR units. The default is tuned to keep 1-hour charts active without accepting very small swings. 1H Base Range Bars Controls how many bars are used to validate the post-impulse base. The default is shorter for hourly chart pacing. 1H Maximum Base Height Limits how tall the base can be in ATR terms. This prevents wide ranges from being treated as clean measured-move bases. 1H Maximum Base Retracement Controls how deeply price can retrace from the impulse end while still qualifying as a measured-move structure. Measured Move Multiplier Controls the projection distance. The default value of 1.00 represents an equal measured move. 1H Target Band Width Controls the ATR-based visual tolerance around the projected target. Invalidation Buffer Places the invalidation guide beyond the opposite side of the base range. 1H Projection Bars Controls how far the projected target band and base extension reach forward. 1H Projection Expiration Controls how long an armed or active projection can remain open before it expires. 1H Event Label Retention Controls whether the chart keeps a moderated history of event labels or only the latest event label. 1H Balanced Event Labels Caps event labels so the chart remains informative but not overloaded. Show Projection Guide Line Optional dotted guide from the base boundary to the target band. Disabled by default on 1-hour charts to reduce diagonal clutter. 🔍 HOW TO READ IT Waiting No valid impulse-base sequence is active. Building Base An impulse has been detected and the script is watching for a compact base. Armed A valid base has formed. The projection framework is ready, and the target band is mapped forward. Projecting Price has moved beyond the base boundary and the measured-move structure is active. Target Band Price has interacted with the projected target band. Invalidated Price has closed beyond the invalidation guide, meaning the measured-move framework is no longer clean. Expired The projection did not complete within the selected expiration window. Event labels provide a fast visual timeline. The boxes show where the measured structure came from, where the base formed, and where the projected band sits. 🧩 BEST USE CASES This script is best used on 1-hour charts where traders want a clean view of impulse-base-continuation behavior. Strong use cases include: - Measuring continuation structures after a directional leg - Comparing active projections against nearby price action - Reviewing whether a base is compact enough to support a projection - Mapping projected target zones without using a full extension grid - Studying failed measured moves through invalidation labels and zones - Creating cleaner screenshots for price-action review The script can also be used on other timeframes, but the default settings were intentionally tuned around 1-hour structure density and visual balance. 🧠 VISUAL DESIGN PHILOSOPHY The visual design is built around premium restraint. The chart should not look empty, but it also should not look like every candle is receiving a signal. Measured Move Projection Zones keeps the main structural elements visible: - Impulse boxes - Base range boxes - Projected target bands - Invalidation zones or guides - Moderated event labels - Compact AGPro panel Expired labels are disabled by default because they can quickly become noisy on hourly charts. Event labels are still preserved in a moderated amount so the chart has enough visual context. The optional projection guide line is disabled by default because long diagonal lines can dominate a 1-hour screenshot. Users can enable it when they want a more explicit projection path. The goal is a chart that looks structured, premium, and publication-ready while still being easy to read. 🔔 ALERTS The script includes alert conditions for the core lifecycle events: - Measured Move Armed - Projection Active - Target Band Interaction - Projection Invalidated - Projection Expired These alerts are designed around structure states, not trade commands. They help users monitor when a measured-move framework forms, activates, interacts with the projected band, invalidates, or expires. 🔹 LIMITATIONS AND TRANSPARENCY Measured Move Projection Zones is a structural visualization tool. It does not predict future price and does not claim that a projected target band will be reached. Pivot-based swing logic confirms structure after the necessary bars have formed. This creates cleaner anchors, but it also means the script is not trying to label every move in real time before confirmation. The target band is a measured projection derived from the impulse and base, not a certainty zone. Invalidation and expiration states are part of the design because failed measured moves are also useful information. Settings matter. More aggressive inputs will create more structures. More conservative inputs will create fewer, cleaner structures. ✅ IDEAL USER This script is ideal for traders who: - Use 1-hour charts for price-action review - Study impulse-base-continuation behavior - Want measured-move target zones without a cluttered extension grid - Prefer visual structure over heavy signal text - Want a clean AGPro-style panel for quick state review - Care about invalidation and failed projection context - Need a public-chart-friendly tool that looks polished, focused, and easy to understand Measured Move Projection Zones is built for users who want a disciplined projection framework on the chart: enough structure to be useful, enough restraint to stay premium.Indicador Pine Script®por AGProLabsAtualizado 42
1-2-3 Reversal Map [AGPro Series]1-2-3 Reversal Map 🔹 OVERVIEW 1-2-3 Reversal Map is a focused TradingView overlay built for traders who want a clean, structured way to follow one of the most recognizable reversal formations in price action: the confirmed 1-2-3 reversal. This tool maps the full life cycle of a 1-2-3 structure. It identifies the confirmed swing sequence, marks Point 1, Point 2, and Point 3, projects the neckline from Point 2, evaluates the neckline break, and highlights the retest pocket after confirmation. The goal is not to fill the chart with generic reversal signals. The goal is to make the actual 1-2-3 process easier to see, compare, and track. The script is designed around visual clarity. The latest active structure stays readable through numbered swing labels, restrained guide lines, a clearly identified neckline, and a concept-specific retest pocket. The panel then summarizes the current stage, neckline status, retest status, and reversal score in a compact AG Pro layout. 🔹 WHAT MAKES IT DIFFERENT Most reversal tools try to do too many things at once. They mix candle patterns, double tops, double bottoms, head and shoulders structures, failed breakouts, generic support and resistance zones, trend filters, and broad reversal markers into one crowded chart. 1-2-3 Reversal Map takes a more disciplined approach. It stays inside one lane: the confirmed 1-2-3 reversal sequence. The script does not mark every possible turning point. It waits for a defined swing chain: 1. Point 1 establishes the original swing extreme. 2. Point 2 forms the neckline reference. 3. Point 3 confirms that price has created a structurally relevant retracement. 4. The neckline break turns the structure from a setup into a confirmed map. 5. The retest pocket shows where the broken neckline can be evaluated again. This creates a cleaner workflow than broad reversal scanners. Instead of asking the chart to show everything, the script asks one focused question: has a valid 1-2-3 structure progressed from swing formation to neckline break and retest behavior? 🧭 WHY THIS DOES NOT OVERLAP WITH OTHER AGPRO TOOLS This script was intentionally built to avoid overlapping with other AGPro public tools. It is not a broad reversal pattern scanner. It does not combine double top, double bottom, head and shoulders, inverse head and shoulders, wedge, or candle-pattern logic. It focuses only on the 1-2-3 reversal sequence. It is not a Turtle Soup or failed-breakout tool. It does not begin with a failed range break or liquidity sweep. Its starting point is a confirmed three-point swing structure. It is not a wedge reversal tool. It does not evaluate converging trendlines, compression geometry, or wedge breakout behavior. It is not a generic support and resistance map. The rectangle is not a general zone engine. It is a neckline retest pocket that appears only after a valid 1-2-3 neckline break. It is not a breakout dashboard. Breakout logic exists only as one stage inside the 1-2-3 reversal process. This makes the script narrow enough for a differentiated AGPro release while still being visually useful and searchable for traders who specifically look for 1-2-3 reversal structure, neckline break, and retest confirmation workflows. ⚙️ METHODOLOGY The script uses confirmed pivot structure to define each 1-2-3 sequence. For a bullish 1-2-3 structure: - Point 1 is a confirmed swing low. - Point 2 is the recovery swing high and neckline reference. - Point 3 is a higher low that holds above Point 1. - The neckline break requires price to close beyond Point 2 with a configurable ATR buffer. - The retest pocket is projected around the broken neckline after confirmation. For a bearish 1-2-3 structure: - Point 1 is a confirmed swing high. - Point 2 is the reaction swing low and neckline reference. - Point 3 is a lower high that holds below Point 1. - The neckline break requires price to close beyond Point 2 with a configurable ATR buffer. - The retest pocket is projected around the broken neckline after confirmation. The reversal score is structure-native. It evaluates: - P1-P2 leg size relative to ATR - Point 3 hold quality - P3 retracement balance - Timing symmetry between structure legs - Break distance beyond the neckline - Break candle body quality - Close location inside the break candle - Optional volume participation The score is not designed as a prediction model. It is a ranking layer for comparing the quality of structures that meet the script's own rules. 📊 PANEL The AG Pro panel is built to keep the structure status readable without forcing the user to interpret every chart object manually. Panel rows: - Stage: shows whether the structure is waiting, armed, broken, retested, expired, or invalidated. - Neckline Break: shows whether the neckline has been confirmed. - Retest: shows whether the retest pocket is inactive, being watched, or held. - Reversal Score: shows the current 0-100 score and quality grade. The panel uses the AGPro standard format: - One merged blue header row - Only the script name in the first row - Adjustable panel location - Adjustable panel theme - Adjustable panel font size 🎛️ KEY INPUTS Pivot Left Bars / Pivot Right Bars: Controls how mature the swing points must be before the 1-2-3 structure can form. Higher values create fewer and cleaner structures. Lower values make the script more responsive. Minimum P1-P2 Leg ATR: Filters out small structures by requiring a minimum distance between Point 1 and Point 2. Minimum Point 3 Hold ATR: Defines how much Point 3 must hold relative to Point 1. This helps separate valid structural retracements from weak retests of the original extreme. Minimum / Maximum P3 Retracement: Controls the acceptable retracement range for Point 3. This prevents both shallow noise and near-failed structures from being accepted too easily. Neckline Break Buffer ATR: Adds a configurable buffer beyond the neckline before the break is accepted. Retest Pocket Width ATR: Controls the height of the retest pocket around the broken neckline. Retest Pocket Projection Bars: Controls how far the pocket is projected forward. Show Context Tags: Adds compact labels such as Neckline and Retest Pocket so the visual elements are easier to identify. Show Recent Structure Traces: Keeps a small rolling set of recent structure lines and pockets while keeping numbered swing labels focused on the latest active setup. Label Font Size: Controls all chart labels, including swing numbers, context tags, and optional event labels. Panel Font Size: Controls the AG Pro panel text size separately from chart labels. 🔍 HOW TO READ IT Start with the numbered swing labels. Point 1 marks the original structural extreme. Point 2 marks the neckline reference. Point 3 marks the retracement that must hold for the 1-2-3 structure to remain valid. Next, watch the neckline. The neckline is the main confirmation level. Before it breaks, the panel shows the structure as armed or waiting. After it breaks, the structure becomes a confirmed 1-2-3 map. Then watch the retest pocket. The retest pocket appears around the broken neckline after confirmation. This is the script's key context zone. It helps the user observe whether price can return to the neckline area and hold the structure instead of treating every move after the break as equally important. Finally, use the panel score as a quality filter. A high score means the structure has stronger internal balance according to the script's rules. A lower score means the 1-2-3 sequence may still exist, but its structure quality is weaker. 🧩 BEST USE CASES This script is best suited for: - Traders who use classic 1-2-3 reversal logic - Swing traders who want confirmed pivot structure - Price-action traders who track neckline breaks - Traders who prefer breakout-retest workflows - Users who want fewer, clearer chart objects instead of broad reversal scanners - Multi-timeframe chart review where structure clarity matters - Public chart sharing where visual cleanliness is important It can be useful on crypto, forex, indices, equities, and commodities, especially on charts where swing structure and neckline behavior are visually meaningful. 🧠 VISUAL DESIGN PHILOSOPHY The design goal is clarity through restraint. The script avoids a crowded signal-board style. It uses numbered labels only for the current active swing structure. It separates the neckline from the retest pocket with distinct visual language. Recent traces are kept limited and softened so they provide context without dominating the chart. The active neckline is drawn with a stronger accent color. The retest pocket is shown as a clean rectangle around the broken neckline. Structure legs are dotted and restrained, helping the user understand the geometry without overpowering price. The chart should feel premium, readable, and publication-ready. The indicator is built to support a clean TradingView screenshot rather than create visual noise. 🔔 ALERTS The script includes alerts for the main 1-2-3 lifecycle events: - 1-2-3 structure armed - Bullish 1-2-3 neckline break - Bearish 1-2-3 neckline break - 1-2-3 retest pocket held - 1-2-3 structure invalidated These alerts are designed around structure progression, not generic reversal marking. 🔹 LIMITATIONS AND TRANSPARENCY The script uses confirmed pivots, which means swing points appear only after the required right-side confirmation bars. This is intentional. It prioritizes confirmed structure over instant but unstable markings. The script does not attempt to identify every possible reversal pattern. It does not evaluate macro trend, fundamentals, order flow, news, or external liquidity conditions. The reversal score is a structured quality model, not a certainty model. It helps compare 1-2-3 structures inside this script's framework, but it does not forecast outcomes. Retest pockets are contextual areas around the broken neckline. They are not universal support or resistance zones, and they are not designed to replace broader market analysis. ✅ IDEAL USER This script is ideal for traders who: - Understand classic 1-2-3 reversal structure - Prefer confirmed market structure over early noise - Want a clean neckline and retest workflow - Value visual clarity and chart discipline - Use TradingView for structured price-action review - Want a focused public-free AGPro tool that does one concept well 1-2-3 Reversal Map is built for users who want a focused reversal map, not a crowded reversal scanner. 🔹 RELEASE NOTES - Initial public release of 1-2-3 Reversal Map . - Added confirmed Point 1, Point 2, and Point 3 swing mapping. - Added neckline projection with close-based break confirmation. - Added breakout retest pocket around the broken neckline. - Added context tags for Neckline and Retest Pocket. - Added AG Pro panel with Stage, Neckline Break, Retest, and Reversal Score. - Added adjustable panel location, panel theme, label size, and panel font size. - Added recent structure traces with softened historical visuals. - Added alerts for armed structures, neckline breaks, retest holds, and invalidations.Indicador Pine Script®por AGProLabs296
Cup and Handle Quality [AGPro Series]Cup and Handle Quality 🧩 OVERVIEW Cup and Handle Quality is a visual pattern-quality overlay for one of the most recognized continuation structures in technical analysis: the cup and handle. The script is designed to map the full pattern lifecycle instead of only marking a breakout candle. It studies the left cup rim, the cup base, the right rim recovery, the controlled handle pullback, the breakout behavior, and the measured projection context. The goal is to make cup and handle structures easier to recognize, compare, and explain directly on the chart. The final visual output is intentionally clear. The detected cup and handle candle ranges are framed with subtle boxes, while thick curved outlines make the formation readable at a glance. The rim line, target line, DEPTH arrow, and MOVE arrow help users understand how the structure is measured, not just where the label appears. ✅ WHAT MAKES IT DIFFERENT Most public cup and handle tools focus on one of two things: either they draw a simple breakout marker, or they scan aggressively and leave the chart crowded with low-context shapes. Cup and Handle Quality takes a narrower approach. It combines three layers: - Structure recognition: left rim, cup base, right rim, and handle low - Quality scoring: cup symmetry, handle depth, and breakout quality - Visual education: cup box, handle box, thick pattern outline, rim line, target line, and measurement arrows This makes the script more than a pattern detector. It is also a visual explanation tool. The chart shows where the cup was detected, where the handle formed, how deep the cup is, and where the measured projection line comes from. 🧭 WHY THIS DOES NOT OVERLAP WITH OTHER AGPRO TOOLS This script has its own lane inside the AGPro Series. It is not a flag scanner, wedge detector, triangle breakout module, inside-bar breakout tool, Donchian breakout validator, double-top detector, head-and-shoulders detector, generic support-resistance map, or supply-demand zone script. Its lane is specifically: Cup rim recovery -> controlled handle depth -> breakout participation -> measured projection line. The script focuses on the complete cup and handle lifecycle. It does not try to replace broader breakout engines, market-structure tools, support-resistance tools, liquidity tools, or trend dashboards. The defining feature is the combination of a recognizable cup-and-handle drawing with a quality panel that grades the actual pattern components. ⚙️ METHODOLOGY The engine builds the pattern from pivot structure. A qualified setup begins with a left rim, moves into a cup low, recovers into a right rim, and then forms a handle pullback after the right rim. The quality model evaluates: 1. Cup Symmetry The script compares the two rim areas and measures how balanced the cup is over time. A cleaner return from the cup base into the right rim area produces a stronger symmetry reading. 2. Handle Depth The handle is measured as a percentage of cup depth. A useful handle should create structure without pulling so deeply that the cup profile loses strength. The input range allows the user to control how strict or flexible the handle requirement should be. 3. Breakout Quality Breakout quality is calculated from candle behavior and participation context. The script checks distance beyond the rim, candle body efficiency, close location, and relative volume against a configurable baseline. 4. Final Score The final score combines the structure score and breakout behavior into a compact quality reading. Developing setups can be shown before breakout confirmation, while confirmed breakouts require the breakout quality gate. 📊 PANEL The AGPro panel displays the main quality dimensions in a compact format: - Cup Symmetry - Handle Depth - Breakout Quality - Score The first row follows the AGPro standard with a merged blue title row. Panel location, panel theme, panel font size, and label font size are adjustable from settings. 🎛️ KEY INPUTS - Pivot Span controls structural sensitivity. - Minimum Cup Bars defines the shortest accepted cup duration. - Maximum Cup Bars defines the longest accepted cup duration. - Maximum Rim Variance % controls how closely the left and right rims must align. - Minimum Cup Depth ATR filters shallow structures. - Minimum Handle Depth % filters handles that are too shallow. - Maximum Handle Depth % filters handles that are too deep. - Breakout Volume Baseline controls the relative volume comparison. - Minimum Setup Score controls developing setup visibility. - Minimum Breakout Quality controls confirmed breakout strictness. - Minimum Pattern Score controls the final quality gate. - Show Developing Setup controls pre-breakout visualization. - Show Cup Path controls the curved cup drawing and cup candle box. - Show Handle Box controls the detected handle range. - Show Target Line controls the measured projection line. - Show Measurement Arrows controls the DEPTH and MOVE explanation arrows. - Pattern Stroke Width controls the thickness of the cup and handle outlines. - Target Projection Bars controls how far the measured target line extends. 🔍 HOW TO READ IT Start with the rim line. This is the reference level the structure must recover into and eventually move beyond. Then read the cup. The subtle cup box marks the detected candle range, while the thick curved outline helps the formation read visually as a cup instead of a simple V-shaped swing. Next read the handle. The handle box marks the controlled pullback area after the right rim. The curved handle outline makes the handle easier to recognize without turning it into a generic rectangle pattern. The DEPTH arrow shows the measured cup depth. The MOVE arrow transfers that depth upward from the rim area. The TARGET line shows the forward measured projection level. The panel summarizes the same structure numerically. Stronger Cup Symmetry, disciplined Handle Depth, and stronger Breakout Quality combine into the final Score. 🧩 BEST USE CASES Cup and Handle Quality is best used on liquid symbols and timeframes where swing structure has enough room to develop. It is especially useful for users who want a clean visual map of a classic continuation pattern without filling the chart with unrelated pattern families. The default settings are tuned for active discovery. Users who want fewer patterns can raise pivot sensitivity or score thresholds. Users who want a more reactive view can lower the score thresholds, while still using the chart visuals to review pattern quality. 🧠 VISUAL DESIGN PHILOSOPHY The design philosophy is simple: make the pattern understandable without making the chart noisy. The cup and handle are drawn with thick curved lines because this pattern is visual by nature. Newer users should be able to see the shape immediately. At the same time, the candle boxes keep the drawing grounded in the actual detected structure. The target is shown as a line rather than a large zone, keeping the projection clean. The DEPTH and MOVE arrows explain the measurement logic without turning the indicator into a crowded education panel. Labels are compact, and the panel is restrained so the chart remains the main focus. 🔔 ALERTS The script includes an alert condition for confirmed cup and handle breakouts. Alert name: Cup and Handle Quality Breakout Alert message: Cup and Handle Quality : high-quality cup and handle breakout confirmed on {{ticker}} at {{close}}. Alerts are tied to confirmed breakout logic, which means the structure, breakout quality, and pattern score must pass the configured gates. 🔹 LIMITATIONS AND TRANSPARENCY Cup and handle structures are pattern-based and depend on pivot interpretation. Different sensitivity settings can produce different structures on the same chart. Very noisy markets, illiquid symbols, extreme gaps, and unusually compressed price action can reduce pattern readability. Lower thresholds may produce more setups, but visual review remains important when using any chart-pattern tool. The thick cup and handle lines are designed as visual guides. The subtle candle boxes identify the detected structure ranges, while the curved outlines make the pattern easier to understand on the chart. ✅ IDEAL USER This script is built for traders and analysts who want a clean, visual, and structured way to study cup and handle formations. It is especially useful for: - Users who want classic chart patterns with a modern quality layer - Price-action traders who care about structure, handle depth, and breakout behavior - Chart reviewers who want a clear visual explanation of the setup - Newer users who benefit from seeing the cup, handle, depth, move, and target drawn directly on the chart - AGPro users who want a focused cup-and-handle tool that does not overlap with broader breakout or market-structure scriptsIndicador Pine Script®por AGProLabs67
Darvas Box Breakout Quality [AGPro Series]Darvas Box Breakout Quality 🔹 OVERVIEW Darvas Box Breakout Quality is built for one of the most recognizable and widely searched chart-pattern structures in technical analysis: the Darvas Box. The script focuses on the full Darvas lifecycle: Box formation → compression quality → breakout direction → volume support → failed-break behavior. Instead of treating every horizontal range as support and resistance, this script waits for a Darvas-style structure to form, validates the box by age and volatility-adjusted height, then evaluates how price resolves from that box. The result is a clean chart-pattern workflow designed for traders who want to study rectangular compression and breakout quality without turning the chart into a crowded zone map. The main visual element is the active Darvas box itself. By default, resolved boxes are removed after breakout so the chart stays focused on the current live structure instead of filling with old rectangles. 🔹 WHAT MAKES IT DIFFERENT Most box or breakout tools stop at drawing a rectangle or marking the first break beyond a level. Darvas Box Breakout Quality adds structure, scoring, and failure awareness. Core differentiators: • Darvas-first structure logic The rectangle is not a generic support/resistance zone. It comes from a Darvas box formation process built around a fresh seed high, containment, age, and volatility-adjusted box height. • Compression quality The script measures whether the box has enough maturity and controlled range behavior before treating it as a meaningful active structure. • Breakout quality score Every qualified breakout is evaluated with a 0-100 model that includes compression quality, relative volume, breakout distance, candle body participation, and directional close location. • Volume confirmation Breakout labels can require volume support, helping separate stronger participation events from weaker boundary pokes. • Failed-break tracking After breakout, the script watches whether price returns back inside the former box within the selected failure window. If it does, the event is marked as a failed break. • Premium visual restraint The default chart view uses one active box, compact labels, controlled label spacing, and a compact AGPro panel. The goal is to make the chart informative without making it noisy. 🧭 WHY THIS DOES NOT OVERLAP WITH OTHER AGPRO TOOLS This script is intentionally separated from the existing AGPro breakout and chart-pattern family. It is not Inside Bar Breakout Quality, because it does not require a mother bar or inside-bar compression sequence. It is not Donchian Breakout Quality, because it is not based on rolling channel highs and lows. It is not Opening Range Breakout logic, because it is not tied to a session-defined range. It is not Triangle Breakout Quality, because it does not use converging pivot boundaries, apex pressure, or diagonal structure. It is not Breakout Volume Quality, because volume is only one part of the confirmation model, not the entire concept. It is not a supply/demand, order-block, or generic support/resistance zone script. The rectangle exists only when the Darvas box formation process supports it. That distinction matters visually and analytically. On the chart, this script tells a Darvas story: rectangular compression, active box behavior, quality of release, and failed-break review. ⚙️ METHODOLOGY 1. Darvas seed detection The script looks for a fresh high over the selected lookback period. This high becomes the initial reference for a potential Darvas box. 2. Box formation After the seed appears, price must spend enough time contained beneath the upper boundary while the lower boundary develops. The box remains in formation until it meets the selected age and height requirements. 3. Volatility normalization The box height is measured relative to ATR. This helps filter boxes that are too flat to matter or too wide to represent clean compression. 4. Active box state When the box qualifies, the script displays the active Darvas box and optional midpoint. The box projects forward so the active breakout boundary remains visible while price approaches it. 5. Breakout confirmation A bullish breakout requires price to resolve above the Darvas top. A bearish breakout requires price to resolve below the Darvas bottom. Users can require close-based confirmation for stricter filtering. 6. Quality score The breakout score combines: • Compression quality • Relative volume support • ATR-normalized breakout distance • Candle body participation • Directional close location 7. Failed-break monitoring After breakout, the script watches a defined number of bars. If price returns back inside the former Darvas boundary, the failed-break marker is printed. 📊 PANEL The AGPro panel summarizes the current Darvas environment: • Box Age • Compression • Breakout Side • Volume Support • Latest Quality / State The first panel row follows the AGPro publication standard: one merged blue header row containing only the panel title. Panel location, panel theme, and panel font size are adjustable from settings. 🎛️ KEY INPUTS Darvas Box Detection • New High Lookback • Minimum Box Age • Maximum Box Age • ATR Length • Minimum Box Height ATR • Maximum Box Height ATR • Require Close Beyond Box Breakout Quality • Volume MA Length • Volume Support Threshold • Require Volume Support • Target Break Distance ATR • Minimum Breakout Score • Failed Break Window Visual Controls • Show Active Darvas Box • Show Box Midline • Show Breakout Labels • Show Failed Break Markers • Keep Resolved Box • Box Projection Bars • Label Cooldown Bars • Maximum Visible Labels • Label Offset ATR • Label Stack Offset ATR • Label Font Size Panel • Panel Location • Panel Theme • Panel Font Size 🔍 HOW TO READ IT When a Darvas box becomes active, the chart displays the live rectangular structure. The panel shows how old the box is, how compressed it is, and whether the latest environment has breakout direction or volume support. When price resolves outside the box with enough quality, the chart prints a compact breakout label such as UP 79 or DN 75. The number represents the breakout quality score. When price fails to hold outside the box and returns back inside during the selected failure window, the script prints a compact failed-break marker such as FAIL UP or FAIL DN. The best readings come when the box is visually clear, compression is meaningful, and the breakout candle has both directional close quality and volume support. 🧩 BEST USE CASES • Classic Darvas box formations • Rectangular range compression • Box breakout quality review • Volume-backed breakout confirmation • Failed-break review after a box release • Clean chart-pattern study • Multi-timeframe Darvas structure observation • Screenshot-friendly public chart analysis 🧠 VISUAL DESIGN PHILOSOPHY Darvas Box Breakout Quality is designed to look premium through restraint. The script avoids filling the chart with old boxes by default. It keeps the active Darvas box as the main visual layer, uses short event labels, adds cooldown and stack spacing to reduce overlap, and keeps the panel compact. This makes the indicator easier to publish, easier to read, and easier to use across different symbols and timeframes. 🔔 ALERTS The script includes alert conditions for: • High-quality bullish Darvas breakout • High-quality bearish Darvas breakout • Failed bullish Darvas breakout • Failed bearish Darvas breakout These alerts follow the same structure-aware logic used by the chart labels. 🔹 LIMITATIONS AND TRANSPARENCY Darvas box detection is structure-based and depends on the selected lookback, age, and ATR filters. Changing those settings can make the script more selective or more active. Volume support depends on the quality of the symbol's volume feed. On instruments where volume is less informative, users may prefer to adjust the volume threshold or disable the volume requirement. The score is a structured description of breakout quality according to the script's internal model. It is designed to help compare Darvas box releases by quality, not to replace the user's broader market context. ✅ IDEAL USER This script is designed for traders who want a focused Darvas box tool with cleaner structure detection, breakout quality scoring, volume confirmation, failed-break awareness, and a premium chart layout. It is best suited for users who want the Darvas box itself to remain the main story on the chart.Indicador Pine Script®por AGProLabsAtualizado 66
Heikin Ashi Trend Zones [AGPro Series]Heikin Ashi Trend Zones Heikin Ashi Trend Zones is a clean overlay built for traders who like the smoothing behavior of Heikin Ashi but still want to keep the original market candles visible. Instead of repainting the chart with synthetic candles, the script reads the internal Heikin Ashi state in the background and converts it into a focused trend-state layer. The engine follows four core ideas: 1. Internal HA Side The script calculates the active Heikin Ashi side from synthetic HA open and close values, then filters weak neutral bodies so the state does not flip on every small candle. 2. HA Streak Quality The panel tracks how long the current HA side has been active. This helps separate early state changes from mature continuation phases. 3. Optional Transition Zones When the HA side changes with enough body strength, wick cleanliness, close location, ATR pressure, and prior-state maturity, the script can project a compact rectangular transition zone. This layer is disabled by default so the public chart view stays clean, but it remains available for traders who want to inspect HA changeover corridors. 4. Continuation Quality Once a HA streak matures, the script scores continuation quality using body strength, wick cleanliness, close location, smoothed HA slope, streak depth, and ATR context. Labels appear only when the continuation score is strong enough and the cooldown rules allow a clean chart presentation. What makes this script different - It does not replace real candles with Heikin Ashi candles. - It does not behave like a generic trend-following dashboard. - It focuses on HA state transitions, HA streak maturity, and continuation quality. - Optional transition boxes are concept-native HA corridors, not broad horizontal support/resistance zones. - Label density is capped with cooldown and maximum visible label controls. - The panel exposes HA side, streak, transition quality, continuation quality, and ATR context in a compact AGPro layout. Visual design The overlay stays restrained: - A slim trend-state ribbon follows the smoothed HA path. - Optional transition zones can extend forward as compact rectangles when enabled. - Continuation labels are offset from candles with ATR spacing. - Panel location, panel theme, panel font size, and label font size are adjustable. Suggested usage Use the script to study whether Heikin Ashi structure is shifting, stabilizing, or continuing while the original candles remain visible. The strongest reads usually come from alignment between a clean HA side, a growing streak, strong continuation quality, and an ATR context that supports the current state. Default settings are tuned for a balanced public chart view with a clean ribbon and selective continuation labels. Faster traders can reduce smoothing and cooldown values. Swing traders can enable transition zones, increase transition projection, and require higher continuation quality for fewer labels.Indicador Pine Script®por AGProLabs378
Flag Continuation Zones [AGPro Series]🔷 Flag Continuation Zones Flag Continuation Zones is a premium bull flag and bear flag continuation engine designed to identify clean continuation structures without turning the chart into a generic breakout scanner. The script focuses on a classic, highly recognizable price-action sequence: impulse pole → controlled flag compression → qualified breakout → forward continuation zone Instead of marking every small consolidation as a flag, the engine validates the structure through pole strength, travel efficiency, flag depth, channel compression, trend alignment, breakout distance, and optional volume participation. 🔷 What Makes This Different Most flag indicators are visually simple but structurally loose. They often label shallow pauses, random pullbacks, or broad ranges as flags. Flag Continuation Zones takes a stricter route. It first requires a validated impulse pole. The move must be large enough relative to ATR and efficient enough to show directional commitment. After that, the script waits for a controlled counter-trend flag window. The flag must remain compact, avoid excessive retracement, and preserve continuation structure before any breakout is accepted. This creates a chart experience that is more selective, cleaner, and easier to trust visually. 🔷 How The Engine Works The script evaluates four core stages: 1. Pole Validation The prior impulse is measured by ATR multiple and path efficiency. This helps separate real directional movement from noisy grinding price action. 2. Flag Compression After the pole, the script studies the consolidation window. A valid flag must remain inside an acceptable depth and range relative to the pole. 3. Breakout Confirmation A continuation event is accepted only when price clears the flag boundary with an ATR buffer and, when available, enough volume participation. 4. Continuation Mapping Accepted structures create a forward rectangular zone, an impulse pole line, a breakout label, and an optional measured-move projection line. 🔷 Visual Design The visual language is intentionally restrained: - clean bull and bear flag labels - rectangular continuation zones - impulse pole reference lines - optional measured-move target line - trend EMA context - compact AG Pro status panel - adjustable panel location - dark and light panel themes - adjustable label and panel font sizes The goal is to make the pattern visible and premium without crowding the chart. 🔷 How This Is Different From Other AGPro Tools This script is not a generic Trend Continuation Quality tool. It is not an abstract continuation scorecard. It is specifically built around the flag pattern family: - impulse pole quality - flag channel compression - breakout through the flag boundary - measured-move continuation context It also avoids overlapping with triangle, consolidation breakout, Donchian breakout, inside-bar breakout, and trendline tools by staying focused on the pole-and-flag structure itself. 🔷 Best Fit This script is useful for traders who want to scan for cleaner bull flag and bear flag continuation patterns across crypto, forex, stocks, indices, and futures. It is especially suitable for: - continuation traders - breakout traders who want stricter structure - price-action traders who follow classic chart patterns - users who prefer rectangular zones and measured-move context - traders who want fewer but higher-quality labels 🔷 Key Inputs Important controls include: - Pole Lookback - Flag Window - Minimum Flag Bars - Minimum Pole ATR Multiple - Minimum Pole Efficiency - Maximum Flag Depth - Maximum Flag Range - Breakout Buffer - Volume Confirmation - Signal Cooldown - Zone Forward Bars - Label Font Size - Panel Location - Panel Theme - Panel Font Size 🔷 In One Sentence Flag Continuation Zones turns the classic bull flag and bear flag pattern into a cleaner, scored, zone-based continuation map built for premium public chart presentation. Indicador Pine Script®por AGProLabsAtualizado 2216
Wedge Reversal Detector [AGPro Series]Wedge Reversal Detector 🔷 Overview Wedge Reversal Detector is a focused chart-pattern engine built for one specific structure: the rising wedge and falling wedge. Instead of scanning every possible reversal pattern, drawing broad support and resistance, or behaving like a generic breakout dashboard, this script studies the geometry of a wedge itself: confirmed pivot boundaries, slope convergence, pattern maturity, reversal break quality, projected reaction zone, and invalidation context. The goal is to make wedge analysis cleaner and more objective on a live chart. A valid wedge is not treated as just two random trendlines. The script requires a confirmed pivot structure, a meaningful initial width, a narrowing final width, and the correct slope relationship for either a rising wedge or a falling wedge. Once a qualified structure is active, it draws the converging boundaries directly on the chart and waits for a reversal-side break. The detector also includes two visual preparation layers. The developing-wedge preview layer can draw dashed boundaries before the structure is fully armed. The Wedge Radar layer keeps the latest compression window visible when no confirmed candidate is active. Radar projection is capped so higher-timeframe charts stay clean, and low-compression radar states can remain boundary-only until the structure becomes visually meaningful. Break labels, reaction zones, and invalidation guides remain reserved for stricter confirmed candidates. This keeps the chart visually informative without weakening the actual confirmation logic. The visual layer includes compact boundary tags that label the upper and lower rails directly on the right side of the structure. These tags are designed as chart annotations, not signal spam: they identify whether the rail is acting as a rejection rail, compression rail, reclaim rail, break rail, or invalidation rail. A single optional compression tag can also summarize the current radar or wedge state. 🔶 Why This Is Different Many wedge indicators stop at pattern drawing. Others become broad pattern scanners that mix wedges with channels, double tops, double bottoms, triangles, support and resistance zones, and unrelated reversal signals. Wedge Reversal Detector intentionally stays narrower. Its edge is the sequence: 1. Detect a qualified rising or falling wedge from confirmed pivots. 2. Measure whether the boundaries are genuinely converging. 3. Grade wedge maturity before any break occurs. 4. Confirm the reversal-side break with an optional close-based rule and ATR buffer. 5. Score break quality using maturity, boundary expansion, candle structure, close location, and volume participation. 6. Project a concept-native reaction zone from the wedge width. 7. Display a clean invalidation guide so the structure remains readable after the break. This makes the script a wedge lifecycle tool, not a general reversal scanner. 💎 Unique Edge The most important difference is that the script treats a wedge as a living geometric compression structure. It does not simply connect the latest two highs and lows and call the pattern complete. A candidate must pass span, width, convergence, and slope requirements before it becomes active. For rising wedges, the script looks for rising pivot highs and rising pivot lows where the lower boundary is climbing faster than the upper boundary. This creates upward compression, which is the core geometry behind a rising wedge. For falling wedges, it looks for falling pivot highs and falling pivot lows where the upper boundary is falling faster than the lower boundary. This creates downward compression, which is the core geometry behind a falling wedge. That difference matters because many weak wedge tools confuse ordinary channels with wedge compression. This script separates those structures by requiring the final width to be materially smaller than the starting width. 🔹 Methodology The engine begins with confirmed pivot highs and pivot lows. The user controls the pivot confirmation length, which allows the detector to be tuned for intraday, swing, or higher-timeframe charts. From the latest confirmed swing pair, the script builds two boundary lines: - Upper boundary from confirmed pivot highs - Lower boundary from confirmed pivot lows The detector then evaluates: - Pattern span in bars - Initial boundary width measured against ATR - Final boundary width relative to the starting width - Upper boundary slope - Lower boundary slope - Correct rising-wedge or falling-wedge geometry Only when those requirements align does the pattern become an active wedge. 🔸 Break Quality Model A wedge break is scored only after the reversal-side boundary is broken. The break quality score is built from multiple factors: - Wedge maturity - Distance beyond the broken boundary - Candle body participation - Close location inside the break candle - Volume ratio versus recent average volume The score is translated into a simple grade so the chart stays easy to read. This does not claim that a break must continue. It gives the user a structured read of how strong the confirmed break appears under the script's own rules. 🎯 Projected Reaction Zone After a confirmed wedge reversal break, the script projects a reaction zone using the initial wedge width. This zone is not a generic support/resistance box. It is tied directly to the wedge geometry and appears only after the structure confirms. The goal is to show the next area where price may naturally react after escaping the compression. The zone width and projection length are configurable, so users can keep the chart compact or allow more forward context depending on timeframe and style. 🧭 Invalidation Context The script also draws an invalidation guide after a confirmed break. For a bullish falling-wedge break, invalidation is tracked below the opposite wedge boundary with an ATR buffer. For a bearish rising-wedge break, invalidation is tracked above the opposite wedge boundary with an ATR buffer. This keeps the post-break structure organized without adding trade instructions or turning the script into a strategy. 📊 Panel The compact AGPro panel summarizes the current wedge lifecycle: - Wedge Type - Maturity - Break Quality - Target Zone Panel location, panel theme, and panel font size are adjustable from settings. The first panel row uses the AGPro standard: one merged blue header row containing only the panel title. ⚙️ Key Settings - Pivot Confirmation Length controls how strict the swing structure is. - Minimum Wedge Span filters out tiny patterns. - Maximum Final Width Ratio controls how much convergence is required. - Developing Wedge Preview Ratio controls how early dashed formation boundaries can appear. - Wedge Radar controls the latest-window visual radar that prevents panel-only charts while waiting for confirmed wedge geometry. - Radar Projection Bars limits how far radar boundaries extend into future bars. - Radar Fill Threshold keeps low-compression radar structures from creating oversized filled areas. - Boundary Tags add compact right-side rail annotations so the structure is easier to read without covering candles. - Compression Tag shows one status label for radar compression or armed-wedge maturity. - Boundary Break Buffer ATR adds confirmation distance beyond the wedge boundary. - Volume Confirmation Ratio contributes to break quality scoring. - Projection Length Bars controls how long the reaction zone extends forward. - Label Font Size and Label Offset ATR help maintain a clean chart presentation. 🧩 How It Differs From Other AGPro Tools This script is intentionally separate from AGPro channel, breakout, liquidity, and broad reversal tools. It is not a channel map. Channel tools organize parallel or multi-family structure. Wedge Reversal Detector only studies converging wedge geometry. It is not a double top or double bottom detector. Those patterns are based on repeated horizontal rejection and neckline behavior. This script is based on converging diagonal boundaries. It is not a broad reversal scanner. It does not combine every reversal pattern into one dashboard. It stays focused on wedge compression, wedge maturity, reversal break, projected reaction zone, and invalidation. It is not a generic breakout quality tool. Break quality is evaluated only after a valid rising or falling wedge exists. 🔔 Alerts The script includes alerts for: - Bullish falling wedge break - Bearish rising wedge break - High quality wedge break - Wedge invalidation These alerts are event notifications for the detected structure, not automated trading instructions. ✨ Best Use Case Wedge Reversal Detector is best suited for traders who already watch chart patterns, market structure, compression, and failed trend continuation. It helps reduce manual drawing by highlighting qualified wedge structures, then keeping the chart organized through the confirmation, projection, and invalidation phases. The result is a clean, premium, wedge-specific workflow designed for public chart reading: fewer random lines, fewer noisy labels, and a clearer view of whether the wedge structure is still forming, breaking, projecting, or invalidating. Indicador Pine Script®por AGProLabs139
Triangle Breakout Quality [AGPro Series]Triangle Breakout Quality 🔺 OVERVIEW Triangle Breakout Quality is built for one of the most searched and visually recognizable chart structures in technical analysis: the triangle breakout. The script automatically detects triangle candidates from confirmed pivot highs and pivot lows, projects the upper and lower converging boundaries, measures how much the structure has compressed, locates the projected apex, and grades the quality of the eventual breakout. After the release, it monitors the first return toward the broken triangle boundary so the user can see whether price accepted the breakout or quickly lost structural quality. The goal is not to mark every small consolidation or every trendline touch. The goal is to isolate the full triangle sequence: Formation -> compression -> apex pressure -> boundary release -> first retest state. That full lifecycle is what gives the tool its own identity. A triangle is not just a range, not just a single diagonal line, and not just a breakout candle. It is a narrowing structure where both sides of price are being compressed into a decision point. This script is designed around that idea from the ground up. 🔹 WHAT MAKES IT DIFFERENT Most triangle tools stop at drawing two lines. Most breakout tools stop at the first candle outside a boundary. Triangle Breakout Quality does more by turning the structure into a scored, state-aware workflow. Core differentiators: • Dual-boundary validation The script requires both an upper pivot boundary and a lower pivot boundary. The two lines must converge. This prevents the logic from acting like a generic trendline-break detector. • Compression measurement The engine compares the opening width of the triangle with the current width. A pattern must show meaningful narrowing before it can qualify. • Apex pressure logic The script projects where the upper and lower boundaries intersect and evaluates whether the current structure is close enough to that decision zone to matter. • Breakout quality score Every displayed breakout receives a 0-100 score based on compression, apex pressure, breakout distance, candle body participation, close quality, and optional volume expansion. • Retest state After a breakout, the script watches the first return toward the broken triangle boundary. A held retest and a failed retest are visually different states, not the same event. • Premium visual restraint The chart shows active triangle lines, controlled breakout labels, optional retest labels, subtle candle tint, and a compact AGPro panel. Label density is capped so the layout stays clean for live use and publication screenshots. 🧭 WHY THIS DOES NOT OVERLAP WITH OTHER AGPRO TOOLS This script is intentionally separated from the existing AGPro breakout and structure family. It is not Break-Retest Quality, because it does not begin with a horizontal pivot break and then grade the first retest of that static level. Triangle Breakout Quality first requires a valid converging triangle structure. It is not Failed Break Quality, because it is not centered on false breaks and reclaim behavior. It tracks the primary breakout from a valid triangle and then monitors the first boundary retest. It is not Consolidation Breakout Quality, because the reference structure is not a horizontal range. A triangle must have two projected pivot boundaries that move toward each other. It is not Donchian Breakout Quality, because it is not based on period highs and lows or channel escape logic. It is not ATR Envelope Breakout Quality, because it does not use a volatility envelope as the breakout shell. It is not Auto Trendline Break Quality, because it does not score isolated trendline breaks. The event only matters when the upper and lower lines together form a valid triangle compression structure. That distinction matters visually and analytically. On the chart, this script tells a triangle story: converging boundaries, apex pressure, breakout quality, and retest state. It belongs in the chart-pattern lane, not the generic breakout lane. ⚙️ METHODOLOGY 1. Pivot anchors The script uses confirmed pivot highs and pivot lows to define the latest upper and lower triangle boundaries. This keeps the structure rules transparent and reproducible. 2. Convergence filter The upper boundary and lower boundary must move toward each other. The current width of the pattern must be smaller than the starting width, and the compression percentage must meet the selected threshold. 3. Width and maturity filters The pattern must be old enough to represent a real structure, but not so old that it becomes stale. The starting width and current width are also normalized by ATR so the same logic can adapt across symbols and timeframes. 4. Apex projection The script calculates where the two projected boundaries intersect. This creates the apex pressure layer, which helps separate mature triangle compression from loose diagonal movement. 5. Breakout confirmation A bullish breakout requires price to close beyond the projected upper boundary by an ATR-normalized buffer. A bearish breakout requires price to close beyond the projected lower boundary by the same type of buffer. 6. Quality score The breakout score combines: • Compression quality • Apex pressure • Breakout distance beyond the boundary • Candle body participation • Close position inside the breakout candle • Optional volume participation The result is displayed as a compact grade and score so the chart remains readable. 7. Retest state After a breakout, the script projects the broken triangle boundary forward internally and evaluates an ATR-scaled retest tolerance around it. If price revisits that boundary area and holds the correct side, the retest is marked as held. If price loses the boundary, the retest state is marked as failed. 📊 PANEL The AGPro panel summarizes the current structure and latest event: • Pattern Age • Compression • Apex Pressure • Breakout Side • Retest Quality • Current State Panel location, theme, and font size are adjustable. The first row follows the AGPro publication standard: one merged blue header row containing only the panel title. 🎛️ KEY INPUTS Triangle Structure • Pivot Length • Minimum Pattern Age • Maximum Pattern Age • Minimum Compression % • Minimum Starting Width ATR • Maximum Current Width ATR • Maximum Forward Apex Bars Breakout Quality • ATR Length • Volume Average Length • Use Volume Participation • Volume Full-Score Ratio • Minimum Break Distance ATR • High Quality Threshold • Minimum Label Score • Visual Cooldown Bars Retest State • Retest Minimum Bars • Retest Window Bars • Retest Tolerance ATR Visual Controls • Show Triangle Lines • Show Breakout Labels • Show Retest Labels • Tint Breakout Candles • Label Offset ATR • Label Font Size • Maximum Visible Events Panel • Show Panel • Panel Position • Panel Theme • Panel Font Size 🔍 HOW TO READ IT When a valid triangle is forming, the chart displays the converging upper and lower boundaries. The panel reports apex pressure and compression so the projected decision area is visible without adding extra rectangles to the chart. Compression shows how much the pattern has tightened relative to its opening width. When price closes beyond a valid boundary, the script prints a compact breakout label with a quality grade and score. A higher score means the breakout candle carried stronger structural qualities according to the script's rules. After the breakout, retest labels and the panel show whether the first return toward the broken triangle boundary held or failed. A held retest suggests cleaner acceptance of the breakout boundary. A failed retest suggests the release lost quality. Use the tool as a structured chart-reading layer. It is designed to help users compare triangle breakouts by quality, not to replace broader context such as trend, liquidity, session behavior, or personal execution rules. 🧩 BEST USE CASES • Symmetrical triangle compression • Ascending triangle pressure • Descending triangle pressure • Breakout candle quality review • First retest monitoring after triangle release • Screenshot-friendly pattern study • Multi-symbol scanning for cleaner chart-pattern candidates 🔹 LIMITATIONS AND TRANSPARENCY Triangle detection is based on confirmed pivots, so the final anchor points appear only after the selected pivot length has elapsed. This is standard pivot behavior and keeps the structure rules visible. The live triangle can change while new pivots form. Breakout and retest labels are event-based and are designed to remain stable after confirmation. Volume participation is optional because volume quality varies across markets and feeds. On instruments where volume is less informative, the volume component can be disabled. The score is a structured description of the triangle release according to the script's internal model. It should be read as context, not as an execution command. Indicador Pine Script®por AGProLabs37
Cumulative Volume DeltaPlots the cumulative volume delta based on lower timeframe data to approximate buying vs. selling pressure. The indicator aggregates volume imbalances over a chosen anchor period and displays them as a continuous line. Positive slope → buying pressure Negative slope → selling pressure Includes optional lower timeframe precision for more accurate delta estimation.Indicador Pine Script®por pluckyMagpie5848811140
Head & Shoulders Auto Detector [AGPro Series]Head & Shoulders Auto Detector 🎯 **Overview** Head & Shoulders Auto Detector is a precision pattern recognition tool that automatically identifies classic Head & Shoulders (bearish) and Inverse Head & Shoulders (bullish) reversal formations across any market and timeframe. Built from the ground up for traders who want the full lifecycle of a pattern tracked on-chart — not just a label and a line, but forming → confirmation → target/stop outcome — with a transparent, quality-scored framework that filters low-probability setups before they clutter the chart. Every pattern carries a composite quality score, a symmetry percentage, an ATR-adaptive neckline, two projection targets, and a live status label that evolves through the pattern's lifespan. 🔹 **Unique Edge** Most H&S indicators stop at detection. This one goes further: • **Full lifecycle state machine** — every pattern moves through four explicit states (Forming → Confirmed → Target Hit / Stopped / Invalidated / Expired), and the visuals update in real time at each transition. • **Dead pattern hygiene** — once a pattern fails or hits target, orphan TP and stop lines are removed, the neckline freezes at the decision bar, and the status label grays out. The chart never accumulates stale clutter. • **Quality-driven visual hierarchy** — high-quality patterns (Q≥75) are rendered with a star marker and full saturation, mid-tier patterns get standard treatment, and low-tier patterns (Q<60) fade into the background so the trader's eye is guided to what matters. • **Dual-target projection with R:R** — every confirmation displays both a classic measured-move TP1 and an extended 1.618× TP2, each labeled with the exact reward-to-risk ratio calculated at entry. • **ATR-adaptive everything** — shoulder tolerance, neckline flatness, head prominence, stop buffer, and label offsets all scale with volatility, so the same settings work across BTC 4H, gold daily, or small-cap stocks. 🔹 **Methodology** Patterns are detected from confirmed pivot highs and lows using a configurable pivot length. For a valid Head & Shoulders, three same-side pivots (Left Shoulder → Head → Right Shoulder) must satisfy: • Head extends beyond both shoulders by at least the configured ATR multiple (prominence test). • Shoulder heights differ by less than the shoulder tolerance in ATR units (symmetry test). • Two opposite-side pivots between LS-Head and Head-RS define the neckline; their vertical distance must be within the neckline tolerance. • Composite symmetry score (50% time symmetry, 50% price symmetry) must exceed the minimum threshold. Quality score combines four weighted components: • Symmetry (45%) — time + price balance between shoulders • Neckline flatness (25%) — how horizontal the neckline is • Volume profile (15%) — head-bar volume relative to shoulder average • Head prominence (15%) — how clearly the head dominates Confirmation triggers when price closes beyond the neckline level (interpolated for sloped necklines). Stop is placed at the head level plus an ATR buffer to avoid wick stop-outs. TP1 uses the standard head-to-neckline measured move; TP2 extends to 1.618× that projection. 🔹 **Signals & Alerts** Four alert events available: • **Pattern Forming** — a valid H&S or Inverse H&S structure has been detected but not yet confirmed. • **Pattern Confirmed** — close has broken the neckline; entry is live with TP/Stop drawn. • **Target Hit** — TP1 has been reached on a confirmed pattern. • **Neckline Retest** — after confirmation, price has returned to touch the neckline (common high-probability re-entry zone). 🔹 **Key Inputs** • **Pivot Length** — controls swing-point sensitivity • **Min Symmetry Score** — minimum shoulder symmetry percentage to accept a pattern (default 60, balanced) • **Neckline Tolerance (ATR)** — how sloped a neckline is allowed to be • **Shoulder Height Tolerance (ATR)** — how different the two shoulders can be • **Head Prominence (ATR)** — minimum head extension beyond shoulders • **Volume Soft Confirmation** — toggle volume influence on quality score • **TP1 Method** — Classic (horizontal neckline reference) or Measured Move (slope-aware) • **Stop Buffer (ATR)** — extra room beyond the head level (default 0.35) • **Max Pattern Lifetime** — bars after which an unconfirmed pattern expires • Full visual controls: font size, panel position, theme, zone display, label offset, color palette 🔹 **How to Use** 1. Apply the indicator to any liquid market and timeframe. 4H and higher tend to produce the most reliable formations; intraday works but expects more noise. 2. Watch for patterns labeled with a ⭐ and bright color (Q≥75) — these are the highest-confidence setups. 3. Wait for the ✓ Confirmed status to appear before entering; the ⚡ breakout marker pinpoints the exact confirmation bar. 4. Use the TP1 / TP2 R:R labels to size the trade. Stop is pre-calculated at head level + ATR buffer. 5. Monitor the panel stats over time to understand the indicator's behavior on your specific market — Win Rate, Avg Quality, and Last Signal all update live. 6. Consider combining with trend context (a bearish H&S is far more powerful at resistance in a downtrend than in the middle of a strong uptrend). 🔹 **Limitations & Transparency** • Pattern detection uses confirmed pivots, so signals appear with a natural delay equal to the Pivot Length setting. This is intrinsic to pivot-based logic, not a flaw. • Quality score and historical win rate are chart-native calculations based on the loaded history; they are descriptive, not predictive. • The script does not include multi-timeframe confluence or trend filters — these are deliberate design choices to keep the tool focused and composable with other indicators. • Volume confirmation is a soft scoring input, not a hard filter, since many crypto pairs and indices have volume data of variable reliability. • Pattern state transitions use close-based confirmation; intrabar wicks do not trigger state changes except for stop/target hits, which are high/low based as expected. 🔹 **Risk Disclosure** This indicator is an analytical tool, not a trading recommendation or financial advice. Pattern recognition describes what has formed on a chart; it does not predict future price movement with certainty. Always use proper risk management, position sizing, and confirm signals with your own analysis. Past pattern statistics shown on the panel are descriptive of the visible history and do not guarantee future performance. Trading involves substantial risk of loss.Indicador Pine Script®por AGProLabsAtualizado 51
Double Top / Bottom Quality [AGPro Series]Double Top / Bottom Quality Double Top / Bottom Quality is a disciplined, rules-based detector for the two most iconic reversal chart patterns: the Double Top (M-shape) and the Double Bottom (W-shape). Unlike basic pattern finders that fire on any two similar swings, this indicator scores every candidate pattern on a transparent 0–100 Quality Score across four independent factors — and only confirms patterns that pass a user-defined minimum. The result is a cleaner chart with fewer, higher-conviction setups. Every confirmed pattern delivers a full trading lifecycle: a neckline flip S/R zone (resistance → support on a Double Bottom; support → resistance on a Double Top) and a measured-move target projection band. Pending, confirmed, target-hit and invalidated states are all tracked with disciplined cleanup, so the chart never becomes cluttered. 🔹 WHAT THE INDICATOR DOES It detects classic Double Top and Double Bottom reversal structures using pivot-based swing analysis with ATR-normalised equality, depth and time-window filters. Each valid candidate is then scored on four independent quality factors. Only candidates that exceed the user-defined minimum score and break the neckline on close are confirmed. Once confirmed, the pattern draws its neckline flip zone and target projection band, labels the setup with its letter grade and score, and tracks the outcome until target hit or invalidation. 🔹 UNIQUE EDGE — WHY IT IS DIFFERENT Most Double Top / Double Bottom scripts simply connect two similar swings and draw a line. This indicator adds a transparent 4-component Quality Score so every setup is rated before confirmation, not just flagged. Three factors that most scripts ignore are treated as first-class inputs here: • Pattern Symmetry — the left leg and the right leg of the M / W must be comparable in time, or the pattern is penalised • Break Volume Confirmation — the neckline break bar is compared to its rolling volume average, and thin breaks score lower • Depth Quality — shallow, flat patterns are filtered out in favour of deep, decisive reversals The full lifecycle visualisation (pending → confirmed → target hit) and same-region deduplication are also uncommon in this pattern category, and together they produce a chart that reads cleanly even on long history. 🔹 METHODOLOGY • Pivot detection via ta.pivothigh / ta.pivotlow with user-configurable length • Equality check: the two peaks (or troughs) must be within a configurable ATR tolerance • Time-window filter: minimum and maximum bars allowed between the two pivots • Depth filter: the vertical distance from peaks to neckline must exceed a minimum ATR threshold • Neckline: lowest low between the two peaks for a Double Top, or highest high between the two troughs for a Double Bottom • Confirmation trigger: daily close beyond the neckline • Invalidation: price exceeds the pattern extreme before the neckline break • Cooldown: after confirmation, new patterns in the same price region are suppressed for N bars to prevent clustering 🔹 QUALITY SCORE (0–100) Each confirmed pattern receives a transparent score based on four equally-weighted factors (25 points each): 1. Peak / Trough Equality — how close the two extremes are to each other, measured in ATR units 2. Break Volume Confirmation — break-bar volume relative to the 20-bar average 3. Pattern Symmetry — ratio of the shorter leg to the longer leg (time-based) 4. Depth Quality — pattern height relative to ATR (deeper = higher score) Score → Grade mapping: • 85–100 = A • 70–84 = B • 55–69 = C • <55 = D 🔹 SIGNALS, ZONES & ALERTS Once a pattern confirms, the indicator renders: • A solid neckline that extends to the right edge • A neckline flip zone (rectangular S/R band at the neckline level) • A target projection zone at the measured-move price (pattern height projected from neckline) • A grade label (A / B / C) and numeric score on the pattern Two alert types are available: "Confirmed Pattern" fires on confirmation, and "Target Hit" fires when the measured-move target is reached. 🔹 KEY INPUTS • Pivot Length, ATR Length • Peak / Trough Equality tolerance (ATR) • Min / Max bars between peaks • Minimum Pattern Depth (ATR) • Break Volume Multiplier • Cooldown bars • Minimum Quality Score filter • Show Pending Patterns toggle • Show Neckline Flip Zone / Target Zone toggles • Zone Width (ATR) • Stale Cleanup Distance, Max Active Zones • Label size, Panel position / theme / size • Alert toggles 🔹 HOW TO USE • Choose a liquid market and a timeframe that matches your trading style (4H and 1D are particularly well-suited to classic reversal patterns) • Watch for Pending patterns (dashed lines) — these mark candidates awaiting a neckline break • A Confirmed pattern with grade B or higher is the typical entry signal; aggressive traders may use C-grade while conservative traders may filter to A-grade only • Use the neckline flip zone as a logical stop-loss reference (above it for Double Tops, below for Double Bottoms) • Use the target projection zone as a take-profit reference based on the classical measured-move rule • Combine with higher-timeframe trend, volume profile or an independent confluence tool for best results 🔹 LIMITATIONS & TRANSPARENCY • Pivot-based detection means patterns confirm with a natural lag equal to the pivot length • No strategy is 100% reliable — Quality Score filters improve average conviction but do not guarantee outcomes • Very low-liquidity markets may produce unstable pivots; a longer pivot length helps • Measured-move targets are a classical reference, not a prediction • Historical statistics shown in the panel are pattern-completion counts on the loaded chart; they are not a guaranteed forward performance estimate 🔹 RISK DISCLOSURE This script is provided for educational and analytical purposes only. It is not financial advice and does not constitute a recommendation to buy, sell or hold any asset. Trading involves substantial risk of loss; past pattern performance is not indicative of future results. Always perform your own research and use appropriate risk management. Open-source under the Mozilla Public License 2.0 — contributions and feedback are welcome.Indicador Pine Script®por AGProLabsAtualizado 75
Smooths HTF Mini ChartOverview The Smooths HTF Mini Chart is a technical utility designed for traders who require constant high-timeframe (HTF) context without sacrificing screen real estate or deal with the "drifting" issues associated with standard drawing objects. By leveraging the Pine Script Table API, this script creates a live candlestick "monitor" that is anchored to the UI layer of the chart, ensuring it stays perfectly positioned in the corner regardless of how a user drags or scales the primary price action. The Technical Concept (Why it is Original) Most HTF indicators overlay candles directly onto the main price chart. This presents two problems: They clutter the primary timeframe's candles. They are tied to bar indexes; when a user scrolls back in time, the HTF context disappears off-screen. This script solves this by utilizing Unicode String Rendering. Instead of using box.new or line.new (which are anchored to the time/price axis), this indicator maps price data into a vertical string of characters (█ and ┆) and renders them inside a table.cell. Because tables are part of the chart's fixed UI layer (the "Glass Layer"), the monitor functions like a native dashboard widget that never moves. Calculations & Underlying Logic Data Aggregation: The script uses request.security to pull OHLC data from the user-defined HTF. Dynamic Normalization: Since the widget has a fixed vertical height (Resolution), the script dynamically normalizes the HTF price range within the array to fit the vertical space of the table cell. Monospace Alignment: By forcing a font.family_monospace, the script ensures that the "wicks" and "bodies" of the Unicode candles stay mathematically centered and symmetrical. Usefulness for Traders Scalping Context: A 1-minute trader can monitor the 15-minute or 1-hour trend without switching tabs or cluttering their workspace. Persistent Visibility: Essential for traders who zoom in and out frequently; the HTF trend is always visible in the top-right corner. Customizable UI: Users can adjust the "Vertical Resolution" to change the widget's height and toggle "Horizontal Spacing" to fit their specific screen layout. Instructions for Use HTF Timeframe: Choose the timeframe you wish to monitor. Vertical Resolution: Increase for more detail in the candles, decrease for a more compact widget. Position: Use the inputs to move the widget to any of the four corners of your screen.Indicador Pine Script®por CaptainSmooth16
AG Pro Structure Labels [AGPro Series]AG Pro HH HL LH LL Structure Labels Overview / What it does AG Pro HH HL LH LL Structure Labels is a clean market-structure reader built to simplify price action without turning the chart into a wall of signals. Its core purpose is straightforward: identify confirmed swing highs and swing lows, classify them as HH, HL, LH, or LL, and connect those points in a visually readable structure path so traders can understand the current sequence of price development at a glance. Many market structure tools try to do too much at once. They mix structure, signals, zones, pattern scoring, and trade suggestions into a single publication, which can make the chart heavier and the analytical purpose less clear. This script takes the opposite route. It focuses on one job only: making confirmed swing structure easier to read, follow, and interpret in real time as the chart evolves. That design choice is what gives this script its value. Instead of asking the user to interpret disconnected highs and lows manually, the script builds a visible structure chain from confirmed pivots and labels each important step. The result is a chart that remains visually disciplined while still communicating trend continuation, structural weakening, and flow transitions in a simple and repeatable format. This script is especially useful for traders who want structure clarity before they bring in any other layer of analysis. It can be used as a standalone structure map, or as a first-pass chart-cleaning tool before applying other concepts such as support and resistance, trend continuation logic, pullback analysis, breakout validation, or discretionary execution rules. Unique Edge The unique edge of this script is not that it attempts to predict where price will go next. Its strength is that it organizes confirmed structure in a way that is visually clean, logically consistent, and immediately usable on live charts. Unlike many AG Pro scripts that are built around event detection, confluence scoring, price-zone visualization, setup quality filtering, or breakout logic, this publication is intentionally narrower and more focused. It is not a BOS/CHoCH event detector. It is not a liquidity-sweep model. It is not an order-block or fair-value-gap engine. It is not a breakout-quality, retest-quality, or pattern-quality scorer. It is also not a fixed reference-level tool such as a prior-day or prior-week high/low mapper. This script is a structure readability tool first and foremost. That distinction matters. Previous AG Pro releases often revolve around a specific trading event: a sweep, a break, a retest, a zone reaction, a continuation pattern, or a multi-factor confluence state. This script does not begin from an event. It begins from the swing chain itself. It asks a simpler question: what is the current sequence of confirmed highs and lows, and what does that sequence imply about market flow right now? Because of that, the script fills a different role in the broader AG Pro library. It is closer to a structural map than a setup engine. It helps answer whether the chart is still printing constructive highs and lows, whether the sequence has started to weaken, or whether the structure is now leaning in the opposite direction. That makes it useful both on its own and as a foundation layer beneath other tools. Another important differentiator is presentation discipline. The structure path provides continuity between pivots, while the label set communicates classification without unnecessary chart clutter. The compact floating HUD reinforces the current flow state without dominating screen space. Together, these choices make the script visually premium while keeping the chart readable. Methodology The script uses a confirmed pivot framework. Swing highs and swing lows are identified using left and right lookback parameters selected by the user. Because pivots require confirmation, labels appear only after the structure point is confirmed by the specified number of bars. This helps reduce noise and keeps the structure map grounded in confirmed rather than speculative swing points. Once a new pivot high is confirmed, it is compared with the prior confirmed pivot high. If it exceeds the previous confirmed high, it is classified as HH. If it does not, it is classified as LH. The same logic applies on the low side: if a confirmed pivot low is above or equal to the previous confirmed pivot low, it is classified as HL; if it is lower, it is classified as LL. The script also includes an ATR-based structure filter. This filter is designed to suppress micro-swings that are too small relative to current volatility, which helps maintain visual cleanliness on choppier charts. Instead of drawing every minor fluctuation, the script attempts to keep attention on swings that are more structurally meaningful for the selected sensitivity. A structure path, shown as a clean zigzag line, connects the confirmed pivots that pass the filter. This gives the user an immediate visual map of the sequence rather than a collection of isolated labels. In practice, this is one of the most useful parts of the script because it turns the market’s swing progression into a readable path. The floating HUD summarizes the current market-flow bias in a minimalist format. It is not intended to act as a trade signal. Its job is to provide a quick structural read so the user can see whether the recent chain is leaning bullish, bearish, or transitional according to the internal swing logic. Signals & Alerts This script is not designed as a one-click entry engine. Its alerts are structural, not predictive. The publication includes alerts for newly confirmed HH, HL, LH, and LL prints, which can help users monitor structure development without staring at the chart continuously. It also includes alerts for structure-flow transitions when the internal trend state turns bullish or bearish. These alerts are best understood as workflow alerts. They tell the user that structure has progressed into a new confirmed condition. They do not guarantee continuation, reversal, breakout success, or trade profitability. Their purpose is to improve awareness of structural change, not to replace independent analysis. Key Inputs Pivot sensitivity is controlled through left and right lookback values. Higher values usually produce fewer but more mature structure points, while lower values usually produce a faster and denser structure map. The ATR filter can be enabled to reduce insignificant swings. This can be particularly helpful on lower timeframes or during periods of uneven, noisy price movement. Users can also control whether the structure path is drawn and can adjust the visual typography for labels and HUD elements. These inputs allow the script to stay visually flexible across different chart styles and screen densities. How this script differs from other AG Pro scripts This distinction is central to the publication. Many AG Pro scripts are built to evaluate the quality of a setup. They may score breakouts, retests, continuation patterns, reversal candles, pressure conditions, or confluence states. Others are built around zones and reactions, such as supply-demand mapping, premium-discount logic, fair value gaps, order blocks, or support-resistance behavior. Others focus on structural events such as BOS/CHoCH changes, liquidity sweeps, inducement traps, or session-specific reactions. This script does none of those things. It does not measure the quality of a signal. It does not score a setup. It does not project targets. It does not identify fixed daily or weekly reference levels. It does not try to map every institutional concept on the chart. It does not attempt to be an all-in-one decision engine. Instead, it provides a cleaner foundation: confirmed HH, HL, LH, and LL sequencing with a filtered structural path and a compact market-flow summary. That is precisely why it is different from the previous AG Pro script as well. If the previous release was anchored to fixed price levels, event detection, or context-specific reactions, this script is anchored to swing continuity. If another AG Pro script answers where price reacted, where a sweep occurred, whether a breakout was strong, or whether a setup deserves a quality score, this one answers a more basic but highly important question: what is the confirmed structure chain doing right now? In that sense, this script is less about trading events and more about structural readability. Limitations & Transparency This script uses confirmed pivots, which means it is not attempting to label unconfirmed structure in advance. As a result, there is an intentional delay equal to the confirmation logic chosen by the user. That delay is not a flaw; it is part of the design tradeoff required to avoid premature structure labels. Like any pivot-based structure tool, output will vary depending on sensitivity settings, timeframe, market volatility, and symbol behavior. A lower sensitivity may reveal more swing detail but can also make the map denser. A higher sensitivity may create a cleaner structure path but may respond more slowly to local shifts. The ATR filter is a visual-cleanliness tool, not a universal truth engine. It can help reduce noise, but different traders may prefer different levels of structural compression depending on how aggressively or conservatively they define meaningful swings. This script should also not be interpreted as a complete trading plan. It does not include position sizing, stop placement, target selection, execution logic, or market-specific risk rules. Users should combine it with their own framework, testing process, and judgment. Risk Disclosure This script is for analytical and educational use. It is not financial advice, investment advice, or a recommendation to buy or sell any instrument. Market structure is an interpretive framework, not a guarantee of future price behavior. A bullish sequence can fail, a bearish sequence can reverse, and a clean structural print can still occur inside a broader context that changes the meaning of the move. Always use independent judgment, apply appropriate risk management, and evaluate the script in the context of your own market, timeframe, and process. Summary AG Pro HH HL LH LL Structure Labels is built for traders who value structural clarity over indicator overload. Its role in the AG Pro catalog is distinct: it is not an event hunter, not a zone engine, and not a quality scorer. It is a clean structure reader designed to make confirmed swing progression easier to see, easier to follow, and easier to integrate into a disciplined chart workflow. If your goal is to understand whether price is still producing constructive highs and lows, whether that chain is weakening, or whether the flow has shifted into a different structural condition, this script is designed for exactly that task. Indicador Pine Script®por AGProLabsAtualizado 44274
Trading Sessions Suite [BackQuant]Trading Sessions Suite Overview Trading Sessions Suite is a full intraday structure framework built around market sessions, kill zones, and session-specific order flow . It transforms the trading day into a sequence of structured regimes, allowing you to track how liquidity, volatility, and positioning evolve across Asia, London, and New York. Instead of treating price as a continuous stream, this indicator segments the market into time-based auction phases , each with its own: Range (high and low) VWAP (fair value) Open (reference anchor) Equilibrium (midpoint) Momentum (session oscillator) It also overlays kill zones , highlighting the exact windows where volatility and participation tend to expand. Example of kill zones in action: Example combining RSI-style oscillator + VWAP structure: This tool is designed for traders who want to understand how intraday structure builds, shifts, and resolves . --- Core Philosophy Markets are not random throughout the day. Liquidity, volatility, and institutional participation are time-dependent . Each session has distinct characteristics: Asia → accumulation, compression, range-building London → expansion, breakout, liquidity grabs New York → continuation, distribution, reversal potential Rather than using static indicators, this script builds a dynamic framework tied to these time regimes . --- Session Engine The indicator tracks three primary sessions: Asia Session London Session New York Session Each session is defined by a configurable time window and processed as an independent structure. Internally, each session maintains a full state: Session high and low Session open Rolling VWAP Start index (session start) Drawn objects (box, lines, labels) Oscillator data (if enabled) This allows each session to behave like a self-contained market environment . --- Session Boxes (Auction Structure) Each session is visualized as a box: Top = session high Bottom = session low Width = duration of the session This gives you an immediate view of: Range expansion vs compression Relative volatility between sessions Where price is positioned within each session Interpretation: Tight box → compression, buildup Wide box → expansion, active participation Overlapping boxes → consolidation across sessions --- Session VWAP (Fair Value per Session) Each session has its own VWAP: VWAP = volume-weighted average price within that session only This is critical because: VWAP resets every session Reflects session-specific positioning Acts as a dynamic equilibrium level Interpretation: Price above VWAP → bullish control for that session Price below VWAP → bearish control Reversion to VWAP → mean reversion inside session Unlike standard VWAP, this gives you multiple fair value anchors per day . --- Session Open & Midline (Key References) Each session also tracks: Open Line → where the session started Midline → (high + low) / 2 These act as: Bias indicators (above/below open) Equilibrium zones (midline) Reaction levels Typical behavior: Holding above open → trend continuation Crossing midline → shift in control Rejecting midline → continuation signal --- Range Extension (Forward Liquidity Levels) When a session closes, its high and low can be extended forward. These extensions act as: Future support/resistance Liquidity targets Breakout validation zones Mechanically: High and low are projected into the next session Remain until replaced or invalidated Interpretation: Next session often trades toward previous session extremes Breaks of prior session range = regime shift --- Kill Zones (High-Probability Windows) Kill zones are specific time windows inside sessions where: Liquidity spikes Volatility expands Institutional activity increases Included zones: Asia Kill Zone London Open Kill Zone New York Open Kill Zone New York Close Kill Zone They are visualized as shaded boxes separate from session boxes. Why they matter: Most breakouts occur during kill zones Most reversals are initiated during kill zones Liquidity sweeps cluster around these times From the example: You can see how price reacts specifically within these windows. --- Session Oscillator (Embedded Momentum Engine) Each session optionally includes its own oscillator plotted directly below the session box. This is not a standard indicator overlay. It is: Bound to the session range Scaled relative to that session Reset each session Core mechanics: Uses RSI-style calculation Signal line = moving average of oscillator Stored per bar within the session Displayed as: A mini panel under each session With 30 / 50 / 70 reference levels Example: Interpretation: Above 50 → bullish momentum within session Below 50 → bearish momentum 30/70 → oversold/overbought zones This gives you contextual momentum , not global momentum. --- Why Session-Based Oscillators Matter Standard oscillators ignore time segmentation. This approach: Resets momentum every session Prevents carryover noise Aligns signals with actual trading windows So instead of: “RSI is overbought” You get: “RSI is overbought within London session” This is a much stronger contextual signal. --- Labels & Range Statistics Each session can display: Session name (ASIA, LON, NY) Range percentage This helps quantify: How much the market moved during that session Which session is dominating volatility --- Putting It All Together This indicator gives you a full intraday map: Where price moved (session boxes) Where fair value sits (VWAP) Where equilibrium lies (midline) Where momentum stands (oscillator) Where volatility expands (kill zones) Where liquidity rests (extended highs/lows) --- How to Use It 1) Identify the current session Always start with: Which session is active? Each session behaves differently. --- 2) Use VWAP + midline for bias Above VWAP + above mid → strong trend Below VWAP + below mid → bearish control Between → range --- 3) Watch kill zones for setups Breakouts during kill zones are higher probability Fake moves often occur just before them --- 4) Track previous session levels Asia high/low often targeted during London London extremes often targeted during NY --- 5) Use oscillator for confirmation Momentum aligning with structure → stronger signal Divergence → potential reversal --- Strengths Fully contextual intraday framework Combines time, price, and volume-weighted logic Visual and intuitive Highly configurable --- Summary Trading Sessions Suite converts the trading day into a structured sequence of auctions. By combining session ranges, VWAP, kill zones, and a session-specific momentum engine, it provides a complete framework for understanding how price moves throughout the day. Instead of relying on static indicators, it aligns analysis with when liquidity actually enters the market, allowing for more precise timing, better context, and cleaner trade execution.Indicador Pine Script®por BackQuant22123
Volume Bubble Levels [BackQuant]Volume Bubble Levels Overview Volume Bubble Levels is a volume-expansion and liquidity-mapping tool designed to identify statistically significant participation events and project them forward as actionable structural levels. Instead of treating volume as a secondary confirmation metric, this indicator treats volume spikes as primary events and builds a framework around them: Detect abnormal volume relative to a rolling baseline. Classify those events into tiers based on intensity. Visualize them directly on price using scalable “bubble” markers. Project their high and low as forward levels (“naked levels”). Track whether those levels remain untouched, get retested, or are invalidated. The result is a system that highlights where meaningful participation occurred , and more importantly, whether the market has returned to those areas . This shifts the focus from “what price did” to “where size traded and what has or hasn’t been revisited since.” Core idea Markets move through phases of normal participation and abnormal participation . Most bars are noise. Occasionally, a bar prints with volume significantly above its baseline, indicating: Aggressive positioning, Large order execution, Liquidity events, Absorption or distribution, Forced flows (liquidations, stops, news reactions). These events often leave behind structural footprints. Volume Bubble Levels captures those footprints and answers: Where did abnormal participation occur? How strong was it relative to recent history? Have those levels been revisited? Are there still “untouched” zones where liquidity may remain? Volume baseline and normalization The first step is establishing what “normal” volume looks like. The script computes a rolling moving average of volume: volMa = MA(volume, volMaLen, volMaType) You can choose the type: SMA for stable baseline, EMA for faster adaptation, RMA for smoother response, WMA for weighted emphasis on recent bars. Then the script computes a ratio: volRatio = volume / volMa This is the key metric. Interpretation: volRatio ≈ 1 → normal participation. volRatio > 1 → above-average participation. volRatio >> 1 → abnormal participation. Everything in the script is built off this ratio. Tiered volume classification Instead of treating all volume spikes equally, the script classifies them into three tiers: Tier 1 — Elevated : moderate expansion above baseline. Tier 2 — High : strong participation. Tier 3 — Extreme : major volume event. Defined as: Tier 1: volRatio ≥ t1Mult Tier 2: volRatio ≥ t2Mult Tier 3: volRatio ≥ t3Mult Each higher tier overrides the lower: Tier 3 > Tier 2 > Tier 1 This creates a hierarchy of importance: Tier 1 = “noticeable” Tier 2 = “significant” Tier 3 = “structural” Directional context (bull vs bear volume) Each volume event is also classified directionally: Bull = close ≥ open Bear = close < open This matters because: Bull volume spikes often represent aggressive buying or short covering. Bear volume spikes often represent aggressive selling or long liquidation. So every event carries two dimensions: Magnitude (Tier 1 / 2 / 3) Direction (bull / bear) Bubble visualization (what the circles mean) Volume events are plotted directly on price as circular “bubbles.” Key properties: Position: plotted at the closing price of the bar. Color: determined by tier and direction. Size: determined by how far the volume exceeds the threshold within its tier. Size bucketing within tiers Each tier is subdivided into five size buckets: Tiny Small Normal Large Huge This is done by splitting each tier’s range into equal steps. Example: Tier 1 spans from t1Mult → t2Mult. That range is divided into 5 segments. Higher volRatio within that tier = larger bubble. So a large Tier 1 bubble may still be smaller than a small Tier 2 bubble, preserving hierarchy. What bubbles represent in practice Each bubble is a localized participation event . Interpretation: Cluster of bubbles → sustained participation. Single large bubble → isolated liquidity event. Tier 3 bubble → major structural event, often worth tracking. They are not signals by themselves. They are markers of where something important happened . Naked levels: projecting volume events forward The core feature of this script is not the bubbles themselves, but what happens after them. For every qualifying volume event, the script creates: A horizontal line at the bar’s high. A horizontal line at the bar’s low. These are called naked levels . Why both high and low: High captures the upper boundary of the event. Low captures the lower boundary. Together, they define the full price range where abnormal volume occurred. What “naked” means A level is “naked” if: Price has not yet traded back through it. These are important because: They represent unresolved areas. Liquidity may still be resting there. Market participants involved in the original event may still be positioned around that level. Level lifecycle 1) Creation On a volume event: High line and low line are created. Stored with metadata: - price - tier - direction - creation bar 2) Extension Each level extends forward in time: Updated every bar. Projected to the right until resolved. 3) Takeout (resolution) A level is considered “taken” when price trades through it: High level taken when: high > level price Low level taken when: low < level price Once taken: The line is terminated. Removed from active tracking. 4) Expiry Levels also expire after a fixed number of bars: If (current bar - birth bar) > extendBars → level is removed. This prevents infinite clutter and ensures relevance. Why naked levels matter These levels act like: Liquidity magnets, Revisit zones, Areas of unfinished business. In practice: Price often returns to high-volume zones. Untouched levels can act as targets. Revisits can trigger reactions, pauses, or reversals. This aligns with auction market theory: Markets seek to revisit areas of high participation. Unfinished auctions tend to get completed. Tier-aware level significance Not all levels are equal: Tier 1 levels = weaker, more frequent. Tier 2 levels = meaningful. Tier 3 levels = major structural zones. The script reflects this visually: Tier 3 lines are thicker. Colors differ by tier and direction. So you can quickly identify: Which levels matter most. Color system Each tier has separate bull/bear colors. This allows: Bullish volume zones vs bearish volume zones. Visual distinction between accumulation-type and distribution-type activity. Because: A high-volume bullish bar and a high-volume bearish bar represent very different order flow contexts. Line styling You can choose: Dotted Dashed Solid This does not affect logic, only readability. What this indicator is NOT It is important to understand what this tool is not doing: It is not a volume profile. It does not aggregate volume by price level. It does not measure cumulative delta. It does not predict direction directly. Instead, it is: Event-based , not distribution-based. Forward-projecting , not historical summarizing. Structure-focused , not signal-focused. How to use it 1) Identify important zones Focus on: Tier 2 and Tier 3 bubbles. Clusters of bubbles. These represent areas of significant participation. 2) Track naked levels Watch: Untouched levels ahead of price. Levels near current price. These often act as: Targets, Reaction zones, Liquidity pools. 3) Watch level interactions When price approaches a level: Rejection → confirms level relevance. Clean break → invalidates it. Chop around level → absorption. 4) Combine with structure This tool works best with: Trend context, Support/resistance, Market structure, Other flow indicators. Example interpretations Scenario 1: Strong bullish bubble cluster Multiple Tier 2–3 bullish bubbles form. Price moves away without revisiting. Interpretation: Strong accumulation zone. Untouched lows may act as future support or targets. Scenario 2: Price returns to naked level Price revisits a previously untested level. Interpretation: Liquidity is being re-engaged. Potential reaction point. Scenario 3: Level invalidation Price blows through a level with strong continuation. Interpretation: That level no longer holds structural significance. Market has repriced beyond that participation zone. Strengths Highlights meaningful participation events. Projects actionable forward levels. Separates noise from structural volume. Works across assets and timeframes. Limitations Depends on volume quality (less reliable on low-liquidity assets). Does not indicate direction by itself. Can produce many levels in volatile environments. Requires interpretation, not plug-and-play signals. Summary Volume Bubble Levels transforms abnormal volume events into forward-projected structural levels. By measuring volume relative to its own baseline, classifying it into tiers, and projecting both the high and low of those events, the indicator builds a dynamic map of where meaningful participation occurred and whether those areas remain unresolved. The bubbles highlight the event, but the real value comes from the naked levels, which act as evolving liquidity zones that can influence future price behavior.Indicador Pine Script®por BackQuant22161
Exponential Hull Momentum [BackQuant]Exponential Hull Momentum Overview Exponential Hull Momentum is a normalized momentum oscillator built from an Exponential Hull Moving Average -style transformation. Its purpose is to measure whether smoothed directional pressure is pushing toward the upper or lower end of its own recent range, while keeping the response faster and cleaner than a plain moving-average oscillator. At a high level, the script does three things: Builds a fast, low-lag smoothed series using an Exponential Hull-style calculation. Normalizes that series against its own rolling high-low range so the output fits into a bounded oscillator-style scale centered around zero. Optionally smooths the oscillator with a selectable moving average so you can use a secondary signal line or regime filter. The final result is an oscillator that tries to answer: Is momentum pushing toward the strong positive end of its recent range? Is momentum collapsing toward the negative end? Is the current move still expanding, or is it rolling over relative to its own smoothed state? What this indicator is actually measuring This indicator is not measuring raw returns, not measuring RSI-style up/down closes, and not measuring volatility. It is measuring the position of a low-lag smoothed price transform within its own recent rolling range . That distinction matters. It means: Positive values indicate the Exponential Hull series is in the upper half of its recent normalized range. Negative values indicate it is in the lower half of its recent normalized range. Extreme positive values suggest strong upward momentum persistence. Extreme negative values suggest strong downward momentum persistence. Because it is normalized, the oscillator is less about absolute price level and more about relative momentum state . Where the “Hull” idea comes from The Hull Moving Average family exists to solve a classic moving-average problem: If you smooth more, you reduce noise but increase lag. If you smooth less, you reduce lag but increase noise. Alan Hull’s core idea was to combine moving averages in a way that compensates for lag before applying a final smoothing stage. The classic HMA uses weighted moving averages. This script uses the same structural idea, but with EMAs instead , producing an Exponential Hull-style moving average . So instead of a classic HMA, the script constructs: A fast EMA on half-length input. A slower EMA on full-length input. A lag-compensated intermediate value using 2 * fast - slow. A final EMA smoothing pass using sqrt(length). This is why it is called Exponential Hull Momentum . The “Hull” part refers to the lag-reduction structure, the “Exponential” part comes from using EMA instead of WMA. The EHMA calculation step by step The core function is: EHMA(_src, _length) = EMA( 2 * EMA(_src, _length / 2) - EMA(_src, _length), round(sqrt(_length)) ) Let’s break that down. 1) Fast EMA on half length EMA(_src, _length / 2) This reacts quickly to recent price changes. 2) Slow EMA on full length EMA(_src, _length) This is smoother and more delayed. 3) Lag compensation 2 * fastEMA - slowEMA This is the critical step. It pushes the result toward the faster average while subtracting part of the slower lagging component. Conceptually, it behaves like a “de-lagged” smoother. It is related in spirit to reduced-lag constructions like DEMA and TEMA, though implemented in a Hull-style framework. 4) Final smoothing EMA(lag_compensated_series, sqrt(length)) This final pass cleans up the compensated series so it remains usable as a smooth momentum engine rather than a noisy de-lagged line. So the oscillator’s underlying subject is not raw price, but this EHMA subject series . Why use EHMA instead of a plain EMA or raw price A raw price oscillator is often too noisy. A plain EMA oscillator is smoother, but can still lag too much. EHMA tries to balance: Faster reaction than a standard EMA. Cleaner shape than a raw de-lagged transform. More sensitivity to directional bursts. That makes it useful for momentum work, especially when you want: Earlier momentum regime shifts. Cleaner trend-state transitions. A bounded oscillator rather than an overlay line. Normalization: turning the EHMA into an oscillator After computing the EHMA subject, the script normalizes it using its own rolling lowest and highest values over a user-defined normalization period: lowest = lowest(subject, norm_period) highest = highest(subject, norm_period) plotosc = (subject - lowest) / (highest - lowest) - 0.50 This transforms the EHMA series into a bounded range centered around zero. Interpretation: If subject is near the rolling highest, plotosc approaches +0.5. If subject is near the rolling lowest, plotosc approaches -0.5. If subject is near the middle of the rolling range, plotosc is near 0. So the oscillator is essentially: Where is the current EHMA value sitting within its recent high-low envelope? Why normalization matters Without normalization, the EHMA value itself would still be in price units, which makes comparison harder across: Different assets, Different timeframes, Different price regimes. Normalization gives you a common scale: -0.5 to +0.5, centered at 0 That makes the output much easier to use as a momentum state tool. What the oscillator values mean Near +0.5 The EHMA subject is pressing against the upper end of its rolling range. This usually means: Strong bullish momentum, Persistent upward movement in the smoothed series, A possible “stretched” positive momentum condition. Near -0.5 The EHMA subject is pressing against the lower end of its rolling range. This usually means: Strong bearish momentum, Persistent downward movement, A possible stretched downside state. Near 0 The EHMA subject is near the midpoint of its recent range. This can mean: Momentum is neutral, Momentum is transitioning, The market is compressing or chopping relative to recent structure. Important nuance about the oscillator scale This is not a z-score . It is not measuring “standard deviations from mean.” It is a min-max style range normalization . That means: The output depends on the recent highest and lowest subject values. If the rolling range changes sharply, oscillator sensitivity can change too. The same oscillator value does not imply the same statistical rarity across all contexts. It is best read as a relative range-position momentum oscillator , not as a probabilistic metric. Signal line / moving average layer The script optionally applies a second smoothing layer directly to the oscillator: sig_ma = MA(plotosc, malen, matype) You can choose from many MA types: SMA EMA DEMA TEMA RMA WMA HMA T3 ALMA LINREG VWMA This signal line is not required for the core oscillator to work. It is a secondary interpretation layer that can be used for: Momentum confirmation, Cross-based entry logic, Smoothing out the oscillator for regime filtering, Visual comparison between raw momentum and smoothed momentum. The script note suggests that if you want to use the MA more like a signal histogram, you can change its style to columns in the style menu. Why a selectable MA matters Different traders want different signal characteristics: SMA/EMA for classic smoothing, DEMA/TEMA for lower lag, HMA/T3/ALMA for smoother trend-state filtering, LINREG for slope-sensitive behavior, VWMA if you want volume-weighted smoothing. This makes the indicator more flexible without changing the core EHMA oscillator. Color gradient logic The oscillator columns are colored using thresholded intensity zones rather than a continuous gradient function. The color changes as the oscillator moves further away from zero. For positive values: Weak positive: lighter cyan/green tones. Moderate positive: stronger green. Strong positive: bright green. Extreme positive near +0.5: intense bright green. For negative values: Weak negative: orange/red tint. Moderate negative: deeper red. Strong negative: bright red. Extreme negative near -0.5: intense red. This means the plot does two jobs at once: Direction from sign, Relative momentum intensity from color saturation. So even without reading the value numerically, you can see whether momentum is: Barely positive, Strongly positive, Barely negative, Or deeply negative. Static levels and what they mean The script draws fixed zones: +0.5 and +0.4 -0.4 and -0.5 0 midline These create: An upper “overbought / strong positive momentum” zone from 0.4 to 0.5 A lower “oversold / strong negative momentum” zone from -0.4 to -0.5 A midline at 0 separating positive from negative momentum territory Important: These are momentum extreme zones , not traditional RSI overbought/oversold zones. Strong trends can stay pinned near +0.5 or -0.5 for long periods. Extreme readings do not automatically mean reversal. The fill between the upper and lower static boundaries just makes those zones easier to identify visually. Midline logic The zero line is the most important structural level in the oscillator: Above 0 = EHMA is in the upper half of its recent range, positive momentum regime. Below 0 = EHMA is in the lower half of its recent range, negative momentum regime. The alert conditions are built on this exact logic: Long alert on crossover above 0 Short alert on crossunder below 0 So the core directional interpretation is midline-based. How to interpret the indicator in practice 1) Momentum regime The cleanest use is as a regime filter: Above 0: positive momentum bias. Below 0: negative momentum bias. This alone can already be useful for: Filtering entries, Avoiding countertrend setups, Aligning with the dominant smoothed momentum state. 2) Momentum intensity The closer the oscillator moves toward +0.5 or -0.5, the stronger the recent momentum relative to its own normalized range. This can help distinguish: Weak trend drift, Healthy trend continuation, Momentum surge / expansion, Potential exhaustion zones. 3) Transition behavior Watch how the oscillator behaves around 0: Fast thrust through 0 often signals a fresh momentum shift. Repeated chop around 0 often signals indecision or sideways conditions. A flattening oscillator after an extreme reading often shows momentum deterioration before price fully turns. 4) Using the moving average signal If enabled, the MA of the oscillator can help identify: When raw momentum is accelerating away from smoothed momentum, When momentum is rolling over, Whether the oscillator move is broad and sustained or only a short burst. A common interpretation: Oscillator above signal MA and above zero = strong bullish momentum structure. Oscillator below signal MA and below zero = strong bearish momentum structure. Divergence between oscillator and signal MA = momentum fading or transitioning. What makes this different from RSI or stochastic-style oscillators This script is structurally different from standard oscillators. Compared to RSI RSI is based on the ratio of average up closes to down closes. It measures directional internal strength of return behavior. EHMA Momentum instead: Starts from a low-lag smoothed price transform, Then asks where that transform sits in its recent range. So it is more “structure-relative momentum” than “up/down return balance.” Compared to Stochastic Stochastic asks where price closes relative to recent high-low range. EHMA Momentum asks where the EHMA-smoothed subject sits relative to its own recent subject range. That means: It is less raw than stochastic, More smoothed, Potentially less noisy, And more focused on directional structure than candle location. Parameter behavior Exponential Hull Calculation Period (len) Controls how the EHMA subject is built. Very low values make the subject extremely reactive. Higher values smooth the subject more and reduce sensitivity. Since the default is very small, this script is designed to be sharp and responsive by nature. Normalization Period (norm_period) Controls the rolling high-low range used to normalize the subject. Higher values create a broader historical range and smoother normalization. Lower values make the oscillator adapt faster, but it can become more jumpy and “range-reset” more often. Signal MA Period and Type Controls how smooth the optional secondary line is. Shorter MA = faster cross behavior. Longer MA = slower, steadier confirmation. Strengths of this approach Fast response because of the Exponential Hull construction. Easy interpretation because of bounded normalized output. Works well as a regime filter via the zero line. Intensity is visually clear from both height and color. Flexible because of optional multi-type signal smoothing. Limitations and what to watch for Because the oscillator is min-max normalized, extreme values can persist in strong trends. A rolling highest/lowest normalization can make the oscillator “reset” as old extremes leave the window. On very low lengths, the EHMA can become highly reactive and potentially noisy. Zero-line crosses can whipsaw in sideways markets, especially if normalization is too short. So this tool is best used with context: Trend structure, Market regime, Higher timeframe bias, Or combined with the signal MA and price action. Summary Exponential Hull Momentum is a normalized momentum oscillator built from an EMA-based Hull-style smoothing engine. It first creates a low-lag Exponential Hull series, then normalizes that series within its own rolling high-low range so the output oscillates around zero between roughly -0.5 and +0.5. Positive values indicate the EHMA subject is pressing into the upper half of its recent range, negative values indicate the lower half, and the distance from zero reflects relative momentum strength. Static zones highlight extreme positive and negative momentum states, while an optional multi-type moving average can be used as a secondary signal or smoothing layer.Indicador Pine Script®por BackQuant299
Gamma Exposure Levels [BackQuant]Gamma Exposure Levels This indicator allows you to paste Gamma Exposure (GEX) level data directly into a text input on TradingView, automatically parsing the values and plotting them as labeled horizontal lines on your chart. It is designed for traders who use options-derived gamma exposure data as part of their technical analysis and want a fast, visual way to overlay those key price levels onto any chart and timeframe. Rather than manually drawing lines for each level, this script reads a structured block of GEX output text, extracts every relevant dollar value, and draws color-coded, labeled levels across your chart. If two or more levels share the same price, their labels are automatically merged (for example, "Max Pain / Call Res $75,000") so the chart stays clean and readable. What is Gamma Exposure (GEX)? Gamma Exposure refers to the aggregate gamma held by options market makers (dealers) at each strike price. Gamma measures how much a dealer's delta (directional hedge) changes as the underlying price moves. When dealers hold large gamma positions, they must continuously hedge by buying or selling the underlying asset, which can either dampen or amplify price movement depending on the sign of that gamma. When dealers are long gamma (positive GEX), they hedge against the prevailing trend: buying dips and selling rallies. This creates a stabilizing, mean-reverting effect around high-gamma strikes, making those levels act like magnets or support/resistance zones. When dealers are short gamma (negative GEX), they hedge in the same direction as the move: selling into drops and buying into rallies. This amplifies volatility and can cause sharp, directional moves once a key gamma level breaks. Understanding where these gamma levels sit gives traders a structural map of where options market makers are likely to add liquidity or accelerate a move. How to Use This Indicator Add the indicator to your chart. Open the indicator settings and find the "Data Input" group at the top. Paste your full GEX levels output into the text area. The indicator expects a structured text format (see the example format below). The indicator will automatically parse all dollar values from the text and plot them as horizontal lines with labels. Use the toggle checkboxes next to each level type to show or hide individual levels. Customize colors, line style, line width, label size, label offset, and label position from the settings panel. Expected Input Format The indicator parses structured GEX output text. Below is an example of the expected format. Copy and paste a block like this directly into the text area input in the indicator settings: GEX Levels - 04/03/2026, 12:17:19 All-Expiry Levels: HVL: $72,000 +$1,841 (+2.62%) Call Resistance: $75,000 +$4,841 (+6.90%) Put Support: $60,000 $-10,159 (-14.48%) 0DTE Levels: 0DTE HVL: $68,000 $-2,159 (-3.08%) 0DTE Call: $71,000 +$841 (+1.20%) 0DTE Put: $66,000 $-4,159 (-5.93%) Advanced: Zero Gamma: $71,819 +$1,660 (+2.37%) Max Pain: $74,000 +$3,841 (+5.47%) Expected Move: $64,238 to $76,081 Flip Zones (All): $67,500 All-Expiry GEX Top 10 (by |gamma|): 1. $60,000 $-10,159 (-14.48%) | GEX: -20,711,741.86 2. $75,000 +$4,841 (+6.90%) | GEX: 18,876,578.2 3. $72,000 +$1,841 (+2.62%) | GEX: 17,530,960.01 4. $70,000 $-159 (-0.23%) | GEX: 17,494,795.02 5. $74,000 +$3,841 (+5.47%) | GEX: 13,573,146.08 6. $73,000 +$2,841 (+4.05%) | GEX: 10,380,107.7 7. $69,000 $-1,159 (-1.65%) | GEX: 10,341,883.98 8. $80,000 +$9,841 (+14.03%) | GEX: 8,636,674.83 9. $71,000 +$841 (+1.20%) | GEX: 7,962,084.65 10. $65,000 $-5,159 (-7.35%) | GEX: -7,257,124.01 0DTE GEX Top 10 (by |gamma|): 1. $69,500 $-659 (-0.94%) | GEX: 3,659,702.74 2. $70,500 +$341 (+0.49%) | GEX: 1,152,595.15 3. $69,000 $-1,159 (-1.65%) | GEX: 703,339.82 4. $72,000 +$1,841 (+2.62%) | GEX: 697,625.91 5. $73,000 +$2,841 (+4.05%) | GEX: 419,096.08 6. $68,000 $-2,159 (-3.08%) | GEX: 294,575.89 7. $74,000 +$3,841 (+5.47%) | GEX: 281,083.42 8. $75,000 +$4,841 (+6.90%) | GEX: 183,191.05 9. $66,000 $-4,159 (-5.93%) | GEX: -172,470.38 10. $68,500 $-1,659 (-2.37%) | GEX: 167,135.87 The indicator only extracts the dollar values from this text. The percentage changes, GEX magnitude values, and other metadata are informational context in the source data but are not plotted by this script. Level Definitions Below is a detailed explanation of every level this indicator can parse and plot. These are grouped the same way they appear in the indicator settings. All-Expiry Levels These levels are derived from gamma exposure aggregated across all option expiration dates. HVL (High Volume Level) - The price with the highest total gamma exposure across all expirations. This is the strike where dealers hold the most aggregate gamma and therefore where hedging activity is most concentrated. Price tends to gravitate toward the HVL in positive gamma environments because dealer hedging creates a mean-reverting effect around this level. Think of it as the "center of gravity" for options-driven price action. Call Resistance - The price level where call-side gamma creates overhead resistance. At this strike, the concentration of call gamma means that as price rises toward it, dealers who are long those calls must sell the underlying to stay delta-neutral. This selling pressure acts as a ceiling, making it harder for price to push through. Breaks above call resistance can signal a shift in positioning or the start of a gamma squeeze. Put Support - The price level where put-side gamma creates downside support. At this strike, the concentration of put gamma means that as price falls toward it, dealers must buy the underlying to hedge. This buying pressure acts as a floor, cushioning the decline. A break below put support can accelerate selling as dealers flip from buying to selling, potentially triggering a sharp move lower. 0DTE Levels These levels are derived exclusively from same-day (zero days to expiration) options. Because 0DTE options have extremely high gamma due to their proximity to expiration, they can dominate intraday price action even when their notional size is smaller than longer-dated positions. 0DTE HVL - The same-day high volume level. This is the intraday gamma center of gravity derived solely from options expiring today. It represents the strike where 0DTE dealer hedging is most concentrated and where intraday gamma polarity can flip. Particularly relevant for intraday traders, as 0DTE gamma effects intensify throughout the trading session and peak in the final hours before expiration. 0DTE Call - Same-day call resistance. The intraday ceiling created by 0DTE call gamma. Dealer hedging against these expiring calls creates selling pressure as price approaches this level. Because 0DTE gamma decays rapidly, this level can shift during the session and its strength increases as expiration approaches. 0DTE Put - Same-day put support. The intraday floor created by 0DTE put gamma. Dealer hedging against expiring puts creates buying pressure at this level. Like the 0DTE call level, its influence grows as the trading day progresses and gamma effects intensify near the close. Advanced Levels These levels provide additional structural context beyond the core support, resistance, and HVL framework. Zero Gamma - The precise price where cumulative gamma across all strikes and expirations equals zero. This is one of the most important structural levels in gamma analysis. Above the Zero Gamma level, dealers are net long gamma and their hedging stabilizes price (buying dips, selling rallies). Below it, dealers are net short gamma and their hedging amplifies moves (selling into drops, buying into rallies). Crossing the Zero Gamma level often marks a regime change in how the market behaves, shifting from mean-reversion to trend-following dynamics. Max Pain - The strike price at which the total value of all outstanding options (both calls and puts) would be minimized if the underlying expired at that price. In other words, it is the price where option holders collectively lose the most money. Max Pain theory suggests that there is a gravitational pull toward this level as expiration approaches, driven by dealers and market makers who benefit from options expiring worthless. It is most relevant in the final days before a major expiration. Expected Move - The 1-sigma (one standard deviation) expected price range, plotted as two levels: Expected Move Upper and Expected Move Lower. This range represents the statistically expected boundaries of price movement based on current implied volatility. Roughly 68% of the time, price is expected to remain within this range. These levels help traders gauge whether the current price action is within normal bounds or represents an unusual move. A break beyond the expected move range can signal a volatility event or a shift in market regime. Flip Zones - All price levels where gamma polarity changes sign. At these strikes, dealer hedging behavior transitions from stabilizing (long gamma) to destabilizing (short gamma) or vice versa. Flip zones act as transition boundaries. When price crosses a flip zone, the nature of dealer activity changes, which can lead to shifts in volatility, momentum, and the tendency for price to mean-revert or trend. Multiple flip zones in a narrow range can create a "no man's land" where positioning is mixed and price action becomes choppy. GEX Top 10 The GEX Top 10 are the ten strike prices with the highest absolute gamma exposure, ranked by the magnitude of their gamma (|gamma|). These represent the strikes where dealer hedging activity is most significant, regardless of whether the gamma is positive (call-dominated, stabilizing) or negative (put-dominated, destabilizing). The indicator provides a dropdown selector with five options for the GEX Top 10: None - Do not plot any GEX Top 10 levels. 0DTE - Plot the Top 10 from same-day (0DTE) options only. Best for intraday analysis. All Expiries - Plot the Top 10 from all expiration dates combined. Best for swing or multi-day analysis. 0DTE 1-5 - Plot only the top 5 from 0DTE options. Useful for reducing chart clutter while keeping the most significant intraday levels. All Expiries 1-5 - Plot only the top 5 from all expiration dates. Useful for a cleaner multi-day view. Each of the 10 GEX levels (GEX #1 through GEX #10) has its own individual toggle and color picker, so you can show or hide any specific rank and assign distinct colors to differentiate them. Overlap Handling It is common for multiple GEX levels to land on the same price. For example, Max Pain and Call Resistance might both be at $75,000, or a GEX Top 10 strike might coincide with the HVL. Rather than drawing overlapping lines and labels that clutter the chart, this indicator automatically detects when two or more levels share the same price (within a $0.50 tolerance). When a match is found, only one line is drawn at that price and the labels are merged with a "/" separator. For example, if Max Pain is $75,000 and Call Resistance is also $75,000, the chart will show a single line labeled: Max Pain / Call Res 75000 This keeps the chart clean and makes it immediately obvious when multiple structural levels converge at the same price, which often signals a particularly significant level. Customization Options The indicator provides extensive customization through its settings panel: Per-Level Controls Each level type has its own color picker and show/hide toggle on the same line. GEX Top 10 levels (#1 through #10) each have individual color pickers and toggles. A dropdown selector lets you choose which GEX Top 10 dataset to plot (0DTE, All Expiries, top 5 only, or none). Line Style Line Width: 1 to 4 pixels. Line Style: Solid, Dashed, or Dotted. Extend Lines: Both directions, Right only, Left only, or None. Label Settings Label Size: Tiny, Small, Normal, Large, or Huge. Label Offset: Position the labels any number of bars to the right or left of the current bar (-200 to 500). Label Side: Place labels on the Right or Left side of the chart. Every toggle and input has a descriptive tooltip that appears on hover, explaining what the level represents and how it is used. How the Parsing Works The script uses Pine Script v6 string functions to scan the pasted text for known keywords (such as "HVL:", "Call Resistance:", "0DTE Call:", "Zero Gamma:", "Expected Move:", "Flip Zones:", etc.). For each keyword found, it locates the next "$" character and extracts the numeric value that follows, correctly handling both comma-separated thousands (e.g., $72,000) and decimal values (e.g., $71,819.50). For the Expected Move, it parses both the lower and upper bounds from the "to" separator (e.g., "$64,238 to $76,081"). For Flip Zones, it scans for every "$" on the line and extracts each value, correctly distinguishing thousands-separator commas from delimiter commas between multiple zone values. For the GEX Top 10 sections, it identifies the section header ("All-Expiry GEX Top 10" or "0DTE GEX Top 10") and parses the first dollar value from each numbered line, stopping when it hits a new section header or separator. The indicator only draws on the last bar and uses a delete-and-redraw system to ensure that only one clean set of lines and labels exists at any time. Old drawings are removed before new ones are created on each update. Important Notes This indicator does not generate or calculate GEX data. It is a visualization tool that plots externally sourced gamma exposure levels onto your TradingView chart. The indicator requires you to paste GEX data in the expected structured text format. If the text area is empty, nothing will be plotted. GEX data is a snapshot in time. Options positioning changes throughout the trading day as new trades are opened and closed. Levels should be updated periodically for the most accurate representation of current dealer positioning. GEX levels are not guaranteed support or resistance. They represent areas where dealer hedging activity is concentrated, which can influence price behavior but does not determine it. Always use GEX data as one component of a broader analysis framework. Indicador Pine Script®por BackQuant5656560
VWAP NYO DeviationVWAP - Deviation At NYO A clean, real-time overlay indicator that instantly shows how the major liquid markets are opening relative to their developing daily VWAP — plus powerful historical context in one compact table. What the table displays (updated live on every chart): Symbol – ES1!, CL1!, GC1!, 6E1!, BTCUSD Deviation (%) – Today’s RTH open (9:30 AM EST) vs. the VWAP up to that exact moment, expressed as a percentage. → Green background = opening above average deviation → Red background = opening below average deviation Avg Abs Dev (%) – Historical average absolute opening deviation (all completed days on your chart) Touch VWAP % – Percentage of completed trading days where price touched the daily VWAP at least once during Regular Trading Hours (9:30–16:00 EST) Additional features On your main chart symbol, a clean colored label automatically appears at the exact 9:30 AM EST bar showing that symbol’s opening VWAP deviation (green up / red down). Fully automatic EST/New York timezone handling — works on any timeframe and any symbol you’re viewing. Table text size is fully customizable (tiny → large / auto). Best for Futures & BTC day traders who use VWAP as a primary reference Quick cross-market bias check at the open Mean-reversion / VWAP magnet strength analysis Monitoring how “stretched” the open is versus historical norms Simply add the indicator, and the table appears in the top-right corner. The more history loaded on your chart, the more accurate the average deviation and touch percentage become. Perfect companion for any VWAP-based strategy. Enjoy! 🚀Indicador Pine Script®por Resonant_Trader9
Trend Velocity Channel [BackQuant]Trend Velocity Channel Overview Trend Velocity Channel is a trend and momentum-acceleration overlay built around one idea, trend strength is the gap between a fast “lead” average and a slow “lag” average . When the lead line pulls away from the lag line, the market is accelerating in that direction. When that gap collapses, trend energy is fading and reversals become more likely. Instead of using a single moving average slope or crossover, this indicator measures: A leading trend line (DEMA) that reacts quickly. A lagging trend line (slower EMA) that represents slower consensus value. A normalized “velocity / crush” metric: the distance between them in ATR units . A trend regime based on the sign of that velocity. A dynamic channel defined by the lead line on one side and a padded lag boundary on the other. A reversal level engine that marks flip bars and tracks retests and invalidations. The result is a channel that visually answers: Are we accelerating or decelerating? How strong is the current acceleration relative to recent history? Where is the “danger edge” where a reversal would be confirmed? Which flip levels remain relevant and which got invalidated? Concept: lead vs lag as a proxy for trend velocity Markets trend when price doesn’t just move, it keeps moving faster than the slow baseline can follow . If a fast estimator (lead) separates from a slow estimator (lag), that separation is a practical proxy for “velocity”: Lead above lag, bullish acceleration. Lead below lag, bearish acceleration. Lead converging back into lag, trend energy compressing. This script calls that separation Crush , meaning the lead line is “crushing away” from the lag line. Core components 1) Leading line: DEMA The lead line is a Double Exponential Moving Average: dema = DEMA(price, maLen) Why DEMA: It reduces lag relative to a standard EMA. It reacts faster to genuine directional moves. It still smooths noise enough to act as a structural line. DEMA is used as the “inner” channel edge and the glow anchor. 2) Lagging line: Slow EMA The lag line is a slower EMA: lagMA = EMA(price, round(maLen * 1.5)) Why a slower EMA: It represents a slower-moving consensus baseline. It creates a meaningful “gap” against the lead line. It is less sensitive to micro-chop, so separation signals are cleaner. The lag line also becomes the basis for the channel’s outer edge. 3) Volatility normalization: ATR Raw MA distance is not comparable across regimes. A 50-point gap might be huge in a low-vol market and nothing in a high-vol market. So the gap is normalized by ATR: atr = ATR(14) rawCrush = (dema - lagMA) / atr Interpretation: rawCrush = “how many ATRs the lead line is away from the lag line.” This standardizes the signal across instruments and volatility states. 4) Crush smoothing The gap can still jitter, especially in choppy markets. So it is EMA-smoothed: crush = EMA(rawCrush, crushSmth) Lower crushSmth: Faster regime flips, more noise. Higher crushSmth: More stable regimes, slower reaction. Trend regime and flips Trend direction is derived directly from the sign of the smoothed crush: trend = crush > 0 ? +1 : -1 flip = trend != trend Meaning: Bull regime: lead (DEMA) is above lag baseline in ATR units. Bear regime: lead is below lag baseline. Flip: the velocity sign changed, meaning acceleration has switched direction. This is not a price crossover system, it is a lead-lag separation regime system . Measuring strength: crushNorm The script also grades how extreme current crush is relative to recent conditions: crushAbs = abs(crush) crushHigh = highest(crushAbs, 80) crushNorm = crushHigh > 0 ? min(crushAbs / crushHigh, 1) : 0 Interpretation: crushNorm near 0 means separation is small relative to recent extremes, trend is weak or compressing. crushNorm near 1 means separation is near the largest seen recently, trend acceleration is strong. This strength scale drives: Color intensity (gradient) Glow width “Peak Crush” alert condition Channel construction Inner edge The inner edge is the leading line: inner = dema This is the “fast structure” of the move. Outer edge The outer edge is built from the lag line plus an ATR padding: outer = (bull) lagMA - atr * chanPad outer = (bear) lagMA + atr * chanPad This is important. The lag line sits behind price, so the script offsets it outward by a user-defined fraction of ATR. This creates a more realistic boundary that accounts for volatility. Interpretation: In bull regimes, the outer boundary is below lagMA, creating a support-like corridor beneath price. In bear regimes, the outer boundary is above lagMA, creating a resistance-like corridor above price. The channel is intentionally asymmetric This channel is not “± ATR around a mean.” It is directional: Inner edge hugs price via fast DEMA. Outer edge is anchored to lagMA and padded outward. So it behaves like a trend corridor where: The inner edge shows where the trend is currently “being pulled.” The outer edge shows the boundary where the trend would be meaningfully compromised if crossed. Ribbon fill (3-layer depth) Two midpoints are created between inner and outer: mid1 = inner + (outer - inner) * 0.33 mid2 = inner + (outer - inner) * 0.66 Then the fill is layered: inner → mid1 (most opaque) mid1 → mid2 mid2 → outer (most transparent) This creates a depth effect that visually communicates where price is sitting within the corridor. When the corridor is tight and strong, the ribbon looks concentrated. When it expands, the ribbon spreads and fades. Color logic (trend + strength) The indicator uses a gradient color where direction sets the palette and crushNorm sets intensity: Bull: faint green → strong green as crushNorm increases Bear: faint red → strong red as crushNorm increases This means you can read two things instantly: Direction (bull vs bear) Acceleration strength (faded vs intense) Glow engine on DEMA Glow width scales with ATR and crushNorm: glowW = atr * 0.07 * (0.5 + crushNorm) So: High acceleration = larger glow, more “energy” around the lead line. Low acceleration = smaller glow. Glow is built as multiple invisible plots above and below DEMA with layered fills, forming a halo around the lead line that encodes strength. Flip-aware band breaking The outer boundary line is broken on flips: bandBrk = flip ? na : outer plot(..., plot.style_linebr) This prevents a misleading continuous line across regime changes, since the outer edge swaps sides on flip. Crush reversal levels (flip levels engine) This script includes a level system that plants a dashed horizontal level on every regime flip, then tracks: Whether price retests it (first touch marker) Whether price invalidates it (deletes it) How long it extends forward How many levels are kept 1) Level placement On a flip: If trend flips bullish, the level is placed at the flip bar’s low. If trend flips bearish, the level is placed at the flip bar’s high. That makes sense structurally: Bull flip low is a “pivot low” candidate. Bear flip high is a “pivot high” candidate. Then a dashed line is drawn forward ~60 bars. 2) Level storage and maxLvls Levels are stored in an array and capped by maxLvls. When the cap is exceeded, the oldest is deleted. This keeps the chart readable. 3) Level invalidation (broken logic) Each level is monitored: Bull flip level breaks if price closes far below it: close < level - atr * 2.5 Bear flip level breaks if price closes far above it: close > level + atr * 2.5 This is a volatility-scaled invalidation. If price pushes through a flip level by a large margin in ATR terms, it’s no longer acting like a meaningful reaction point. 4) Retest detection A “touch” is detected when: close is within 0.25 ATR of the level, and close two bars ago was not close (distance > 0.5 ATR), and the level hasn’t been marked retested yet. On first retest, an “x” marker is printed and the level’s retested flag is set to true so it won’t spam. What these levels represent They are not generic support/resistance. They are regime pivot levels created by a change in lead-lag acceleration. In practice: Untested flip levels can act like “memory zones” where price may react. Retested levels become less special, still relevant but not “naked.” Invalidated levels are removed to reduce noise. Signals and alerts The script provides: Crush Bull: flip into bullish regime (crush crosses above 0 via smoothing logic) Crush Bear: flip into bearish regime Peak Crush: crushNorm > 0.85, meaning separation is near recent max, strong acceleration Important: Peak Crush is not a reversal call. It flags strong trend energy. That can precede continuation or exhaustion, you use it as context, not a standalone trade trigger. How to use it Trend following framework Stay aligned with the regime color. In bull regime, treat the outer boundary as the “structure floor.” In bear regime, treat the outer boundary as the “structure ceiling.” The inner DEMA is your fast guide, the outer edge is your compromise boundary. Acceleration read Increasing color intensity and thicker glow imply acceleration is strengthening. Fading color and shrinking glow imply acceleration is decaying and the move is losing energy. A regime flip is a clean state change, not a micro-signal. Using reversal levels Treat naked flip levels as potential reaction zones. Watch first retest behavior, clean rejection suggests the flip level is holding. If the level invalidates by 2.5 ATR, it’s removed because structure has been overwritten. Key inputs explained MA Length (maLen) Sets both the lead line length and the lag line length (scaled by 1.5). Lower values: More sensitive, more flips. Higher values: Smoother, fewer flips, slower response. Crush Smoothing (crushSmth) Controls stability of the velocity signal. Lower: Fast flips, noisier regime. Higher: More confirmation, later flips. Channel Padding (chanPad) Controls how much extra ATR space is added beyond lagMA. Higher padding: Wider channel, fewer boundary touches. Lower padding: Tighter boundary, more reactive “risk edge.” Max Levels Controls how many historical flip levels are retained. Summary Trend Velocity Channel treats trend as lead-lag separation expressed in ATR units. A fast DEMA tracks the active move, a slower EMA defines baseline value, and their normalized gap (Crush) defines both direction and acceleration strength . That strength drives an adaptive visual language (gradient color, glow width, ribbon depth). The channel itself is directional, with the lead line as the inner edge and a volatility-padded lag boundary as the outer edge, acting as a structural “compromise line.” On every regime flip the script plants a pivot level, tracks retests, and deletes invalidated levels, giving you a clean map of acceleration-based reversal zones.Indicador Pine Script®por BackQuant22779
Auto Center ChartAutomatically centers the chart within the current visible chart window. This utility indicator scans the visible range to determine its High and Low, then adjusts autoscale so that the most recent completed candle remains visually centered — without drawing any visible objects or cluttering the chart. Why This Is Useful: - Prevents price from hugging the top or bottom of the screen - Reduces visual bias during analysis - Improves clarity when planning risk/reward - Keeps the active candle visually balanced - Eliminates constant manual scale adjustments The script only influences scaling at the right edge and does not change when hovering over historical candles. Important Notes: - Requires Auto (fits data to screen) to be enabled in chart settings - May not work as expected if other indicators are also forcing autoscale or adding extra chart space - Designed for standard time-based charts If another script modifies scaling or the chart is not in Auto mode, TradingView’s scaling engine can override this indicator.Indicador Pine Script®por OrdrFlowAtualizado 13