Institutional Flow MatrixInstitutional Flow Matrix is an open-source market-analysis framework designed to organize trend direction, confirmed market structure, institutional price zones, momentum, and location within a dealing range into one readable chart.
The purpose of this indicator is not to predict every price movement or generate constant entries. It is designed to answer a more practical sequence of questions:
1. What is the current directional bias?
2. Is market structure supporting that direction?
3. Is price trading from a meaningful location?
4. Has price returned to an active institutional zone?
5. Is momentum aligned with the proposed setup?
The script combines these questions into a structured workflow while keeping the default chart intentionally clean.
WHY THIS INDICATOR WAS BUILT
Many market-structure indicators display every swing, imbalance, liquidity level, zone, and signal at the same time. While that information can be useful for detailed analysis, it can also make the chart difficult to interpret during live trading.
Institutional Flow Matrix was built around a visual hierarchy:
* Directional bias is the primary layer.
* Active Order Blocks are the principal reaction zones.
* Momentum is a confirmation layer.
* Premium and Discount provide market location.
* Fair Value Gaps, liquidity pools, sweeps, and higher-timeframe levels are optional study tools.
The default Balanced preset focuses on the information most relevant to a directional pullback setup. Minimal mode removes most supporting visuals for live execution. Full mode reveals the additional market-structure tools for deeper analysis.
WHAT MAKES THE IMPLEMENTATION DIFFERENT
The individual concepts used by this script, including pivots, moving averages, ATR trend filters, Order Blocks, Fair Value Gaps, and Premium/Discount ranges, are established forms of technical analysis.
The original contribution of Institutional Flow Matrix is how those components are synchronized and managed as one decision framework.
Key design elements include:
* Confirmed structure events rather than unconfirmed swing guesses.
* A persistent directional state requiring agreement between structure, EMA alignment, and an ATR-based trend filter.
* Order Block freshness validation before a zone is accepted.
* Separate visual duration and analytical lifetime controls for zones.
* Automatic mitigation and expiration of old zones.
* Limited drawing-object counts to prevent long-term chart clutter.
* A weighted confluence model centered on trend, structure, zone interaction, market location, and momentum.
* Three visual presets that change the information hierarchy without changing the underlying calculations.
* Confirmed-bar signals and event-based alerts.
This is not intended to be a collection of unrelated indicators. Each module has a defined role in the same setup process.
DIRECTIONAL BIAS
The chart background represents the script's confirmed directional state.
A bullish state requires agreement between:
* Bullish market structure.
* Fast EMA positioning above the slow EMA.
* Bullish ATR trend conditions.
A bearish state uses the opposite conditions.
The background changes only after the required conditions are confirmed. A larger BUY or SELL label marks a confirmed change in this directional state.
These shift labels are different from the smaller confluence signals. A shift label identifies a change in directional bias. A confluence signal requires additional location, zone, and momentum conditions.
MARKET STRUCTURE
Confirmed pivot highs and lows form the structure engine.
The script tracks:
* Higher Highs
* Higher Lows
* Lower Highs
* Lower Lows
* Breaks of Structure
* Changes of Character
A bullish break occurs when a confirmed bar closes above the latest unbroken confirmed swing high. A bearish break occurs when a confirmed bar closes below the latest unbroken confirmed swing low.
Swing labels are retrospective by design. A pivot can only be confirmed after the selected number of right-side bars has closed. Once confirmed, its label is placed on the candle where the swing originally occurred. The label was not known on that earlier candle.
ORDER BLOCKS
Order Blocks are the primary reaction zones in the indicator.
After a confirmed structure break or qualifying displacement event, the script searches backward for an opposing candle. A candidate candle can be filtered by:
* Candle range relative to ATR.
* Body size as a percentage of candle range.
* Optional volume expansion.
* Wick-based or body-based zone construction.
Before accepting the candidate, the script checks whether price has already invalidated it. This prevents many stale zones from being created after the fact.
Active Order Blocks can be invalidated by either:
* A close beyond the opposite edge.
* A wick beyond the opposite edge.
The selected mitigation method is used consistently during both zone creation and live zone management.
Order Blocks have separate controls for visual extension and analytical age. This allows users to control how long a box remains visible independently from how long it remains eligible for signal calculations.
PREMIUM, DISCOUNT, AND EQUILIBRIUM
The script creates a rolling dealing range from the highest high and lowest low over the selected lookback.
The range is divided into:
* Premium: the upper portion of the range.
* Discount: the lower portion of the range.
* Equilibrium: the 50% midpoint.
Premium and Discount do not generate trades by themselves. They provide location.
In general:
* Bullish setups receive stronger contextual support in Discount.
* Bearish setups receive stronger contextual support in Premium.
* Equilibrium represents the midpoint of the current rolling range.
Because the range is rolling, its boundaries can change when a new lookback high or low is formed.
MOMENTUM RIBBON
The momentum module uses three exponential moving averages and an ATR-normalized difference between the fast and slow averages.
Bullish momentum requires:
* Fast EMA above the slow EMA.
* Positive normalized momentum.
* Momentum above its signal average.
Bearish momentum uses the opposite conditions.
Diamond markers identify confirmed momentum crossings. The ribbon is intended as confirmation rather than a standalone entry system.
CONFLUENCE SIGNALS
The script calculates a 0-100 Confluence Score from five conditions:
* Directional bias: 25 points.
* Market structure: 15 points.
* Momentum alignment: 15 points.
* Active Order Block interaction: 25 points.
* Premium or Discount location: 20 points.
The score measures condition alignment. It is not a probability, win rate, accuracy estimate, or forecast of future performance.
By default, BUY and SELL signals require:
* Confirmed directional bias.
* Matching confirmed structure.
* Interaction with an active Order Block.
* Correct Premium or Discount location.
* Matching momentum.
* Minimum Confluence Score.
* Completion of the selected signal cooldown.
Signals are displayed only when the complete condition changes from false to true. This prevents repeated labels while the same setup remains active.
OPTIONAL ADVANCED MODULES
Full mode provides additional analytical tools:
* Fair Value Gaps with ATR size filtering.
* Equal-high and equal-low liquidity pools.
* Confirmed liquidity sweeps.
* BOS and CHoCH labels.
* HH, HL, LH, and LL labels.
* Previous day, week, and month highs and lows.
* Optional momentum candle coloring.
These features are disabled or hidden from the default Balanced view to preserve readability.
VISUAL PRESETS
Minimal:
Designed for traders who want the least chart interference. It suppresses the background, ribbon, Premium/Discount display, trailing line, dashboard, and advanced structure annotations.
Balanced:
The default view. It emphasizes directional background, active Order Blocks, Premium/Discount context, momentum ribbon, diamonds, signals, and the dashboard.
Full:
Designed for detailed study. It adds structure labels, BOS/CHoCH events, Fair Value Gaps, liquidity tools, higher-timeframe levels, and optional candle coloring.
FOR NEWER TRADERS
A simple workflow is:
1. Start with the Balanced preset.
2. Use the background to identify the current directional bias.
3. Wait for price to return to an Order Block matching that bias.
4. Check whether price is in Discount for a bullish setup or Premium for a bearish setup.
5. Confirm that the momentum ribbon agrees.
6. Treat the signal as a point for further analysis, not an automatic order.
The equilibrium line can be used as a reference for the midpoint of the current dealing range. It is not automatically an entry or exit instruction.
FOR ADVANCED TRADERS
Experienced users can customize:
* Pivot confirmation sensitivity.
* ATR and EMA trend parameters.
* Wick-based versus body-based Order Blocks.
* Displacement-created zones.
* Candle body, range, and volume filters.
* Close-based versus wick-based mitigation.
* Zone visual duration and analytical age.
* Premium and Discount percentages.
* Fair Value Gap size.
* Liquidity sensitivity.
* Momentum lengths.
* Individual signal requirements.
* Minimum confluence threshold.
* Signal cooldown.
* Higher-timeframe reference levels.
Advanced users can also disable individual hard requirements and use the Confluence Score as a more flexible filtering system.
ALERTS
Alert conditions are included for:
* Break of Structure.
* Change of Character.
* New Order Block.
* BUY signal.
* SELL signal.
* Bias-aligned Order Block entry.
* Trend and momentum confluence.
* Liquidity sweep.
Alerts should be created using Once Per Bar Close when confirmed signals are required.
NON-REPAINTING AND TIMING
Structure breaks, directional shifts, zone creation, zone mitigation, momentum events, and confluence signals are evaluated on confirmed bars.
Pivot-based swing labels require future bars to confirm that a swing occurred. After confirmation, the label is displayed on the original pivot candle. This is delayed confirmation with retrospective placement, not advance knowledge of the swing.
Previous-period levels use completed higher-timeframe data.
LIMITATIONS
* This indicator does not predict future prices.
* It does not calculate position size, stop loss, or account risk.
* It is not a complete automated trading system.
* Signals can fail during volatile, illiquid, or range-bound conditions.
* Rolling Premium, Discount, and equilibrium levels can move when the lookback range changes.
* Confirmed pivots introduce an intentional delay.
* Order Block definitions vary among trading methodologies; this script uses the documented candle-search and filtering rules described above.
* Volume behavior differs across asset classes and data providers.
* Parameter settings that work on one symbol or timeframe may not be appropriate for another.
Suggested starting points are the 15-minute and 1-hour charts for intraday analysis and the 4-hour chart for broader swing structure. Users should test settings on their own symbols and trading sessions.
OPEN-SOURCE PURPOSE
The script is published open-source so traders can inspect the calculations, understand why signals occur, verify the confirmed-bar methodology, and adapt the framework for their own research.
The goal is to provide a readable and transparent market-structure workflow rather than a black-box prediction tool.
DISCLAIMER
This indicator is provided for educational and analytical purposes only. It is not financial advice and does not guarantee profitable results. Historical chart behavior does not ensure future performance. Users are responsible for their own analysis, testing, risk management, and trading decisions.
Indicateur

Liquidity Sweep & Stop-Hunt Signals [ForexCracked]🔵 OVERVIEW
Liquidity Sweep & Stop-Hunt Signals marks the price levels where stop orders pile up, detects the moment price runs those stops and reverses, and prints a BUY or SELL with a ready-made entry, stop and target. It is a focused reversal tool built around one of the most reliable behaviours in the market: the failed breakout.
Every signal confirms on candle close, so nothing repaints after the bar is done. A live dashboard shows the higher-timeframe bias, the last signal, and the current trade plan.
🔵 WHAT A LIQUIDITY SWEEP ACTUALLY IS
Stops cluster in obvious places: just above a recent swing high (buy-side liquidity) and just below a recent swing low (sell-side liquidity). Price is often drawn to those pools because that is where resting orders sit.
A sweep, or stop hunt, happens when price spikes through one of those swings, triggers the stops, and then closes back inside the range on the same candle. Breakout traders get trapped, and the reversal that follows is the trade this tool is built to catch.
🔵 HOW IT FINDS SIGNALS
• It tracks recent swing highs and lows as liquidity lines and keeps them on the chart until they are taken
• A SELL fires when a candle's high runs above a tracked swing high but its close falls back below it (buy-side liquidity swept, then rejected)
• A BUY fires when a candle's low runs below a tracked swing low but its close climbs back above it (sell-side liquidity swept, then rejected)
• An optional rejection-body filter ignores weak wicks and only accepts sweeps that close with a real body back inside the level
• An optional higher-timeframe EMA bias lets you take only trend-aligned sweeps, only counter-trend sweeps, or all of them
🔵 THE TRADE PLAN IT DRAWS
On every signal the tool draws three lines and labels them:
• Entry at the close of the sweep candle
• Stop just beyond the swept wick, with an ATR buffer so normal noise does not clip it
• Target at your chosen reward-to-risk multiple of that stop distance
You get a complete plan on the chart the moment a signal prints, with the exact prices in the label.
🔵 SETTINGS
• Swing Strength: how major a swing must be to count as liquidity (higher = fewer, cleaner levels)
• Levels Tracked: how many liquidity lines to keep per side
• Trend Filter: All sweeps, HTF trend only, or Counter-HTF only
• HTF Bias Timeframe and EMA Length: the higher-timeframe trend reference
• Require Rejection Body and Min Rejection Body (x ATR): quality filter for the sweep candle
• Stop Buffer (x ATR) and Reward : Risk: the trade-plan geometry
🔵 HOW TO USE
• Start on H1 or H4 for forex, gold and indices, with the HTF bias set one or two steps higher
• Treat a swept level plus a strong rejection close as the signal, not the wick alone
• Use Counter-HTF only when you want pure reversal setups at range extremes, and HTF trend only when you want continuation entries after a stop-run against the trend
• Size every trade off the drawn stop distance at a fixed account risk
• Raise Swing Strength on noisy pairs so only the meaningful liquidity gets tracked
🔵 BEST AND WEAKEST CONDITIONS
✅ Strongest at range extremes, session highs and lows, and around prior day or week highs and lows, where liquidity genuinely rests
⚠️ Weakest in fast one-way trends with no pullbacks, and on very low timeframes where every wick looks like a sweep
⚠️ DISCLAIMER
This tool identifies liquidity sweeps and marks reversal setups. It does not predict price. A swept level is a probability, not a certainty, and sweeps can extend further before reversing. Results depend on market conditions, settings, and your own execution and risk management. Shared for educational and research purposes; not financial advice. Indicateur

Dynamic MSS Navigator [MarkitTick]💡 An advanced technical analysis tool engineered to automatically identify localized market structure, validate structural shifts, and dynamically generate risk-to-reward parameters. Built for systematic traders, it continuously scans price action to pinpoint candidate highs and lows based on user-defined lookback periods. Rather than relying on subjective charting, this indicator applies stringent mathematical logic—incorporating Average True Range (ATR) buffers, volume participation, and higher timeframe (HTF) alignment—to filter out market noise and present high-probability structural breaks. Once a valid break occurs, the indicator seamlessly transitions into trade management mode, drawing precise entry, stop-loss, and multiple take-profit levels directly onto the chart, accompanied by a comprehensive real-time data dashboard.
✨ Originality and Utility
● Automated Market Structure Mapping
The core utility of this indicator lies in its ability to remove human bias from market structure analysis. Traders often struggle with defining which highs and lows are structurally significant. This script mathematically defines them, tracking the absolute highest highs and lowest lows over a rolling window, and only recognizing a structural shift when a mathematically validated threshold is breached.
● Dynamic Risk-to-Reward Modeling
Unlike standard indicators that only print buy or sell arrows, this tool instantly calculates the exact risk parameter upon signal generation. By anchoring the stop-loss to the structural pivot with a built-in volatility buffer, it sizes the risk logically. It then extrapolates multiple take-profit targets based on fixed risk-to-reward ratios, providing a complete trade framework from inception to completion.
● Multi-Dimensional Filtering Mashup
This script operates as a highly cohesive mashup of distinct technical methodologies. It combines Donchian-style localized pivot detection for structure, Wilder’s Average True Range for volatility-based breakout validation, Simple Moving Averages of volume for participation measurement, and multi-timeframe security requests for overarching trend alignment. This combination ensures that a signal is only fired when price action, volatility, volume, and higher timeframe momentum are in total agreement.
🔬 Methodology and Concepts
● Localized Pivot Identification
The script continuously monitors the highest highs and lowest lows over a defined lookback period. When a new top is formed, it identifies the lowest point of that peak structure as the "Candidate Top Low." Conversely, when a new bottom forms, it marks the highest point of that valley structure as the "Candidate Bottom High." These form the immediate structural floors and ceilings.
● ATR-Buffered Breakout Logic
To confirm a shift, price must do more than just tick past the candidate line. The indicator requires price to breach the candidate level by an additional margin, calculated as a fraction of the current ATR. This ensures that only shifts with statistically significant momentum trigger a signal, heavily reducing false positives (fake-outs) during low-volatility chop.
● Composite Strength Scoring
Upon signal generation, the algorithm calculates a proprietary "Strength Score" from 0 to 100. This score is a weighted aggregate of three factors:
The distance of the closing price beyond the breakout threshold (measuring immediate momentum).
The current volume relative to its moving average (measuring market participation).
The alignment of the localized pivot with the higher timeframe pivot (measuring macro confluence).
● Dynamic Bias Tracking
The indicator tracks the ongoing market bias, classifying it as bullish, bearish, or neutral. A bullish bias is initiated upon a valid bottom break and remains intact until price breaches the newly established stop-loss level, at which point the bias flips or neutralizing protocols take over.
🎨 Visual Guide
● Chart Elements
• Candidate Lines
Dashed Red Lines indicate the support floor of a localized top. Dashed Green Lines indicate the resistance ceiling of a localized bottom. These project forward to show the exact price level that must be broken.
• Signal Markers
When a structural shift is validated, a solid Red Triangle appears above the bar for a bearish shift (labeled "BEAR"), and a solid Green Triangle appears below the bar for a bullish shift (labeled "BULL"). Small "+" cross icons appear for continuation signals where the trend is reinforced.
• Trade Projection Lines
A solid Red Line marks the calculated Stop Loss level. A dashed Blue Line marks the exact Entry Price. Dashed Teal Lines of varying opacities mark Take Profit 1 (TP1), Take Profit 2 (TP2), and Take Profit 3 (TP3).
• Zonal Fills
A semi-transparent Red Background fill connects the Entry line to the Stop Loss line, visually representing the initial capital risk. A semi-transparent Green Background fill connects the Entry line to the final TP3 line, representing the total projected reward zone.
• Heatmap Candles
The indicator takes control of the underlying candlestick colors to reflect the current structural bias. Deep Teal candles indicate an active bullish trend, Deep Red candles indicate an active bearish trend, and Gray candles indicate a neutral market state where structural direction is unresolved.
● Dashboard Readouts
A highly detailed heads-up display is rendered on the chart, featuring a dark background with bright, contrasting text. It provides rows of vital data including:
Last Signal and Trend State (e.g., HH-HL Up).
Candle Bias and a visual bar chart representing the Strength Score.
Confirmed Signal Count and Bars Since the Last Signal.
Active Position status, Entry Price, and Stop Loss Price.
Dynamic tick boxes for TP1, TP2, and TP3 displaying price levels and completion checkmarks.
Real-time Floating P/L (Profit/Loss) expressed in 'R' multiples.
Current ATR values and Volume vs Average visual bar meters.
Current state of Session and HTF filters.
📌 Note : the best way to resolve visual overlap is to navigate to the Object Tree and drag the indicator above the main chart layer, or simply hide the native candles in your chart settings.
📖 How to Use
● Signal Execution
Traders should monitor the formation of the dashed candidate lines. When a breakout occurs, do not act prematurely; wait for the candle to close (if "Confirm by Close" is active) and ensure the primary signal triangle prints. This confirms that all volume and volatility parameters have been met.
● Assessing Trade Quality
Immediately consult the dashboard's "Strength Score." Higher scores (e.g., above 75%) indicate robust volume participation and excellent higher timeframe alignment, making them higher probability setups. Lower scores may warrant reduced position sizing or skipping the setup entirely.
● Trade Management
Utilize the dynamically plotted lines to set limit orders and stop losses in your execution platform. As price reaches TP1 and TP2 (indicated by checkmarks on the dashboard), consider trailing the stop loss to breakeven or the next logical structure point. If the candle heatmap shifts to gray (neutral) before reaching targets, it may be a prudent early exit warning.
⚙️ Inputs and Settings
● Core Settings
Lookback: Defines the number of bars used to identify localized tops and bottoms. Higher values find macro structures; lower values find micro structures.
Confirm by Close: Toggles whether the breakout must be confirmed by the candle's closing price or just the wick.
ATR Len & ATR Break Mult: Controls the volatility buffer required to validate a breakout.
● Filters
Volume Confirm: Requires breakout volume to exceed the moving average multiplied by the "Vol Spike Mult".
HTF Confluence: Restricts signals to those that align with the high/low structure of the user-defined Higher Timeframe.
Session Filter: Restricts signal generation to a specific daily time window (e.g., standard market hours).
● Trade Tools
TP1, TP2, TP3 R:R: Defines the static Risk-to-Reward multipliers for the take profit targets.
SL ATR Buffer: Adds additional breathing room to the stop loss beyond the absolute structural pivot.
● Visuals & Dashboard
Allows the user to toggle the display of candidate lines, heatmaps, and the main data dashboard, as well as reposition the dashboard to any corner of the screen.
● Alerts
Customizable string inputs for JSON payload generation, allowing traders to map long, short, close, trail, and target-hit actions directly to automated execution systems.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
● Dow Theory and Structural Extremes
The foundational logic of this script is rooted in classical Dow Theory, which posits that a trend is defined by a sequence of higher highs and higher lows (bullish) or lower highs and lower lows (bearish). By mathematically indexing `highestbars` and `lowestbars`, the script algorithmically isolates these fractal extremes, stripping away subjective human interpretation of market swings.
● Volatility-Normalized Breakout Thresholds
Financial markets are noisy, characterized by frequent false breaks (liquidity sweeps). This indicator employs Average True Range (ATR), a metric developed by J. Welles Wilder, to normalize the breakout threshold against current market volatility. By requiring price to exceed a structural level by a factor of the ATR, the algorithm relies on statistical significance—demanding that the breakout possesses enough standard deviations of momentum to be classified as a genuine shift in supply and demand, rather than random market drift.
● Volume Participation Theory
Drawing on Volume Price Trend (VPT) mechanics, the algorithm recognizes that price movement without volume is highly suspect. The implementation of a volume moving average filter ensures that structural breaks are validated by a true influx of market participation, confirming that the imbalance between buyers and sellers is robust enough to sustain a new directional vector.
● Automated Expected Value (EV) Projection
By mechanically tying the entry price to a mathematically defined stop-loss, and extrapolating predetermined Risk-to-Reward targets, the script enforces strict expected value mechanics. This removes emotional profit-taking, ensuring that winning trades scale out at mathematically optimal R-multiples (e.g., 1R, 2R, 3R), aligning the trader's execution with positive expectancy mathematical models over a large sample size of trades.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicateur

Liquidity Entry Signals [MarkitTick]💡 A comprehensive, multi-faceted approach to identifying potential market reversals based on classic liquidity sweep mechanics. By scanning for instances where price briefly breaches a significant structural high or low before immediately rejecting and closing back within the range, this tool highlights areas where trap-based price dynamics may be in play. It is designed to offer a complete trading framework rather than just a simple signal, integrating dynamic stop-loss and take-profit plotting, real-time advanced dashboard analytics, and comprehensive alert payloads. This indicator assists in bridging the gap between raw price action analysis and structured trade management.
● ✨ Originality and Utility
Many basic technical indicators simply look for higher highs or lower lows without assessing the quality of the rejection. This script elevates that concept by requiring strict closing conditions to validate a sweep. What truly sets it apart is its integration of multiple intelligent filters. Rather than relying on price action alone, users can mandate that sweeps align with the prevailing trend, occur during periods of sufficient volatility, and are backed by relative volume strength.
Additionally, the built-in risk management visualizations automatically calculate position risk parameters right on the chart. By projecting stop-loss and take-profit levels based on current volatility, it transforms a static signal into an actionable trade plan. The inclusion of dynamic JSON payload generation for alerts also makes this an incredibly versatile tool for those looking to automate their execution through third-party platforms.
● 🔬 Methodology and Concepts
The core logic of this script is built around the concept of a liquidity sweep, verified through price action closes, and filtered through statistical market conditions.
Bullish Sweep: The script continuously calculates the lowest low over a user-defined lookback window. A valid bullish signal occurs when the current bar's lowest price penetrates this recent low, but the closing price decisively reclaims it by closing higher than the structural low and higher than its own open.
Bearish Sweep: Conversely, the script identifies the highest high over the recent lookback period. If the current bar's high breaches this level, but the close falls below the recent high and below its own open, a short signal is triggered.
Trend Filtration: The indicator uses a Simple Moving Average (SMA) on both the current chart and a selected higher timeframe to establish a directional bias. Signals that conflict with these moving average baselines are suppressed to prevent counter-trend trading.
Volatility and Volume Analysis: The script evaluates the Average True Range (ATR) as a percentage of the current closing price to ensure sufficient market movement is present. It also compares the current volume to a standard moving average of volume, filtering out setups that lack participation.
● 🎨 Visual Guide
The script draws extensive visual overlays to assist in real-time decision-making and trade management.
• Signal Labels
When a valid sweep occurs, an "LS" label is plotted. Green labels positioned below the candle indicate bullish setups, while red labels above indicate bearish setups.
• Trade Execution Lines
Upon a signal, the indicator projects trade management lines directly on the chart for the next 50 bars.
Entry Line: A dashed blue line marking the closing price of the signal bar.
Stop Loss (SL): A solid red line placed away from the entry, calculated based on the ATR multiplied by the user's risk factor.
Take Profit (TP): Three dashed teal lines representing Take Profit 1, 2, and 3. These are calculated using specific Risk-to-Reward multiples of the stop-loss distance.
• Risk and Reward Zones
Semi-transparent colored fills visually separate the trade zones. A red fill highlights the risk zone between the entry and the stop loss, while a teal fill highlights the reward zone extending from the entry to the final take-profit level.
• Advanced Dashboard
A multi-row informational table appears in the selected corner of the chart. This dashboard provides a real-time status check of the prevailing trend bias, the number of bars since the last signal, exact entry/SL/TP price levels, current ATR, and visual progress bars for volatility and signal cooldown periods.
● 📖 How to Use
Traders can utilize this script as a complete top-down methodology for analyzing market structure. First, observe the dashboard to confirm that the current market environment aligns with your desired filters (e.g., ensuring the higher timeframe trend is supportive and volume thresholds are met).
When a valid "LS" label appears on the chart, immediately note the projected Entry, Stop Loss, and Take Profit lines. The dashed blue line serves as your reference for a potential entry point. You can calculate your position sizing based on the fixed distance between this blue Entry line and the solid red Stop Loss line.
The three Take Profit levels allow for a tiered approach to trade management, enabling partial profit-taking as the price advances in your favor. Advanced users can configure the custom string inputs to send highly detailed webhook payloads directly to execution platforms, passing the exact dynamically calculated price levels directly to their broker.
● ⚙️ Inputs and Settings
The script is highly customizable through categorized input groups, allowing adaptation to any asset class or timeframe.
• SMC Settings
Sweep Lookback: Defines the number of historical bars used to calculate the structural high and low points.
• Smart Filters
Trend Filter: Enables an SMA condition to dictate the allowed signal direction.
Volatility Filter: Requires the ATR to be a minimum percentage of the asset's price before a signal can fire.
Volume Filter: Demands that the current bar's volume exceeds a defined multiple of the volume moving average.
HTF Timeframe: Selects the specific higher timeframe used for long-term trend alignment.
Signal Cooldown: Prevents consecutive signals within a specified number of bars to reduce chart noise during extended consolidations.
• Trade Tools
SL ATR Mult: Determines the distance of the Stop Loss based on the current ATR, adjusting risk based on market volatility.
TP1 / TP2 / TP3 RR: Sets the specific Risk-to-Reward multiples for the three profit targets.
• Alerts
Action Strings: Customizable fields to inject specific commands into the JSON alert payloads for entries, exits, and partial take-profits.
● 🔍 Deconstruction of the Underlying Scientific and Academic Framework
From a market microstructure perspective, liquidity sweeps represent a temporary imbalance in supply and demand. In auction market theory, price frequently probes beyond established boundaries to test for the presence of resting orders. When price penetrates a historical extreme but fails to sustain value there—evidenced by the immediate reversal and closing within the prior range—it indicates an absorption of liquidity by counter-trend market participants. This exhaustion of directional momentum is a well-documented phenomenon in order flow analysis.
To normalize these price extensions, the indicator applies the Average True Range (ATR). Developed by J. Welles Wilder, the ATR provides a robust statistical measure of absolute price volatility, capturing gaps and limit moves that standard standard-deviation metrics might underrepresent. By tying the Stop Loss logic directly to the ATR, the indicator adapts to heteroskedasticity, which is the changing variance of asset returns over time. This ensures that risk parameters dynamically widen during highly volatile periods to prevent premature stop-outs, and contract during quiet phases to optimize capital efficiency.
Furthermore, the reliance on moving averages for trend and volume filtration applies fundamental time-series smoothing. This inherently mitigates the noise of high-frequency price fluctuations, ensuring that the localized microstructure event (the sweep) is aligned with the macro directional drift of the broader dataset.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicateur

ApexSignalPro SMC [ForexCracked]🔵 OVERVIEW
ApexSignalPro SMC is a confluence-scored Smart Money Concepts indicator that fires a signal only when multiple institutional footprints align on the same bar. Every signal carries a live score from 0 to 5 showing how many structural conditions agree — market structure, order blocks, fair value gaps, premium/discount location, and higher-timeframe bias.
Instead of the "every crossover is a signal" approach, it uses a strict confluence gate, a range-regime filter, and forced signal alternation — far fewer signals, much higher conviction. A live dashboard shows the score, active zones, and the last trade plan at a glance.
🔵 WHY THESE COMPONENTS ARE COMBINED
A break of structure alone, an order-block touch alone, or a single fair value gap all fire often and fail often. They become far more reliable when they occur together and agree with the higher-timeframe trend. Rather than overlaying five separate tools and leaving you to judge them, this script quantifies their agreement into one 0–5 score and only trades when enough align. Three principles guide it:
• Direction comes from market structure (BOS / CHoCH), not from price crossing smoothed averages
• Entries require confluence, never a single condition
• Signals alternate (BUY → SELL → BUY), never stacking the same direction in one leg
🔵 THE FIVE SCORED FACTORS (1 point each)
1️⃣ Market structure (BOS / CHoCH) points in the signal direction
2️⃣ Price is inside an unmitigated order block
3️⃣ Price is inside an unmitigated fair value gap
4️⃣ Correct half of the range — discount for longs, premium for shorts
5️⃣ Higher-timeframe EMA bias agrees
🔵 HOW A SIGNAL FIRES A BUY or SELL prints only when ALL of these are true:
• The confluence score meets your minimum (default 3 of 5)
• A strong-bodied candle closes in that direction
• The ADX regime filter confirms trending, not ranging
• The signal is opposite the previous one (forced alternation) Each signal draws Entry, Stop (beyond the nearest order block + ATR buffer), and Take Profit (configurable R:R), with pip labels.
🔵 HOW IT READS THE MARKET
• Market structure — confirmed swing pivots; a close beyond the last pivot is a BOS, the first break against structure is a CHoCH that flips the state
• Order blocks — the last opposing candle before an impulsive displacement (body > 1.2× ATR); tracked until mitigated or aged out
• Fair value gaps — three-candle imbalances filtered by a minimum ATR size; removed when filled
• Premium / discount — the swing-range midpoint splits discount (below) from premium (above) • Regime — ADX must exceed your minimum, suppressing signals in flat ranges
🔵 HOW TO USE
• Favour score 4–5 signals; treat score 3 with extra confirmation
• Require the dashboard HTF bias to match the signal for trend-aligned entries
• Use retests of unmitigated OBs or FVGs in the trend direction as continuation entries
• Size each trade off the drawn stop distance at a fixed account risk
• Raise Min Confluences to 4 for fewer, stronger signals
🔵 RECOMMENDED SETTINGS
• Swing Length: 5
• Higher Timeframe: 240 (H4) on H1 charts, D on H4 charts
• HTF EMA: 50 · OB Max Age: 20 · FVG Min Size: 0.3× ATR
• ADX Min: 22 · Min Confluences: 3 · SL Buffer: 0.5× ATR · R:R: 2.0
🔵 BEST / WEAKEST CONDITIONS ✅ Trending majors, gold, and indices on H1–H4; London / New York overlap ⚠️ Low-volatility ranges, gapped markets, and sub-5-minute noise
⚠️ DISCLAIMER ApexSignalPro SMC structures signals from Smart Money Concepts. It does not predict future price movement. Results depend on market conditions, settings, and your own execution and risk management. Shared for educational and research purposes; not financial advice. Indicateur

Smart Money Concept [martineye15]Smart Money Concepts Toolkit — an all-in-one Smart Money / ICT overlay that auto-detects and draws the core concepts on any symbol and timeframe, then ties them together with a multi-factor confluence filter and a built-in risk:reward trade planner.
WHAT IT DRAWS
- Market structure: swing pivots labelled HH / HL / LH / LL, with Break of Structure (BOS, continuation) and Change of Character (CHoCH, first counter-trend break) and a persistent trend state. An optional faster "internal" structure stream can run alongside the major one.
- Liquidity: Equal Highs / Lows (EQH / EQL) detected within an ATR-based tolerance, plus liquidity sweeps / stop hunts (a wick beyond a prior swing that closes back inside).
- Order blocks: the last opposite-colour candle before a structural break, extended until mitigated. Choose Touch or Close mitigation, wick or body range, swing or internal origin, and optional breaker blocks.
- Fair value gaps: 3-candle imbalances, extended until filled, with Touch or Close fill logic and an option to keep only unfilled gaps.
- Premium / discount: dynamic zones from the current dealing range with a 50% equilibrium line and an optional OTE band (0.62-0.79).
- Sessions / kill zones: optional Asia / London / New York shading with a configurable timezone and session times.
CONFLUENCE ENGINE (optional)
A discreet long/short marker that prints only when the factors YOU enable all agree - any combination of: price in discount/premium, a BOS/CHoCH in the trade direction, an unmitigated order block, an unfilled FVG, an opposing liquidity sweep, and higher-timeframe bias alignment via an HTF EMA. A recency window controls how fresh an event must be to still count. Signals evaluate on bar close and only on the first bar the conditions are met, so they do not spam or flip intrabar.
TRADE SETUP (Risk:Reward)
When enabled, each confluence signal draws a full plan: an entry (market at the signal close, or a limit at the order-block midpoint), a stop anchored to the order block / swing point / ATR that would invalidate the idea (plus an ATR buffer), and TP1 to TP4 placed at your chosen R multiples. Levels project forward and the lines are draggable, so you can fine-tune the plan by hand.
ALERTS
Ready-made alerts for BOS, CHoCH, new bullish/bearish order block, new bullish/bearish FVG, liquidity sweep, and confluence long/short.
HOW TO USE
Add it to a standard candlestick chart. Read the market with structure, liquidity and premium/discount; use order blocks and fair value gaps as areas of interest; then, if you want a filter, enable the confluence engine and turn on only the factors that fit your approach. Enable the trade setup to auto-draw a structure-anchored R:R plan on each signal, and set alerts on the events you care about. Every module toggles independently, so you can keep the chart as clean or as detailed as you like.
WHAT MAKES IT DIFFERENT
Instead of isolating a single SMC concept, it unifies structure, liquidity, order blocks, FVGs, premium/discount and session timing, and adds two things on top: a configurable confluence filter that only signals when multiple user-chosen factors align, and an integrated R:R planner that anchors the stop to the actual level that invalidates the trade and projects targets by R multiple.
REPAINTING & LIMITATIONS
All structural logic is based on confirmed pivots and closed candles; fair value gaps are committed only on a confirmed bar; the higher-timeframe bias uses the previous closed HTF bar. Pivots appear after their lookback (the normal pivot lag), which is not repainting. Live drawings such as order blocks and premium/discount zones update as the current, unclosed bar develops and as new pivots confirm; this is expected behaviour, not a change to confirmed history.
This is a visual, decision-support tool. It is not a strategy, it produces no orders or performance statistics, and it is not financial advice. Indicateur

Cumulative Rejection Heatmap [MarkitTick]💡 This advanced visual analytics tool is designed to track, aggregate, and display price rejection zones over a rolling historical window. By focusing entirely on market wicks—the footprints of supply and demand absorption—this script constructs a dynamic heatmap that highlights where price has repeatedly struggled to close. Instead of simply looking at volume or closing prices, it isolates the exact microscopic levels where buyers and sellers have historically stepped in to reverse the momentum, providing a crystal-clear map of underlying market mechanics.
● ✨ Originality and Utility
Traditional technical analysis often relies on closing prices or volume-at-price concepts like the Volume Profile. While valuable, these standard tools can sometimes obscure the specific price extremes where true order absorption occurs. This tool takes an entirely original approach by creating a "Rejection Profile."
It systematically scans every single bar within a defined historical window, mathematically measures the length of the upper and lower wicks, and compares them against the total range of the bar. When a wick meets a stringent, user-defined threshold, it is classified as a valid rejection. Over time, these individual rejection events are accumulated into specific price bins, forming a dense, visual heatmap.
The utility here is unparalleled for traders who rely on price action and liquidity concepts. By rendering a visual concentration of wicks, the chart immediately reveals hidden support and resistance walls that might not be evident through standard line-drawing techniques. It removes subjectivity from the process, mathematically proving where the market is consistently refusing to allow price to travel.
● 🔬 Methodology and Concepts
The core engine of this script relies on a rolling matrix computation combined with strict volatility filtering. The methodology can be broken down into several distinct logical phases:
Volatility Filtering: Before any rejection is considered, the script measures the current bar's true range against a fraction of the Average True Range (ATR). If the bar's range is too small, it is deemed market noise or chop, and is entirely ignored. This prevents tight, low-volatility consolidation from falsely inflating the rejection heatmap.
Wick Ratio Calculation: For valid bars, the script calculates the exact length of the upper wick (High minus the maximum of Open/Close) and the lower wick (minimum of Open/Close minus Low). This value is divided by the total bar range. If this ratio exceeds the minimum wick ratio threshold, a rejection event is triggered.
Price Discretization (Binning): The script continuously tracks the highest high and lowest low of the entire lookback window. It divides this total vertical price space into a user-defined number of equal-sized bins.
Rolling Matrix Accumulation: Using an advanced matrix data structure, the script logs each rejection event into its corresponding price bin. As the lookback window rolls forward in time, the oldest data is systematically overwritten by the newest data. This ensures the heatmap is constantly adapting to current market conditions without retaining stale historical data that is no longer relevant.
● 🎨 Visual Guide
The script overlays multiple layers of visual intelligence directly onto the main price chart, designed to be quickly readable without cluttering the workspace.
• The Rejection Heatmap
Projected forward from current price action, a series of horizontal boxes forms the heatmap. The vertical height of each box represents a specific price bin, while the color intensity indicates the density of rejections within that bin. Colors transition dynamically using a custom gradient. Areas with little to no rejection remain dark and transparent, while areas of extreme rejection light up in high-contrast neon tones. Each box contains a subtle text label displaying the exact number of rejection hits and its percentage relative to the most rejected level.
• Support and Resistance (S/R) Lines
The script automatically identifies the top bins with the absolute highest concentration of historical rejections. It projects dashed horizontal lines across the chart at the exact center of these bins. These lines act as major, mathematically validated support and resistance levels, highlighted in a distinct, user-defined border color.
• Directional Triangles
When an immediate price rejection occurs on the live chart, a small geometric shape is printed to alert the user:
A downward-pointing triangle above the bar indicates a significant upper wick rejection, signaling sudden selling pressure or supply absorption.
An upward-pointing triangle below the bar indicates a significant lower wick rejection, signaling sudden buying pressure or demand absorption.
• The Analytics Dashboard
A sleek, customizable table is anchored to a corner of the chart, providing a heads-up display of the current market state. It displays the active asset, the rolling window size, the current ATR, and the exact price level of the highest rejection density. Furthermore, it features a text-based ASCII progress bar showing the peak density relative to historical maximums, and a Bull/Bear Bias metric that calculates the exact ratio of upward versus downward rejections over the entire window.
● 📖 How to Use
Traders can integrate this visual framework into a variety of market approaches, primarily focusing on mean reversion, breakout confirmation, and precise risk management.
Identifying Liquidity Pools: The brightest zones on the heatmap represent areas where limit orders have historically absorbed market orders. Traders can use these glowing zones as highly probable target areas for taking profits, as price tends to gravitate toward and stall at heavy liquidity.
Validating Breakouts: If price breaks cleanly through a bright red, high-density rejection zone and closes beyond it, it indicates a significant shift in market structure. A zone that previously acted as a ceiling (supply) may now act as a floor (demand) upon a retest.
Stop Loss Placement: The automated S/R lines and high-density bins provide logical areas for stop-loss placement. Placing a stop just outside a heavy rejection bin ensures that the trade is only invalidated if the market successfully chews through a known area of heavy opposition.
Real-Time Execution: The live directional triangles can be used as immediate trigger signals when they align with the broader heatmap context. For example, an upward-pointing triangle printing exactly as price dips into a historically dense lower rejection bin provides a high-probability entry for a long position.
● ⚙️ Inputs and Settings
The script is highly customizable, allowing the user to tailor the mathematical sensitivity and visual output to their specific asset and timeframe.
• Heatmap Configuration
Window: The rolling lookback period. A larger window encompasses more macro price action, while a shorter window reacts faster to recent volatility.
Bins: Determines the vertical resolution. More bins create thinner, more granular price slices; fewer bins create wider, more generalized zones.
Min Wick Ratio: The strictness of the rejection criteria. A higher value (e.g., 0.60) requires the wick to make up at least 60% of the entire bar, filtering out weak signals.
Min Range (xATR): Filters out low-volatility bars to prevent tight consolidation from skewing the data.
Heatmap Width %: Controls how far the visual heatmap projects into the future on the right side of the chart.
• Dashboard and Visuals
Dashboard Pos: Anchors the analytics table to any corner of the chart to prevent obstruction of price action.
Top S/R Levels: Determines how many distinct dashed support/resistance lines are drawn based on the highest-ranking bins.
Use Neon Gradient: Toggles the dynamic color shading of the heatmap boxes.
• Alerts Configuration
Action Long / Action Short: Custom JSON string inputs that allow the user to format specific payloads for automated trading platforms or webhooks when a live rejection triangle prints.
● 🔍 Deconstruction of the Underlying Scientific and Academic Framework
At its academic core, this tool is heavily rooted in Auction Market Theory and the statistical discretization of continuous price variables. Auction Market Theory posits that financial markets exist solely to facilitate trade between buyers and sellers, constantly probing upward and downward to find areas of liquidity (fair value). When price extends too far and encounters a massive wall of limit orders, aggressive market orders are absorbed, and price is rapidly driven back in the opposite direction. On a candlestick chart, this aggressive absorption is permanently recorded as a wick.
By systematically isolating wicks, this script is effectively reconstructing the historical limit order book imbalance. It moves away from the continuous nature of time-series data and utilizes statistical binning—a process of dividing a continuous numerical range into discrete, non-overlapping intervals (bins). This is mathematically analogous to constructing a multidimensional probability density histogram.
The underlying matrix acts as a Markovian state tracker, where the probability of future price rejection at a specific interval is inferred from the historical density of prior absorptions within that exact same interval. The application of the Average True Range (ATR) as a high-pass volatility filter ensures that the statistical sample is robust, eliminating low-amplitude noise and focusing the mathematical weight strictly on statistically significant standard deviation expansions.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicateur

Optimal Trade Entry + Silver Bullet [Quantum Algo]Optimal Trade Entry + Silver Bullet
====================================================
🔶 OVERVIEW
Optimal Trade Entry + Silver Bullet is an automated ICT-style Fibonacci retracement engine that combines the Optimal Trade Entry (OTE) concept with the three Silver Bullet time windows. The indicator confirms market structure through swing highs and swing lows, detects a break of structure, automatically anchors a Fibonacci grid to the impulse leg, and highlights the 61.8% to 79% retracement zone — the Optimal Trade Entry zone — as a gradient that intensifies toward the 70.5% sweet spot. Every zone tap is graded with a transparent confluence score built from time-of-day windows, fair value gaps, and liquidity sweeps.
The goal is simple: remove the two biggest sources of error in discretionary Optimal Trade Entry trading — anchoring the Fibonacci retracement to the wrong leg, and taking entries outside the hours when the model statistically performs.
🔶 WHAT IS THE OPTIMAL TRADE ENTRY ZONE?
The Optimal Trade Entry is a smart money concept describing the discount (in an uptrend) or premium (in a downtrend) portion of an impulse leg where institutional participants typically complete their entries after a trend has been confirmed. It is defined as the area between the 61.8% and 79% Fibonacci retracement of the most recent impulse, with the 70.5% level acting as the statistical sweet spot. Price retracing into this zone after a break of structure offers a defined-risk entry: the stop belongs beyond the origin of the leg, and the targets project into the extension levels beyond the impulse extreme.
🔶 WHAT ARE THE SILVER BULLET WINDOWS?
The Silver Bullet model restricts trading to three specific one-hour windows in New York time, when algorithmic price delivery is most likely to seek liquidity and fill fair value gaps:
- London Open window — 03:00 to 04:00
- New York Morning window — 10:00 to 11:00
- New York Afternoon window — 14:00 to 15:00
This indicator shades each window on intraday charts, labels the window open, and treats window activity as a scoring input: an Optimal Trade Entry tap that occurs inside an active window grades higher than one that occurs outside it.
🔶 WHY THIS SCRIPT IS ORIGINAL
1. Pivot-and-shift automatic anchoring. The Fibonacci grid is never drawn from arbitrary pivots and never requires manual anchoring. It appears only after price closes through a confirmed swing point — a genuine break of structure — and anchors to the true origin of the impulse leg.
2. Dynamic leg stretching. While the trend continues printing new highs or new lows, the grid stretches with the market in real time, so the retracement zone is always measured against the current, mathematically complete leg — not a stale one.
3. Time-based signal qualification. The Silver Bullet windows are not decorative background shading. They are wired directly into the signal engine and the grading model, which is what separates this tool from a standard Fibonacci retracement indicator.
4. Transparent confluence grading. Every signal receives a grade of A+, A, B, or C based on four observable, verifiable conditions: entry zone tap, active Silver Bullet window, directional fair value gap formed inside a window on the current leg, and a liquidity sweep at the leg origin (the anchor pivot running the stops beyond the pivot before it). Nothing is hidden, nothing is repainted, and nothing is curve-fit.
🔶 HOW IT WORKS
Market structure engine: Swing highs and swing lows are confirmed with a symmetric pivot lookback. A candle close above the last confirmed swing high shifts the engine bullish; a close below the last confirmed swing low shifts it bearish. All signals are evaluated on closed bars only, so entries do not repaint.
Fibonacci retracement grid: On each break of structure the impulse leg is measured from the anchor pivot to the running extreme. The script plots the origin (1.0), equilibrium (0.5), the entry zone borders (0.618 and 0.79), the sweet spot (0.705, dotted), the impulse extreme (0.0), and two target extensions (default -0.27 and -0.62).
Entry zone gradient: The zone between 0.618 and 0.79 renders as four stacked slices whose opacity increases toward the 0.705 sweet spot, giving an immediate visual read of where the highest-probability fill sits.
Fair value gap engine: Three-candle imbalances that clear a minimum size threshold (measured against average true range) are boxed on the chart. By default only gaps forming inside an active Silver Bullet window are drawn, and every gap grays out automatically once price mitigates it, keeping the chart clean.
Liquidity sweep detection: When the anchor pivot of a new leg trades through the pivot before it — sell-side liquidity taken before a bullish leg, or buy-side liquidity taken before a bearish leg — the setup is flagged as a sweep and grades higher.
Trade plan projection: When price taps the entry zone and passes the active filters, the script prints a graded signal marker plus Entry, Stop (beyond the leg origin with an average-true-range buffer), Target One, and Target Two, each labeled with its exact price.
Dashboard: A compact panel tracks directional bias, live retracement percentage, entry zone status, sweet spot price, the active Silver Bullet window, fair value gap confluence count, and liquidity sweep status at a glance.
🔶 HOW TO USE IT
1. Apply the indicator to an intraday chart. One-minute to fifteen-minute timeframes suit the Silver Bullet windows best; the Fibonacci engine itself works on any timeframe.
2. Wait for the dashboard bias to flip after a break of structure.
3. Let price retrace. The dashboard shows the live retracement percentage as price approaches the Optimal Trade Entry zone.
4. The strongest setups tap the gradient inside an active Silver Bullet window after a liquidity sweep, with a fair value gap in the direction of the leg — that is the A+ profile.
5. Use the printed Entry, Stop, and Target levels as reference geometry, then apply your own position sizing and risk management.
6. Tighten or relax the engine with the two signal filters: Require Active Silver Bullet Window and Require Fair Value Gap Confluence.
🔶 SETTINGS
- Swing Detection Length — pivot lookback controlling structure size; higher values track larger legs.
- Completed Setups To Keep, Fair Value Gaps To Keep, Trade Plans To Keep — cap how many historical drawings remain, so the chart stays clean and the auto-scale stays anchored to current price.
- Independent toggles for each Silver Bullet window, the Fibonacci grid, the zone gradient, equilibrium, targets, and the dashboard.
- Fully customizable colors and dashboard position.
🔶 ALERTS
- Bullish Optimal Trade Entry — price tapped the bullish zone and passed the active filters.
- Bearish Optimal Trade Entry — price tapped the bearish zone and passed the active filters.
- Silver Bullet Window Opened — one of the three windows just began.
🔶 FREQUENTLY ASKED QUESTIONS
Does the indicator repaint? Entries are evaluated on closed bars only. Swing pivots require confirmation by design, which introduces intentional lag but keeps historical signals fixed.
Which markets does it work on? Any symbol with candle data — cryptocurrency, forex, gold, indices, stocks, and futures. The Silver Bullet windows reference New York time regardless of your chart timezone.
Which timeframe is best? The Silver Bullet windows require an intraday chart (sixty minutes or below). The one-minute to fifteen-minute range is the classic application; the Optimal Trade Entry engine alone also functions on higher timeframes.
What does the grade mean? It is a count of observable confluences (zone tap, window, gap, sweep) — a transparency tool, not a win-rate prediction.
🔶 LIMITATIONS
Pivot confirmation is intentionally delayed by the swing length, so the engine describes confirmed structure rather than predicting it. Retracements can exceed the zone and invalidate the leg during strong counter-moves. Grades measure confluence, not probability of profit. No indicator replaces independent analysis.
🔶 DISCLAIMER
This script is provided strictly for educational and informational purposes. It is not financial advice, an investment recommendation, or a solicitation to buy or sell any financial instrument. Past behavior of any level, time window, or signal does not guarantee future results. Trading involves substantial risk. Always do your own research and manage risk independently. Indicateur

Liquidity Sweep & Absorption Reversal Engine [PhenLabs]📊 Liquidity Sweep & Absorption Reversal Engine
Version: PineScript™ v6
📌 Description
The Liquidity Sweep & Absorption Reversal Engine (LSA Engine) is a two-stage reversal tool that separates high-probability liquidity stop-runs from the noise of ordinary breakouts. Most sweep indicators fire the moment price pokes through a swing high or low — the LSA Engine refuses to commit until that sweep is confirmed by genuine institutional absorption.
The problem it solves is simple but expensive: not every wick beyond a prior high or low is a smart-money stop hunt. Many are clean breakouts that keep going. By requiring a volume spike paired with a disproportionately small body (volume that failed to displace price), the engine filters for the specific fingerprint of absorbed liquidity — the moment resting orders are consumed and price is rejected. Only then does it flag a reversal and project the opposing draw.
The result is a clean, dashboard-backed overlay that gives smart-money, ICT, and intraday reversal traders a single source of truth for swept liquidity, absorption status, and the next untaken pool — without the false-signal storm of a raw sweep detector.
🚀 Points of Innovation
Two-stage validation that pairs a liquidity sweep with a mandatory volume-absorption confirmation — sweeps without absorption are ignored, not flagged.
Absorption fingerprint defined quantitatively: a volume spike (≥ configurable multiple of average) and a body-to-range ratio below a tunable threshold, so “absorbed” means measured, not eyeballed.
Dual sweep triggers — a classic close-back-inside rejection or an ATR-scaled displacement break — letting traders tune to rejection-style or momentum-style sweeps on the same instrument.
Auto-projected opposing draw that targets the nearest untaken opposing liquidity pool, with a structure-based R-multiple fallback when no pool is in range.
Live dashboard reporting nearest BSL/SSL, volume-spike state, absorption state, and active trigger mode in real time.
Self-cleaning pool management — swept pools are retired so each level can only fire once, eliminating duplicate signals on the same stop-run.
🔧 Core Components
Liquidity Pool Engine: Detects confirmed pivot highs and lows and stores them as resting buy-side liquidity (BSL, above) and sell-side liquidity (SSL, below). A rolling buffer keeps only the most relevant active pools per side.
Sweep Detector: Monitors every active pool for a wick beyond its level, then validates the sweep using the selected trigger — close-back-inside rejection or ATR-scaled displacement.
Absorption Filter: On the sweeping bar, measures volume against its moving average and the candle’s body-to-range ratio. A spike with a small body = absorbed; this gate can be toggled on or off.
Projection Module: From each confirmed sweep extreme, projects a dotted target line to the nearest opposing pool or to an R-multiple measured from sweep risk, with a labeled price target.
Dashboard: A compact on-chart table reporting the nearest BSL/SSL, current volume-spike and absorption state, and the active sweep mode.
🔥 Key Features
Confirmed reversal signals: Bullish and bearish sweep-plus-absorption triangles fire only on two-stage-validated setups, reducing false stop-run signals.
Resting liquidity map: Dashed BSL/SSL lines show the live pools price is magnetically drawn to — so you always know where the next sweep is likely.
Quantitative absorption marker: A yellow circle flags the exact bar where volume spiked while price made minimal progress.
Projected opposing draw: A dotted line and labeled price target extend from each confirmed sweep to the next opposing pool or R-multiple objective.
Adaptive trigger mode: Switch between close-back-inside rejection and ATR displacement to match the instrument’s sweep behavior.
Live status dashboard: Nearest BSL/SSL, volume-spike state, absorption state, and mode at a glance.
Alerts: Separate alerts for bullish and bearish confirmed sweep-plus-absorption setups.
🎨 Visualization
Dashed BSL (teal) / SSL (red) lines: resting liquidity pools — price is drawn to these; a sweep of one is the setup precondition.
Yellow circle: marks the sweeping bar where a volume spike coincided with a small body — the absorption fingerprint.
Red triangle (BEAR SWEEP) / teal triangle (BULL SWEEP): the confirmed two-stage reversal signal, plotted above/below the triggering bar.
Dotted target line + price label: the projected opposing draw from the sweep extreme to the next pool or R-multiple target.
Volume pane + vol-avg line: optional context showing the spike that powered the absorption call.
Dashboard panel (top-right): nearest BSL/SSL, Vol Spike, Absorption, and Mode cells.
📖 Usage Guidelines
Structure & Liquidity
Pivot Lookback (L/R) — Default: 8 — Range: 2–50 — Left/right bars used to confirm swing highs and lows. Higher = fewer, more significant pools; lower = more reactive pools.
Max Active Pools / Side — Default: 6 — Range: 2–20 — How many BSL/SSL levels are tracked per side. More pools = denser map; fewer = cleaner chart.
Sweep Trigger — Default: Close Back Inside — Options: Close Back Inside / Displacement Break. “Close Back Inside” flags sweeps rejected back under/over the pool (reversal bias). “Displacement Break” flags sweeps that close beyond the pool by an ATR-scaled margin (momentum sweep bias).
Displacement (× ATR) — Default: 1.2 — Range: 0.1–10 — Only active in Displacement Break mode; sets how far beyond the pool close must travel to qualify.
Absorption Filter
Require Absorption Confirmation — Default: true — When on, sweeps must pass the absorption gate to fire a signal. Turn off for raw sweep detection.
Volume Spike (× avg) — Default: 1.6 — Range: 1.0–10 — Minimum volume-to-average ratio on the sweeping bar. Higher = stricter, fewer but higher-quality signals.
Max Body/Range — Default: 0.45 — Range: 0.05–0.9 — Maximum body-to-range ratio for a bar to count as absorbed. Lower = stricter (volume absorbed with little progress).
Volume SMA Length — Default: 20 — Range: 1–200 — Lookback for the volume average baseline.
Targets & Projection
Target R-Multiple — Default: 2.0 — Range: 0.5–20 — Reward multiple used when projecting R-multiple targets.
Show Projected Draw — Default: true — Toggles the dotted target line and price label.
Target Type — Default: Opposing Pool — Options: Opposing Pool / R-Multiple. “Opposing Pool” targets the nearest untaken opposite liquidity; “R-Multiple” targets a fixed multiple of sweep risk.
Visuals
Show Dashboard — Default: true — Toggles the on-chart status panel.
Signal / pool colors — configurable for bullish, bearish, BSL, and SSL elements.
✅ Best Use Cases
Smart-money / ICT traders hunting confirmed stop-runs on session highs and lows
Intraday reversal and fade traders on indices, futures, crypto, and major FX
Scalpers who need a fast, visual read on whether a sweep is being absorbed or extending
Liquidity traders who map BSL/SSL and want the next opposing draw projected automatically
Traders who want to filter breakout-vs-sweep ambiguity with a quantitative absorption gate
⚠️ Limitations
Absorption relies on volume data; symbols with no/low-quality volume (some FX feeds) will produce fewer or weaker confirmations.
The body-to-range absorption proxy is an approximation of true order-flow absorption; for delta-grade accuracy pair with a volume-profile/delta source.
Pivots confirm pivotLen bars after the swing, so pool levels are retrospective — recent extremes may not yet be registered as pools.
Reversal signals perform best in ranging and liquidity-driven regimes; in strong trending regimes swept levels often continue, so bias signals toward the prevailing trend.
Like all reversal tools, signals are probabilistic — always manage risk and confirm with broader market structure.
💡 What Makes This Unique
Absorption as the second stage: Most sweep tools stop at “price went beyond the level.” The LSA Engine demands the institutional fingerprint — volume that failed to move price — before any signal fires.
Measured, not eyeballed: Absorption is a tunable volume-spike × body/range rule, so the filter is reproducible and adjustable per instrument, not a discretionary call.
Self-cleaning pools + auto opposing draw: each pool fires once and projects its own target, giving a complete sweep-to-draw narrative on the chart.
🔬 How It Works
Pool registration: Confirmed swing highs and lows are recorded as resting BSL and SSL pools in a rolling buffer, so the chart always shows the liquidity price is drawn toward.
Sweep detection: Each bar, the engine checks whether price wicked beyond an active pool and validates it with the selected trigger — a close back inside the pool (rejection) or an ATR-scaled displacement close beyond it.
Absorption gating: On the sweeping bar, volume is compared to its moving average and the body is compared to the bar’s range. A spike with a small body passes the absorption gate — the signature of consumed resting liquidity that failed to displace price. Swept pools are then retired.
Signal + projection: A confirmed sweep-plus-absorption prints a directional signal and projects a dotted target to the nearest opposing pool (or an R-multiple objective), while the dashboard updates nearest pools, volume-spike, and absorption state in real time.
💡 Note: For best results, tune Volume Spike and Max Body/Range to your instrument’s typical volume profile — FX and crypto often need a higher spike multiple than index futures. Favor signals aligned with the higher-timeframe trend, and use Opposing Pool targets on ranging instruments and R-Multiple targets on trending ones. This tool is an analytical aid, not financial advice.
Indicateur

True Time Price Profile - Hybrid Dynamic Bins[ALT_analyst]True Time Price Profile - Hybrid Dynamic Bins
◆ NOTICE / DISCLAIMER
This architecture is NOT a standard Volume Profile (VP) or a conventional Time Price Opportunity (TPO) indicator.
It is a highly advanced, multi-variable structural density engine.
It was specifically designed to mathematically extract institutional defense lines and localized price absorption in environments lacking reliable tick volume (e.g., Forex, CFD, Indices),
functioning as a rigorous technical benchmark for supply/demand extraction.
◆ EXECUTIVE SUMMARY
This script is deployed as a Proof of Concept (PoC) to demonstrate the integration of price absorption, time-based variance,
and strict pro-rata energy distribution within a localized UI rendering environment.
By discarding standard aggregation methods, this open-source architecture isolates the true "quality" of price stagnation,
exposing anomalous market states where large capital defends specific price buckets.
◆ ARCHITECTURE & QUANTITATIVE LOGIC
Standard profiles often struggle because they cannot distinguish between a "rapid vacuum passing" and a "defended consolidation."
This engine utilizes three proprietary layers to resolve this logic gap:
Pro-Rata Energy Distribution Engine
To prevent large-range bars (e.g., sudden momentum spikes) from artificially inflating the profile score across empty price vacuums, this script enforces a strict pro-rata allocation matrix.
Let N_bins be the total number of price bins a single bar intersects.
The assigned value for each specific bin is calculated as:
Apportioned Value = Base Value / N_bins
This completely neutralizes vacuum zones, correctly assigning mass only to true areas of conflict.
Velocity & Acceleration (Absorption) Evaluator
Instead of counting volume, the script measures the deceleration of price action.
It compares the high-low range of the current bar (v_curr) against the previous bar (v_prev). A negative acceleration (accel < 0) indicates kinetic energy is being absorbed by limit orders.
This absolute delta is extracted as the base absorption value (|a|).
Time Variance Logic (Market Memory)
A price level tested multiple times over a prolonged period holds significantly more structural integrity than a level tested only once.
The engine applies the statistical variance of the normalized time index (t) to scale the localized importance of a bin:
Variance (σ²) = (Sum of t² / n) - (Average t)²
The final Hybrid Score is the integration of absorbed energy scaled by the logarithmic variance:
Score = Sum( |a| * ln(1 + σ²) )
◆ PRACTICAL APPLICATION: HOW TO TRADE WITH THIS ENGINE
Instead of blindly treating every high-volume node as support/resistance, utilize this engine to identify Structural Friction:
Locating Hidden Institutional Limits:
Bins with exceptionally high Hybrid Scores often act as heavy liquidity pools.
Price action will typically stall or reverse sharply upon re-entering these zones.
Breakout Validation:
If price breaks out of a Value Area (VA) without generating new high-score bins, it indicates a lack of limit-order resistance (a vacuum).
These moves are prone to rapid continuation or swift mean-reversion sweeps.
Cross-Session Node Alignment (Breakout Threshold):
By anchoring the profile to short, sequential sessions, observe if high-scoring nodes (POCs) align horizontally at the same price level across multiple independent profiles.
This structural anomaly signifies a massive, sustained accumulation of limit orders.
A decisive price breach of this specific alignment typically triggers a high-probability volatility breakout, as the defended liquidity pool is rapidly consumed.
◆ SYSTEM CAPABILITIES AND LIMITATIONS
Visual Synthesis of Invisible Nodes:
Resolves precise support/resistance vectors purely from price action kinetics, independent of broker volume feeds.
Dynamic Resolution Scaling:
The bin size is strictly tethered to the Average True Range (ATR), ensuring the profile grid automatically calibrates to the underlying asset's volatility regime.
Limitations & Warnings:
TradingView enforces a strict cap of 500 max boxes/lines per indicator. To prevent script execution limits or array errors, the maximum lookback and bin count are dynamically capped.
Furthermore, if the scaled ATR drops to absolute zero, the geometric grid cannot initialize.
◆ INPUT PARAMETERS REFERENCE
Live Update Frequency:
Toggle between 'Update on Every Tick' and 'Update on Bar Close'.
CRITICAL WARNING: Using tick updates combined with multiple MTF arrays on a fast timeframe will cause localized UI lag. Use 'Bar Close' as a CPU saver.
Profile Calculation Mode:
Select 'Classic' for standard aggregation, or 'Hybrid' to engage the Absorption + Variance matrix (The core edge of this tool).
Grid Step Multiplier:
Lower values increase vertical resolution.
Warning: Values below 0.05 on high-volatility assets may trigger the 500-box rendering limit.
Show Debug Data Table:
Projects a live array matrix on the bottom right, displaying precise Price, Count, Absorption, Variance, and Hybrid Scores for absolute algorithmic transparency.
Indicateur

Elliott Wave Scanner [MarkitTick]💡 An automated structural analysis tool engineered to detect, classify, and visualize complex market cycles based on classic wave progression principles. By scanning localized price extrema and passing them through a rigorous matrix of geometric and proportion-based filters, this indicator distills highly subjective chart analysis into objective, rule-based pattern recognition. Designed for traders who rely on structured market phases, the scanner not only maps five-wave impulses and three-wave corrections but also integrates dynamic risk-to-reward calculations, volume confirmation, and higher-timeframe alignment to evaluate the probabilistic quality of every structural sequence it identifies.
✨ Originality and Utility
Wave theory is traditionally plagued by subjectivity and observer bias, where two analysts might map entirely different structures on the same chart. The utility of this script lies in its strict, algorithmic standardization. It removes emotional interpretation by requiring market swings to conform to precise mathematical tolerances before a sequence is validated.
This tool distinguishes itself by moving beyond mere drawing utilities. It is a complete analytical environment that actively assesses the viability of a market structure. It calculates a predefined Risk-to-Reward (R:R) ratio, establishes a clear target, and sets a protective invalidation level for every valid formation. Furthermore, it incorporates confluence filters—such as market structure midlines and higher-timeframe directional bias—ensuring that localized patterns are only presented when they align with the broader macroeconomic flow. This multifaceted approach provides a systematic, highly actionable framework rather than a simple visual overlay.
🔬 Methodology and Concepts
The core engine of this scanner is built upon the identification of sequential market pivots and the subsequent validation of their relationships through Fibonacci retracement and extension parameters.
• Algorithmic Pivot Detection
The script continuously monitors price action to identify localized peaks and troughs, referred to as Pivot Highs and Pivot Lows. A pivot is mathematically confirmed only when a central price point is surrounded by a user-defined number of lower highs (or higher lows) on both its left and right sides. This ensures that only significant market turning points are evaluated, filtering out intraday noise.
• Impulse Validation (1-2-3-4-5)
To confirm a five-wave impulse, the script isolates an alternating sequence of six confirmed pivots and applies strict proportional rules:
Wave 2 must retrace between 38.2% and 78.6% of Wave 1.
Wave 3 must extend beyond the terminus of Wave 1 and mathematically cannot be the shortest wave in the 1-3-5 sequence.
Wave 4 must retrace between 23.6% and 50.0% of Wave 3.
The script enforces an optional but standard rule where the extreme of Wave 4 must not overlap the extreme of Wave 1.
• Correction Validation (A-B-C)
For three-wave corrective structures, the engine isolates a sequence of four alternating pivots:
Wave B is required to retrace between 38.2% and 78.6% of the initial Wave A sequence.
Wave C must form a proportional extension of Wave A, operating strictly between the 61.8% and 161.8% boundaries.
• Structural Confirmation and PRZ
Once geometric rules are satisfied, the script calculates a Potential Reversal Zone (PRZ). For an impulse, the PRZ represents the logical termination area for Wave 5, derived by projecting 100% to 161.8% of Wave 1's magnitude outward from the origin of Wave 5. The entire sequence is then subjected to a Risk:Reward calculation, validating the pattern only if the theoretical trade setup meets the required profitability threshold.
🎨 Visual Guide
The indicator is designed to provide maximum data density without cluttering the charting environment.
• Structural Pathing
Valid Impulse waves are rendered using robust, continuous lines connecting the validated pivots, clearly demarcating the 1-2-3-4-5 progression. Corrective A-B-C structures are rendered in a distinctly contrasting color, providing immediate visual differentiation between trending and counter-trend market phases.
• Fibonacci Anchor Lines
Dotted horizontal projection lines extend outward from the Wave 4 terminus, visually indicating the 1.0x, 1.618x, and 2.618x Fibonacci extensions of Wave 1. These serve as dynamic targets for Wave 5 completion.
• Potential Reversal Zone (PRZ)
A shaded, transparent box is drawn at the culmination of the pattern. This box highlights the specific price region where harmonic and Fibonacci projections converge, signifying the highest probability area for the pattern's completion and subsequent market reversal.
• Trade Parameters
Upon pattern completion, three distinct dashed lines are projected forward on the chart:
An Entry line, anchored at the final wave's closing extreme.
A Stop line, calculated dynamically using an Average True Range (ATR) buffer applied to the penultimate structural pivot.
A Target line, mathematically derived from a 61.8% proportional measurement of the dominant impulsive wave.
• The Analytical Dashboard
A comprehensive data table anchors to the top right of the screen. This dashboard tracks real-time system metrics, including the prevailing market bias, the active pattern type, exact price levels for the generated trade parameters, and a dynamic Risk:Reward quality score visualized via an integrated block-bar system. It also tracks historical pattern frequency and individual wave magnitudes.
📖 How to Use
This script is engineered to act as an objective entry generation tool based on wave completion.
• Trading the Impulse W5
When the scanner identifies a validated 1-2-3-4 progression and projects the final Wave 5 into the PRZ box, traders should monitor price action within this shaded region. A rejection or stabilization within the PRZ, accompanied by the printing of the Entry, Stop, and Target dashed lines, signals a valid execution window. The structural stop-loss ensures that if the wave count is invalidated by overlapping previous structure, risk is immediately contained.
• Trading the A-B-C Correction
Corrective sequences are utilized to position into the resumption of the primary trend. When an A-B-C sequence completes, indicating that the counter-trend exhaustion has been reached, the system will output actionable levels targeting the previous macro swing high or low. Traders can utilize the volume confirmation toggle to ensure that the reversal away from the Wave C terminus is supported by institutional participation.
• Managing Pivot Delay
Because the indicator relies on confirmed pivots (requiring a set number of bars to close on the right side of the extreme), signals are generated only after the structural turning point is mathematically locked. Traders should view the generated Entry line as the execution threshold, waiting for price to retest or confidently cross this parameter rather than attempting to guess the absolute bottom or top of the raw price action.
⚙️ Inputs and Settings
The indicator offers deep modularity, allowing adaptation across different asset classes and timeframes.
• Pivot Configurations
Adjusting the Pivot Left and Pivot Right parameters alters the sensitivity of the extrema detection. Lower values yield aggressive, micro-wave tracking suitable for scalping, while higher values isolate macro-economic market cycles.
• Elliott Rules and Tolerances
The Fib Tolerance (%) input allows the user to expand or contract the leniency of the retracement measurements. The system also includes logical toggles to enforce strict structural laws, such as ensuring Wave 4 never overlaps Wave 1, or that Wave 3 must explicitly extend beyond Wave 1.
• Filter Systems
Traders can enforce a Higher Timeframe (HTF) Bias , ensuring the script only plots bullish waves when the macro trend is positive. A Volume Confirmation toggle is also available, suppressing signals if the momentum behind Wave 3 fails to breach the baseline volume moving average.
• Visual and Dashboard Toggles
Every graphical element, from the PRZ shading to the individual wave labels, can be toggled on or off to maintain chart hygiene. The dashboard can also be customized with specific text and background colors to fit any chart template.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
The foundational framework of this indicator is deeply rooted in fractal geometry and the statistical behavior of financial time series. Markets, much like natural phenomena, exhibit self-similarity across different scales—a concept heavily explored in the mathematics of fractional Brownian motion. This indicator applies this academic premise by assuming that macroeconomic trending phases (impulses) and mean-reverting phases (corrections) manifest in predictable, repeating geometric sequences, regardless of the timeframe observed.
At the core of the algorithm is the algorithmic isolation of local extrema. By utilizing a rolling array of historical price highs and lows, the engine establishes a localized topology of the market. This topology is then subjected to proportional analysis governed by the Fibonacci sequence, a mathematical series intimately connected to the golden ratio (1.618). In financial econometrics, these specific ratios function as a psychological boundary mechanism; because market participants aggregate their risk and take-profit parameters around these proportional extensions, they generate measurable zones of supply and demand clustering.
The script synthesizes these disciplines by requiring that the distance between consecutive topological extrema strictly conforms to these irrational proportions. By enforcing a rule set where localized wave measurements must divide into one another to produce specific golden ratio derivatives, the indicator successfully models the non-linear, oscillatory nature of crowd psychology and market liquidity into a rigid, computable output.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicateur

Price Action Bands | Trend & Volatility [RadixAlgo]🔶 About the Indicator
Price action often looks simple after the move is complete, but while the market is moving, traders usually need more context to understand whether price is trending, overextended, pulling back, or simply moving inside normal volatility. This price action indicator was built to make this context easier to read directly on the chart.
It combines a dynamic moving average baseline with upper and lower volatility bands, giving traders a structured way to follow trend direction, measure price extension, analyze volatility, and observe how price reacts around key dynamic support and resistance zones.
At the center of the indicator is a customizable trend baseline that can be calculated with different moving average types, including SMA, EMA, HMA, RMA, WMA, SWMA, and VWMA. The baseline changes color based on the current trend state, helping users distinguish bullish and bearish market conditions without adding unnecessary visual noise.
Around this baseline, the indicator plots adaptive volatility bands using either ATR or Standard Deviation. The upper red bands highlight areas where price may be extended to the upside, while the lower green bands show where price may be stretched to the downside.
This isn’t one of those indicators that tries to tell you exactly when to buy or sell. It’s more like a lens that helps you see what the market is actually doing in real time. Sometimes you’ll notice price hugging the bands during a strong trend, other times it drifts back toward the baseline after stretching too far.
That’s where the real insight comes from. You can tweak the moving average type, adjust how wide the bands are, or smooth things out depending on how fast or slow you like to read the chart. Whether you’re watching quick intraday moves or letting a swing trade develop over days, it naturally adapts to your style without forcing a rigid system on you.
🔶 How It Works
The logic behind Price Action Bands | Trend & Volatility starts with a dynamic trend baseline. This baseline is the central reference point of the indicator and acts as the main structure around which price action is interpreted.
Instead of forcing every market into one fixed moving average model, the indicator allows traders to choose between several moving average types, including SMA, EMA, HMA, RMA, WMA, SWMA, and VWMA.
Each one reads the market slightly differently. SMA provides a classic and balanced view of the average price, EMA reacts faster to recent price changes, HMA is smoother while still being responsive, RMA is useful for softer trend tracking, WMA gives more importance to recent candles, SWMA creates a smoother short-term baseline, and VWMA includes volume in the calculation, making it useful when traders want the trend line to reflect both price and trading activity.
After the baseline is calculated, the indicator compares it with a smoothed version of itself. This creates the trend state logic. When the baseline is positioned above its smoothed signal line, the market is treated as being in a bullish trend state, and the trend area is highlighted in blue.
When the baseline moves below the smoothed signal line, the market is treated as being in a bearish trend state, and the trend area is highlighted in orange. This does not mean that the indicator is generating automatic buy or sell signals. Instead, it gives traders a cleaner way to understand whether the current price action is aligned with bullish pressure or bearish pressure.
The second major part of the indicator is the volatility band system. Around the trend baseline, the script builds upper and lower bands that expand and contract based on market conditions. These bands can be calculated using either ATR or Standard Deviation. ATR measures the actual range of price movement and is useful for understanding how much the market is moving from candle to candle.
It is especially helpful in volatile markets, breakout phases, and fast price movements. Standard Deviation, on the other hand, measures how far the baseline or price behavior is spread from its average condition. This makes it useful for identifying statistical price extension, compression, and overextended market areas.
The indicator uses two band levels on each side of the baseline: inner bands and outer bands. The inner bands represent a moderate volatility zone, while the outer bands represent a more extreme price extension area. When price moves into the upper red bands, it shows that price is stretched above the trend baseline.
This can happen during strong bullish continuation, aggressive breakout movement, or an overextended upside condition. When price reaches the lower green bands, it shows that price is stretched below the trend baseline. This can appear during strong bearish continuation, downside volatility expansion, or an overextended sell-side move.
The upper and lower bands should not be read as simple overbought and oversold levels. This is where the indicator becomes more than just a basic band framework. Price can touch an upper band and continue higher if the trend is strong, or it can leave the upper band and return toward the baseline when momentum starts to fade.
The same logic applies to the lower bands. A move into the lower band can signal strong bearish pressure, but if price exits the band and begins moving back toward the baseline, traders may start watching for a possible reaction, correction, or mean-reversion move. The value comes from reading the relationship between price, the baseline, the trend state, and the volatility zones together.
In bullish conditions, traders usually focus on how price behaves around the blue trend baseline, the upper volatility bands, and pullbacks toward the central structure. A bullish market may show price holding above the baseline, reacting from it, or expanding toward the upper bands as volatility increases. In this environment, pullbacks toward the baseline can help traders evaluate whether the trend is still supported, while movement into the upper bands can show momentum expansion or price extension.
In bearish conditions, the logic is reversed. Traders watch how price behaves below the baseline, how it reacts around the orange trend state, and whether downside movement reaches the lower green bands. Pullbacks toward the baseline may act as areas where bearish pressure returns, while movement into the lower bands can show strong downside volatility or stretched price action.
Because the indicator does not place automatic signals on the chart, the trader remains responsible for interpreting the setup. A breakout, pullback, exit from band, or trend continuation condition is not defined by one single line touch. It is read through context: the color of the trend baseline, the position of price relative to the baseline, the distance between price and the bands, and the way candles react after entering or leaving a volatility zone. This makes the tool flexible for different strategies, including trend-following, breakout trading, pullback trading, volatility analysis, and mean-reversion analysis, while still keeping the chart visually clean.
🔶 Input Parameters
🔹Moving Average Type
Selects the moving average used as the main trend baseline. The available options are SMA, EMA, HMA, RMA, WMA, SWMA, and VWMA. Each moving average type reacts differently to price movement, so traders can choose the one that best matches their trading style.
🔹Moving Average Period
Defines the length of the moving average baseline. Higher values create a smoother and slower trend line, while lower values make the baseline react faster to recent price changes.
🔹Trend Smoothing Period
Controls the smoothing of the trend signal line. Lower values make the trend state more sensitive to changes, while higher values create a smoother and more stable trend reading.
🔹Band Method
Determines how the volatility bands are calculated. Traders can choose between ATR and Standard Deviation. ATR measures market range and movement, while Standard Deviation measures price dispersion around the baseline.
🔹ATR Period
Sets the lookback period for the ATR calculation. This option is active when the Band Method is set to ATR. A shorter period reacts faster to volatility changes, while a longer period creates a smoother volatility reading.
🔹Standard Deviation Period
Sets the lookback period for the Standard Deviation calculation. This option is active when the Band Method is set to Standard Deviation. It controls how price dispersion is measured for the volatility bands.
🔹Band Smoothing Period
Smooths the upper and lower bands to reduce short-term fluctuations. Higher values make the bands more stable, while lower values make them more responsive to recent market movement.
🔹Inner Band Multiplier
Controls the distance of the inner bands from the trend baseline. The inner bands represent the closer volatility zone and can help traders observe moderate price extension.
🔹Outer Band Multiplier
Controls the distance of the outer bands from the trend baseline. The outer bands represent a wider volatility zone and can help traders identify stronger price extension or more extreme market movement.
🔶 Summary
Price Action Bands | Trend & Volatility brings trend direction, price action analysis, and volatility bands into one clean chart-based framework. By combining a customizable moving average baseline with adaptive upper and lower bands, the indicator helps traders understand whether price is following the current trend, pulling back toward dynamic support and resistance, expanding with volatility, or moving into an overextended area. The colored trend baseline gives a quick view of bullish or bearish market conditions, while the ATR and Standard Deviation band methods allow the volatility zones to adapt to different market structures, trading styles, and timeframes.
This indicator is not designed to replace trader judgment with automatic buy and sell signals. Instead, it gives users a practical way to interpret trend-following setups, breakout conditions, pullback opportunities, exit-from-band behavior, mean-reversion zones, and volatility expansion directly on the chart. With flexible settings for moving average type, moving average period, trend smoothing, band method, band smoothing, and inner or outer band multipliers, Price Action Bands can be adjusted for scalping, intraday trading, swing trading, and broader market analysis while keeping the chart readable and focused on real price action.
Indicateur

Liquidity Map & Order Blocks [MQLSoftware]Liquidity Map & Order Blocks reads swing structure into a density map of where stop-liquidity rests, then projects which pool price is most likely drawn toward next. Equal highs and lows are grouped into bands whose brightness scales with a multi-factor Liquidity Score, sweeps mark where those pools were hunted, and a forward-looking model expresses the most likely draw as a self-calibrating historical hit-rate rather than a fixed number. A compact right-side panel adds chart and higher-timeframe structure, the net liquidity pull, the draw target, and pool counts.
This is a visual analytical tool intended for chart reading and liquidity mapping. It does not execute trades and does not provide financial advice. It does not generate buy or sell signals and makes no claim about profitability or win rate. The draw percentage describes how often similar pools were reached in the past over the loaded data; it is a descriptive statistic, not a prediction, and past behavior does not guarantee future results.
Key Features
Resting liquidity drawn as density bands from ATR-normalized clustering of equal highs and lows, so nearby levels merge into one pool instead of a stack of lines
Band brightness driven by a Liquidity Score that blends a saturating touch count, age decay, relative volume at the forming pivots, and rejection-wick depth
Draw on Liquidity projection: a directional arrow to the pool with the strongest modelled pull, muted automatically when the model's confidence is low
Draw percentage shown as a self-calibrating empirical hit-rate — how often pools of a similar profile were actually reached over the loaded history, marked provisional while the sample is thin
Sweep detection when price wicks beyond the last significant swing and closes back within it, with recent sweeps labelled and older ones marked compactly
Protected-swing structure engine marking Break of Structure and Change of Character, with an optional plain-language label mode
Order blocks drawn only when they originate a Break of Structure, plus an optional Fair Value Gap layer; both fade once mitigated
Multi-timeframe panel with chart and higher-timeframe bias, liquidity pull, draw target with its hit-rate, and pool counts, read non-repainting
Core Concept
Most liquidity and order-block tools on TradingView take one of two approaches. They either draw raw equal-high / equal-low lines and mark every order block and gap without ranking them, which clutters the chart and leaves the reader to judge which level matters, or they label structure (swings, breaks of structure) without projecting where liquidity is likely to pull price next. Both stop short of a scored, forward-looking read.
This indicator builds on a different base: cluster swing levels into scored density bands, gate order blocks by structure, and add a model for the next likely draw that is calibrated against realized history. It adds three specific algorithmic elements on top of that base.
1. ATR-Normalized Liquidity Clustering with a Multi-Factor Score. Swing highs and lows are not drawn as individual lines. They are grouped along the price axis by a clustering pass whose merge distance scales with ATR, so equal-ish levels collapse into a single pool and the behavior stays consistent across instruments. Each pool carries a Liquidity Score built multiplicatively from a saturating touch count, an age-decay term, relative volume at the forming pivots, and rejection-wick depth, so a band's brightness reflects how heavy and how fresh the resting liquidity is rather than only how many times the level was touched.
2. Draw on Liquidity Projection. Each unmitigated pool is treated as an attractor. Its pull is the product of its Liquidity Score, an exponential proximity kernel in ATR units, a structural prior that favors pools lying in the trend's continuation direction relative to current price, and a path-clearance term that discounts a pool when other strong pools sit between it and price. The strongest-pull pool is projected as the draw target, and the projection is deliberately muted when confidence is low, so a weak draw never reads like a strong one.
3. Self-Calibrating Empirical Hit-Rate. The draw percentage is not a fixed weight. Each draw is profiled into a bucket defined by Liquidity Score, distance, and structural alignment, and as the chart's history is processed the script records how often pools of that profile were actually reached within a configurable horizon. The displayed figure is the empirical reach frequency of that bucket, smoothed with a weak prior so thin samples are shown as provisional rather than over-read. It calibrates per symbol and timeframe with no fixed accuracy claim attached.
Anatomy of the Display
Liquidity bands are the horizontal zones spanning each pool, colored for buy-side (above) and sell-side (below) liquidity; the brighter a band, the higher its Liquidity Score. Swept pools dim to grey so a hunted level is visually retired.
The draw projection is the arrow from current price to the strongest-pull pool, with a price-side chip and an arrowhead pointing the modelled direction. Its weight scales with the hit-rate: a high-confidence draw is bold, a low-confidence one is thin and faded. The label reads the target level, the hit-rate (shown as a provisional `~NN% (n…)` while its sample is small), and whether the pool is buy-side or sell-side liquidity.
Sweeps mark a stop-hunt of the last significant swing: a wick beyond it that closes back within. The two most recent are labelled; older ones are compact marks so the chart stays clean.
Structure is drawn as Break of Structure and Change of Character lines from a protected-swing state machine; a toggle renders these in plain language (Trend break / Reversal) for readers new to the terminology.
Order blocks are the boxes drawn at the last opposite candle before a Break of Structure, so only structure-originating blocks appear; the optional Fair Value Gap layer marks three-candle imbalances aligned with the break. Both fade once price mitigates them.
The right-side panel lists chart structure, the net liquidity pull and its strength, the draw target with its hit-rate, pool counts per side, and a per-row higher-timeframe bias scan with a strength bar.
Multi-Timeframe Panel
The panel reads three higher timeframes of your choice for structural bias and trend strength, using the same protected-swing engine as the chart. Higher-timeframe values are read with `lookahead=barmerge.lookahead_off` and a one-bar offset, which is the standard non-repainting pattern for higher-timeframe context. A divergence between the chart's structure row and the liquidity pull is informative rather than contradictory: structure up while the draw points down with a high hit-rate, for example, frames an expected pullback toward a strong pool below.
Notes on Repainting
Confirmed liquidity pools, sweeps, structure breaks, and order blocks do not repaint. They are built from confirmed pivots (`ta.pivothigh` and `ta.pivotlow` with a right-bars parameter), so once committed they stay anchored.
Pivot detection has an inherent delay equal to the right-bars parameter (default 3 bars). The most recent swing is provisional until that many bars close past it. This is a property of all pivot-based indicators, not specific to this script.
The draw percentage is a learning statistic. It updates as the script accumulates observations over the loaded history. This is not a repaint of historical bars; the same bar can show a different figure when the chart is reloaded with a different amount of history, because more or fewer observations are available.
Mitigation is one-directional. Once an order block or gap is mitigated it stays marked as such.
Multi-timeframe panel data uses `lookahead=barmerge.lookahead_off` with a one-bar offset, the canonical non-repainting pattern for higher-timeframe context.
Alerts are gated by `barstate.isconfirmed` and fire once per closed bar, never intra-bar.
Typical Analysis Workflow
A common analytical workflow may include:
Reading the band map to see where the heaviest resting liquidity sits above and below price, with brighter bands as the higher-quality pools
Reading the draw projection as a hypothesis for where liquidity may pull price next, weighting it by its hit-rate and whether it aligns with structure
Noting sweeps as stop-hunts that often precede a move, and watching whether price reclaims or rejects the swept level
Treating order blocks as origin zones for the move that broke structure, and the panel's higher-timeframe rows as top-down context
Reading a structure-versus-pull divergence as a possible pullback rather than a contradiction, then managing any decision with other forms of analysis and risk management
Configuration
Structure Engine - ATR length, pivot left / right bars, and the swing filter that sets how significant a swing must be. Right Bars also sets the confirmation delay.
Liquidity Pools - lookback, cluster epsilon (how aggressively levels merge), minimum touches, age half-life, and whether volume contributes to the score.
Draw on Liquidity - proximity, structural prior strength, path clearance, the empirical-calibration toggle, and the calibration horizon.
Sweeps & Structure - sweep penetration, show sweeps, show structure, and the plain-language label toggle.
Order Blocks / FVG - show order blocks, show gaps, the order-block scan window, and the maximum number of boxes.
Visuals - colors for buy-side and sell-side liquidity, draw target, and structure, plus a minimum band height so pools read as bands rather than threads.
Multi-Timeframe HUD - show / hide the panel, the three higher timeframes, and panel position.
Markets and Timeframes
The indicator can be applied across multiple markets and timeframes:
Cryptocurrencies
Forex
Stocks and Indices
Commodities
Because the clustering distance, proximity kernel, and score are all ATR-based, the visual behavior stays consistent across instruments and timeframes. The volume component of the Liquidity Score contributes most on instruments with reliable volume (crypto, futures, equities) and falls back gracefully where volume is thin. The empirical hit-rate reads best on charts with enough history for its buckets to fill.
Alerts
Buy-side liquidity swept - fires when a buy-side pool's level is hunted
Sell-side liquidity swept - fires when a sell-side pool's level is hunted
Bullish Break of Structure - fires on a confirmed upside structure break
Bearish Break of Structure - fires on a confirmed downside structure break
All timeframes bullish - fires when every higher-timeframe row is bullish
All timeframes bearish - fires when every higher-timeframe row is bearish
All alerts evaluate on confirmed bars to avoid intra-bar oscillation. Indicateur

Session Liquidity Sweep Map [PhenLabs]📊 Session Liquidity Sweep Map
Version: PineScript™ v6
📌 Description
The Session Liquidity Sweep Map (SLSM) is a session-anchored liquidity engine that maps where resting orders accumulate around the Asia, London, and New York session extremes, then tracks the full life cycle of those pools from formation, to sweep, to structural confirmation. Rather than plotting static swing lines, SLSM treats each finalized session high and low as buy-side or sell-side liquidity and watches for the precise moment price raids that liquidity and rejects.
The indicator solves a core problem for intraday traders: distinguishing a genuine stop-run that leads to a reversal from a clean breakout that continues. By requiring a wick-rejection sweep to be followed by a market structure shift within a defined window, SLSM filters out unconfirmed pokes and only elevates sweeps that are validated by a CHoCH in the opposite direction.
Once a sweep is confirmed, SLSM projects the most logical opposing draw on liquidity and lays out structure-based R-multiple targets, giving you a complete read on where price came from and where it is likely being pulled next.
🚀 Points of Innovation
Full pool life-cycle state machine: Building → Complete → Swept → Awaiting MSS → Confirmed / no-MSS
Two-stage validation that pairs a wick-rejection sweep with a mandatory structure-shift confirmation
Dual sweep triggers: classic close-back-inside rejection or an ATR-scaled displacement break
Equal-high/low clustering that merges stacked liquidity into a single weighted pool
Confidence score blending rejection-wick quality, MSS speed, and displacement magnitude
Live dashboard surfacing the nearest untaken BSL above and SSL below current price
🔧 Core Components
Session Tracker: Builds developing highs/lows per session in a user-selected timezone and finalizes them into resting pools at session close
Pool Manager: Creates, clusters, caps, ages out, and visually fades liquidity pools to respect drawing-object limits
Sweep Engine: Flags a pool as swept when a confirmed bar penetrates it by the tick tolerance and rejects, or breaks it with displacement
MSS Validator: Watches the protected swing point and confirms the sweep on an opposite-direction close within the lookahead window
Projection Module: Plots the opposing draw and R-multiple targets measured from the sweep extreme
🔥 Key Features
Non-repainting logic: pools finalize at close, sweep/MSS evaluate only on confirmed bars, swings use right-anchored pivots
Configurable kill-zone shading that tints the background while each session is active
Equal-level clustering with an adjustable tick tolerance to keep the chart clean
Per-side pool cap that automatically removes the oldest untaken pool when limits are reached
Three discrete alerts: liquidity swept, sweep + MSS confirmed, and new opposing draw projected
🎨 Visualization
Liquidity Lines: Solid session-colored levels for live pools that fade and dash once swept
Sweep & MSS Labels: Directional sweep tags and a “MSS ✓” confirmation label with optional confidence score
Draw & Targets: A dotted opposing-draw line plus dashed R-multiple target lines from the sweep extreme
Dashboard: Per-session phase and high/low, with the nearest untaken BSL/SSL relative to price
📖 Usage Guidelines
Sessions
Session Windows (Asia/London/NY) — Default: 2000-0000 / 0200-0500 / 0930-1100 — Description: Defines each kill-zone in the chosen timezone; adjust to your instrument’s active hours
Kill-zone transparency — Default: 90 — Range: 50-99 — Description: Controls background tint intensity for active sessions
Sweep Detection
Penetration tolerance (ticks) — Default: 2 — Description: Minimum overshoot beyond a pool required to register a sweep
Require close back inside — Default: true — Description: Demands a wick-rejection close; the robust default
Displacement body x ATR — Default: 1.0 — Range: 0.2+ — Description: Body size relative to ATR for the alternative displacement trigger
MSS / Structure
Swing pivot length — Default: 5 — Range: 2+ — Description: Left/right strength for non-repainting swing detection
MSS lookahead (bars) — Default: 20 — Range: 3+ — Description: Bars allowed after a sweep for the structure break to confirm
✅ Best Use Cases
Intraday reversal trading off Asia/London/NY session stop-runs
ICT and Smart Money workflows centered on liquidity raids and CHoCH confirmation
Bias-building by reading the nearest untaken liquidity as the directional draw
Scalping and futures/index/crypto sessions with defined kill-zone windows
⚠️ Limitations
Performance depends on correct timezone and session-window configuration per instrument
The MSS lookahead window can expire on slow markets, leaving valid sweeps marked no-MSS
Designed for intraday timeframes; session anchoring is less meaningful on HTF charts
Confirmation introduces a deliberate lag versus the raw sweep, by design
💡 What Makes This Unique
Session-anchored pools rather than generic swing liquidity, tying liquidity to behavioral kill-zones
Mandatory two-stage sweep + MSS confirmation that suppresses unvalidated breakouts
An integrated draw-and-target projection that completes the from/to liquidity narrative
🔬 How It Works
1. Pool Formation
Each session tracks a developing high and low while active, then finalizes both as resting liquidity at close
Highs become buy-side liquidity (BSL) above; lows become sell-side liquidity (SSL) below
2. Sweep & Structure Shift
A confirmed bar must trade beyond a pool by the tolerance and close back inside, flipping it to “awaiting MSS”
An opposite-direction close through the protected swing within the lookahead confirms the sweep as tradable
3. Projection & Scoring
On confirmation, the nearest opposing pool is projected as the draw and R-targets are measured from the sweep extreme
A 0-100 confidence score weights rejection-wick quality, MSS speed, and displacement
💡 Note: SLSM is a non-repainting decision-support tool, not a signal-only system. Wait for the “MSS ✓” confirmation before acting on a sweep, and use the projected draw plus R-targets for trade management rather than entry timing alone. Indicateur

Falcon AI | FVG FinderFalcon AI — FVG Finder
A free educational overlay that detects Fair Value Gaps (FVGs) — one of the core patterns in Smart Money Concepts (SMC) / ICT methodology.
What's a Fair Value Gap? A 3-candle imbalance: an impulsive middle candle moves price so fast it leaves a gap between the first and third candles — a range that barely traded. Price often returns to "fill" these gaps before continuing.
What it shows
• Green box — Bullish FVG (gap below price)
• Red box — Bearish FVG (gap above price)
• "FVG" tag — a new gap just formed
• Faded box — the gap has been filled / mitigated
Settings
• Min Gap Size (% of price) — filter out small gaps; raise for fewer, cleaner FVGs
• Fill behavior — Fade, Remove, or Keep gaps once mitigated
• Optional session filter — only mark gaps during your hours
• Max FVGs to keep, colors, tags, info panel
How to use it
Add it to your chart (any market/timeframe; built with futures like MNQ in mind)
Watch for price to return to an unfilled FVG — many traders study these as areas of interest
Combine with your own structure read and bias — your entry, your stop, your risk management
This indicator does NOT place trades, does NOT backtest, and has no entry, stop, or position-sizing logic. It's an educational overlay for studying the Fair Value Gap pattern.
Disclaimer: Educational use only. Not financial advice. Past pattern formations do not guarantee future price behavior — these are pattern detections, not trade recommendations. Always use a stop loss and manage your own risk. Trading futures involves substantial risk of loss. Indicateur

Volume-Trend Order Block Engine [BigBeluga]Volume-Trend Order Block Engine is a powerful trading tool for TradingView. It combines trend direction with volume-weighted Order Blocks (OB) to show you exactly where institutional buyers and sellers are active in real time.
Instead of drawing basic support and resistance lines, this tool filters out market noise using a built-in **Supertrend Engine**. This ensures you only see order blocks that align with the main market trend. It also splits each block based on buy/sell volume, showing you who is in control.
🔵 MAIN FEATURES
1. Supertrend Filter
Trend Direction Filter: Tracks the main market trend and filters out choppy sideways movements using the Volatility SMA Length and Multiplier settings.
Trend Cloud Background: Colors the background ( Show Trend Cloud Fill ) to show you instantly if the market is in an Uptrend or Downtrend.
2. Smart Order Blocks & Volume Split
Trend-Locked Blocks: Finds key swing highs and lows based on your Pivot Strength . In an uptrend, it only looks for buy blocks; in a downtrend, it only looks for sell blocks.
No Overlapping Zones: If a new order block forms over an old one, the tool automatically locks the old zone and starts a clean new one to keep your chart tidy.
Volume Split Line ( Split Price ): Breaks down each order block into buy and sell percentages ( Buy % vs. Sell % ). This shows you the exact strength of the buyers and sellers inside that zone.
3. Retest Alerts & Auto-Clean Engine
Retest Signals: Places a cross marker ( ✚ ) on your chart the moment price enters and tests an active order block.
Volume Thresholds: Filters out weak moves. You can set a minimum volume requirement ( Min Buy % / Min Sell % ) so you only get signals when big institutional money is involved.
Auto-Delete Broken Zones: When enabled ( Delete OB on Complete Break ), the tool instantly deletes broken order blocks once the price completely passes through them. This keeps your chart clean.
🔵 HOW TO TRADE WITH IT
Trend Continuation Entries: When the trend is bullish, wait for the price to pull back into a Bullish OB. If it hits the zone and bounces back up with strong volume, a "Retest" cross will appear, signaling a good entry point.
Precise Entries & Tighter Stops: Use the internal volume split line to find better entries. Entering closer to the bottom of a buy zone allows you to use a much smaller stop loss.
Automatic Risk Invalidation: If you are in a long trade and the price breaks completely below the buy zone, the tool deletes that block. This is your visual sign that the trade setup is no longer valid.
🔵 SETTINGS & CONFIGURATION
Trend & Pivot Settings: Adjust lookbacks and volume filters to fit any market, including Crypto, Forex, or Indices.
Style & Clean-Up: Turn the trend background cloud on/off, customize retest markers, and enable auto-deletion to keep your workspace clear.
Color Themes: Fully customize colors for uptrends, downtrends, text, and signals to match your favorite chart theme.
Upgrade your charts from simple lines to a volume-driven, trend-filtered map with the Volume-Trend Order Block Engine . Indicateur

Dual-Magnet Liquidity Field [DML]📊 Dual-Magnet Liquidity Field
By PhenLabs | Pine Script v6
The Dual-Magnet Liquidity Field tracks the strongest upside liquidity target and the strongest downside liquidity target at the same time, then converts that competition into a live directional tension model.
Instead of treating every swing high or swing low equally, DML scores each candidate using distance, volume, recency, touch count, and range position. The result is a dual-sided liquidity map that shows where price is statistically being pulled, whether one side is dominant, or whether the market is compressing into a high-tension coil.
DML is built for traders who want a cleaner read on directional liquidity pressure without relying on lagging trend overlays. It is especially useful when price is moving between obvious pools, when both sides are loaded, or when one side starts to decisively overpower the other.
Points of Innovation
Simultaneously tracks the strongest upside and downside liquidity magnets instead of forcing a single-target view.
Uses a weighted probability engine that ranks confirmed swing levels by distance, volume, recency, retest density, and range location.
Normalizes each side’s raw score into a 0-100 tension reading against its own historical range.
Converts both tensions into a live dominance ratio where upside % and downside % always sum to 100.
Identifies two distinct states: directional bias when one side clearly dominates, and coil conditions when both sides are strong but balanced.
Visualizes the market as an animated dual-sided field with magnet labels, field lines, zone boxes, and a compact live gauge.
Core Components
Swing Magnet Engine: Detects confirmed pivot highs and pivot lows, then stores them as active liquidity candidates on both sides of price.
Candidate Maintenance Logic: Tracks touches, removes stale levels, and deletes magnets once they are decisively swept beyond an ATR-based mitigation threshold.
Probability Scoring Model: Ranks every valid candidate with a weighted composite score built from five normalized factors.
Tension Engine: Scales the strongest raw score on each side into a 0-100 pull reading based on its own recent history.
Dominance Model: Converts upside tension and downside tension into a proportional control metric that expresses directional ownership.
Signal Layer: Fires Bull Bias, Bear Bias, and Coil events with cooldown protection to reduce signal spam.
Key Features
Tracks one best upside magnet above price and one best downside magnet below price at all times.
Only scores levels on the correct side of price, keeping the pull model directionally clean.
ATR-normalized distance logic makes the indicator scale across low-volatility and high-volatility instruments.
Volume factor estimates how much liquidity is likely parked around a pivot relative to baseline participation.
Touch counting increases the score of levels that have been repeatedly tested and may hold stacked stops or resting orders.
Range-position logic boosts upside magnets nearer the upper range and downside magnets nearer the lower range.
Minimum probability threshold filters out weak magnets so only meaningful fields remain visible.
Animated field rendering makes strong directional pull visually obvious on the last bar.
Compact gauge displays upside %, downside %, raw pull, and the live field state in real time.
Built-in alerts support bullish dominance, bearish dominance, and balanced high-tension coil conditions.
Visualization
Upside Magnet: Plotted above price with a teal field, floating label, and zone box when the upside candidate qualifies.
Downside Magnet: Plotted below price with a red field, floating label, and zone box when the downside candidate qualifies.
Field Lines: Radiating lines show directional attraction from current price toward each active magnet.
Curved Boundary: The outer field contour helps visually frame the pull zone around each target.
Magnet Labels: Each label shows target price, current pull strength, and touch count.
Signal Markers: Triangle markers flag bull or bear bias, while a lightning symbol flags coil conditions.
Tension Gauge: Summarizes live dominance, raw pull, and whether the field is neutral, coiled, bullish, or bearish.
Usage Guidelines
Probability Engine
Swing Lookback: Controls pivot significance. Higher values produce fewer, stronger swing magnets and confirm later.
Max Candidates / Side: Sets how many recent swing highs and lows remain active in the engine.
Min Probability Threshold: Filters out weak magnets from display and signal logic.
Max Candidate Age: Removes older levels that are no longer relevant to current structure.
Touch Tolerance (xATR): Defines how close price must come to count as a retest.
Sweep Tolerance (xATR): Defines how far price must close beyond a level before that liquidity is considered taken.
Scoring Weights (advanced)</b]
Distance Weight: Increases the impact of proximity. Higher values favor nearer magnets.
Volume Weight: Increases the impact of relative pivot volume.
Recency Weight: Increases the importance of fresher liquidity levels.
Touch Weight: Gives more influence to magnets that have been repeatedly tested.
Range-Position Weight: Adjusts the importance of where the level sits inside the active range.
Tension & Signals
Tension Normalization Window: Defines the lookback used to scale each side’s raw score into a 0-100 tension reading.
Dominance Threshold (%): Minimum ownership required for one side to trigger a directional bias.
Coil Tension Floor: Minimum tension both sides must hold before a balanced coil can be flagged.
Signal Cooldown (bars): Minimum bars between signals to reduce repetitive triggers.
Visualization</b]
Animate Field Lines: Cycles a pulse through the field for a more dynamic read on directional attraction.
Field Lines / Side: Controls field density.
Pulse Period: Adjusts animation rhythm.
Upside / Downside / Coil Colors: Customizes visual state colors.
Show Tension Gauge: Toggles the compact dashboard.
Gauge Position: Moves the table to the chart corner that best fits your layout.
Best Use Cases
Identifying which side of nearby liquidity is exerting the strongest pull.
Separating balanced compression from true directional imbalance.
Timing continuation trades when one side clearly dominates the field.
Monitoring mean-reversion or breakout conditions when both sides remain highly charged.
Filtering discretionary structure reads with an objective tension model.
Adding context to sweep-prone instruments such as crypto, indices, futures, and FX.
Limitations
DML is a liquidity-pressure framework, not a complete trade system.
Signals can lose effectiveness in extremely noisy, thin, or news-driven conditions.
Because pivots are confirmed swings, new candidates appear only after confirmation delay.
Tension is relative to recent score history, so readings should be interpreted in context rather than as absolute prediction certainty.
Strong pull does not guarantee immediate reversal or continuation without price confirmation.
What Makes This Unique
Most liquidity tools mark pools. DML ranks them.
Most directional tools give a binary bias. DML shows a live 100% split between competing forces.
Most squeeze-style tools detect compression indirectly. DML defines coil as simultaneous high, balanced attraction to both sides.
Most target tools focus on one destination. DML keeps both magnets alive until the field resolves.
How It Works
1. Process Step 1 — Build the candidate set
Confirmed swing highs and lows are registered as upside and downside liquidity magnets. Each candidate stores its price, pivot bar, pivot volume, and a running retest count.
2. Process Step 2 — Score the strongest level on each side
Every valid candidate is scored using five normalized factors: ATR-normalized distance, relative volume, age decay, touch count, and position inside the active range. The highest composite score above price becomes the active upside magnet, and the highest composite score below price becomes the active downside magnet.
3. Process Step 3 — Convert competition into field state
The strongest raw score on each side is normalized into a 0-100 tension reading. Those tensions are then converted into upside % and downside % dominance values. When both sides are strong but balanced, DML flags a coil. When one side decisively owns the field, DML flags directional bias.
Important Note
This indicator does not future-leak its swing logic because pivots are only registered after confirmation. For best results, use DML as a liquidity-context engine alongside your execution model, structure confirmation, and risk management. Indicateur

Fair Value Gaps + Inversion FVG [Quantum Algo]Fair Value Gaps + Inversion FVG
█ OVERVIEW
Most FVG indicators stop at drawing boxes. This one tracks the complete lifecycle of every gap — fresh → midline-tested → filled → INVERTED → retested — and automates the part of the model that traders actually trade: the Inversion Fair Value Gap (IFVG).
A Fair Value Gap is a 3-candle imbalance left behind when price moves too fast for two-sided trade to occur. Price frequently returns to these zones. But when price closes through a gap instead of respecting it, the zone does not die — it flips polarity. A violated bullish gap becomes resistance; a violated bearish gap becomes support. The first retest of that inverted zone is one of the cleanest entry models in the Smart Money Concepts framework, and this script detects, restyles, and signals it automatically.
█ FEATURES
Gap detection
— Bullish and bearish FVGs detected on confirmed bars only (non-repainting).
— ATR minimum-size filter removes insignificant micro-gaps.
— Optional displacement filter: the middle candle must be a genuine expansion bar (range greater than a configurable multiple of ATR), keeping only gaps created by aggressive participation.
Volume strength score
Every gap is stamped with a 0–100 score comparing the displacement candle's volume against its 20-bar average. A 90% gap and a 20% gap are not the same zone — now you can see the difference at a glance.
Consequent Encroachment (CE)
Each gap carries its 50% midline. The first touch of the CE is detected, the gap is visually dimmed to separate tested zones from fresh ones, and an alert is available.
Inversion engine (IFVG)
— A close through the gap converts it into an inverted zone with distinct styling.
— The first retest of an inverted zone prints an on-chart signal (long model for inverted bearish gaps, short model for inverted bullish gaps).
— A close back through the far side invalidates and removes the zone.
— Inversion can be disabled, in which case gaps simply fill and are removed or frozen (wick-fill or close-fill modes).
Multi-timeframe mode
Display gaps from one higher timeframe directly on your chart as dashed boxes. HTF gaps are built exclusively from closed higher-timeframe bars, so they do not repaint.
Dashboard
A compact panel shows active bullish gaps, bearish gaps, inverted zones, plus the nearest demand level below price and the nearest supply level above it.
Alerts
Eight alert conditions cover the full lifecycle: new bullish/bearish gap, CE touch, fill, bullish/bearish inversion, and long/short IFVG retest.
█ HOW DETECTION WORKS
A bullish FVG forms when the current bar's low sits entirely above the high from two bars earlier — the zone spans that void. A bearish FVG is the mirror image. Detection runs only on bar close, so a gap that appears never disappears or redraws. Lifecycle state changes (CE touches, fills, inversions, retests) are likewise evaluated on confirmed bars.
█ HOW TO USE IT
1. Classic continuation: in a trend, wait for price to retrace into a fresh high-strength gap aligned with the trend; the CE midline is the standard entry refinement.
2. Inversion reversal: when a gap is closed through, stop looking for the old reaction — wait for the retest of the inverted zone in the new direction. The on-chart IFVG markers identify exactly this moment.
3. Multi-timeframe confluence: enable HTF mode and prioritize chart-timeframe signals that occur inside a higher-timeframe gap.
4. Use the dashboard's nearest demand/supply readout for quick situational awareness of where the next reaction zones sit.
Works on all symbols and timeframes. Crypto and index futures tend to produce the cleanest gaps on 5m–1H; forex gaps are more frequent on 15m and above.
█ SETTINGS
Detection — minimum gap size (× ATR), displacement filter, maximum zones kept on chart.
Mitigation & Inversion — inversion on/off, fill source (close or wick), removal of filled gaps, retest signals.
Multi-Timeframe — HTF on/off and timeframe selection.
Visuals — colors for bullish / bearish / inverted zones, fill transparency, CE line, labels, dimming of tested gaps, dashboard.
█ NOTES
— All state changes occur on closed bars; the developing bar can always change until it closes.
— This is an analysis tool for mapping imbalance and inversion zones, intended as a confluence layer within a complete trading plan. It is not a standalone buy/sell system.
█ DISCLAIMER
This script is provided for educational and informational purposes only and does not constitute financial advice. Trading involves substantial risk of loss. Past behavior does not guarantee future results. Always do your own research and apply sound risk management. Indicateur

Market Structure & LiquidityMARKET STRUCTURE & LIQUIDITY — Calibrated Zones, Premium/Discount & Setup Grade
================================================================================
WHAT THIS SCRIPT IS
A single price-action framework that maps the structural read of a chart and
then measures it. It plots market structure (break of structure and change of
character), supply/demand order blocks, fair value gaps, resting liquidity
(equal highs and lows) and the sweeps that take it, premium/discount with an
optimal-entry band, a higher-timeframe bias, and a rolling volume profile. On
top of those objects it does three things most structure tools do not: it
validates every structure break, it scores each zone by confluence and quality,
and it reports — using past data on the current symbol only — how often each
zone type has actually been respected, with statistical confidence intervals.
The levels are the raw material; the framework adds a measured read of which
ones to trust.
WHY THE COMPONENTS ARE COMBINED (how the parts work together)
These are not independent indicators bolted together. They describe one process
— how large participants build positions: rest liquidity, take it, displace
price, and leave an inefficiency behind — and each layer covers a blind spot of
the others, feeding one combined decision:
- Market structure (swing and internal) gives trend context and the moment it
shifts. Because raw break detection is noisy, a break is only counted when it
shows real displacement (range expansion with body, or a volatility
compression followed by a release), closes beyond the level with body rather
than leaving a rejection wick, and breaks a tight, recent (quality) pivot.
This removes most false breaks before anything else is drawn.
- Regime context (efficiency ratio + ADX + volatility clustering + a whipsaw
score) conditions how far to trust a read: continuation breaks are reliable in
a trending regime, reversals are more reliable in a range, and a choppy regime
weights everything down. Structure on its own cannot tell you this.
- Liquidity (equal highs/lows, sweeps, and inducement) marks where stops rest
and the moment they are taken — the trigger that typically precedes a real
move, and the event that validates a nearby zone.
- Order blocks and fair value gaps mark the origin of the displacement and the
inefficiency price tends to revisit. A zone that forms on a sweep, on a
high-volume node, in the correct half of the range scores highest — which is
exactly why liquidity, the volume profile and premium/discount all feed the
zone score rather than living in separate panes.
- Volume profile (point of control, high- and low-volume nodes, and untested
"naked" points of control) tells you whether a zone sits on acceptance (tends
to hold) or on a thin gap (tends to slice), and marks magnet levels price is
drawn back toward.
- Premium/discount and the OTE band frame every zone as expensive or cheap
relative to the current dealing range, so a long in discount and a short in
premium are favoured.
- The confluence engine and setup grade fuse structure direction, a recent
sweep, zone quality, node type, premium/discount alignment, higher-timeframe
bias and a momentum-divergence confirmation into one A/B/C read per zone, so
the chart self-prioritises instead of leaving you to weigh eight things by eye.
- Calibration measures, on past bars only, how often each zone type produced a
meaningful reaction on the current symbol, and reports it with Wilson
confidence intervals — so reliability is earned per instrument, not assumed.
In one sentence: structure says direction, regime says whether to believe it,
liquidity says when, the zones say where, premium/discount says whether it is
worth it, the grade fuses them, and the calibration keeps the whole thing honest.
HOW IT WORKS (mechanics, briefly)
Pivots use the standard left/right confirmation, so structure is non-repainting:
a break is only labelled after the pivot is confirmed and the close validates it.
Order blocks anchor to the last opposing candle before a validated break, are
scored on formation, and are re-scored for confluence on the most recent bar.
Calibration records, the first time a zone is tagged, whether price then travels
a chosen ATR multiple in the zone's direction within a fixed horizon, and
aggregates that into the respect rate shown on the dashboard. All thresholds are
ATR-relative, so nothing is tied to a particular price scale.
HOW TO USE IT
1. Read the dashboard headline: the SETUP grade and the structure bias.
2. Favour higher-grade setups — a validated structure direction, a recent sweep,
a fresh high-quality zone sitting on a volume node, in discount for longs or
premium for shorts, with higher-timeframe agreement.
3. Use the OTE band for entry context and an opposing fair value gap as a
logical target.
4. Check the respect rows. If order blocks or fair value gaps rarely hold on this
symbol, weight the read down accordingly.
5. Treat everything as descriptive context, not a signal to act on.
USE ON ANY MARKET
The High / Low / Close source inputs let you drive structure, liquidity and
premium/discount from any series (standard candles, Heikin-Ashi, or another
source), so the framework applies to stocks, indices, futures, forex and crypto.
A volume-borrow input supplies volume for symbols that report none.
WHAT MAKES IT ORIGINAL
The contribution is the closed loop, not the individual objects, which are
common to price-action analysis. Here, validated structure and liquidity feed a
per-zone confluence and quality score and a single setup grade, and a past-only
calibration tracker reports each zone type's actual respect rate on the current
symbol with confidence intervals. That turns a set of drawing tools into a
measured, self-prioritising read.
SETTINGS WORTH KNOWING
- Break Validation: turn displacement, anti-wick and pivot-quality gates on/off
and tune their strictness to make structure more or less selective.
- Volume Profile / Nodes: bins, window and HVN/LVN percentiles control node
tagging; naked POC tracking is session-based and turns itself off when the
chart is not intraday.
- Confluence & Setup Grade: cluster tolerance controls how close levels must be
to count as confluent.
- Calibration: horizon and minimum reaction define what counts as a "respected"
zone.
- Visuals: theme is auto/dark/light; grade-weighted opacity makes strong zones
bold and weak ones faint; the identity strip shows the script name, symbol and
timeframe.
LIMITATIONS
Pivots confirm after the right-bars lag, so forming structure is not drawn until
confirmed. Volume layers require real or borrowed volume. Calibration describes
past behaviour only — it is not a backtest and not a probability of future
results. Every read is probabilistic context, never a certainty.
DISCLAIMER
This is a study/indicator for chart analysis and education only. It is not a
strategy, not a recommendation, and not financial advice. It places no orders
and guarantees no outcome. Markets carry risk, and the past behaviour of a level
does not assure its future behaviour. Do your own research and manage your own
risk.
Indicateur

AI-Powered PDH/PDL Power Ranker [PhenLabs]📊 ML-Powered PDH/PDL Power Ranker
Version: PineScript™ v6
📌 Description
ML-Powered PDH/PDL Power Ranker is an adaptive support/resistance indicator that tracks Prior Day High and Prior Day Low levels across a configurable session lookback, then ranks each level on a 0–100 scale based on how strongly price has historically reacted to it.
Instead of treating every PDH and PDL as equally important, this script continuously learns which levels deserve attention. It evaluates live touches, measures the realized rejection after a user-defined confirmation window, and updates each level with either a shared NLMS model or an independent Kalman estimator.
The result is a causal, non-repainting ranking engine that helps traders focus on the strongest daily levels, identify high-confidence reaction zones, and ignore weak or stale liquidity areas.
🚀 Points of Innovation
Adaptive level scoring using two genuine learning models: shared NLMS or per-level Kalman filtering
Strictly causal labeling process that waits for confirmed post-touch reaction before updating any score
Feature-based learning framework using wick rejection, relative volume spike, and ATR-normalized approach momentum
Untouched-level score shrinkage logic that prevents zero-evidence levels from outranking proven levels
Session-aware PDH/PDL generation that respects TradingView session boundaries, including extended-hours configurations
Top-ranked dashboard plus high-confidence zone highlighting and touch alerts for fast execution workflow
🔧 Core Components
PDH/PDL Session Engine: Captures completed-session highs and lows, stores them as active levels, and prunes old levels based on the selected lookback window
ATR Zone Builder: Expands each level into a configurable reaction band using ATR(14), creating realistic touch zones instead of single-price lines
NLMS Learning Model: Uses a normalized least-mean-squares filter to learn a global mapping from touch features to realized reaction quality
Kalman Strength Filter: Maintains an independent latent-strength estimate for each level using scalar Kalman state updates
Causal Touch Resolver: Snapshots features on zone entry, waits a fixed number of bars, then measures realized rejection with no lookahead
Ranking Dashboard: Sorts active levels by display score and shows the strongest zones with age, touch count, and score
🔥 Key Features
Ranks every active PDH and PDL from 0 to 100 so the best daily levels stand out immediately
Offers two adaptive engines so traders can choose between cross-level learning (NLMS) or level-specific state estimation (Kalman)
Uses entry-based touch detection to avoid overcounting consolidations sitting inside the same zone
Applies ATR-normalized reaction measurement so scoring remains comparable across symbols and volatility regimes
Highlights high-confidence zones directly on the chart when price is trading inside them
Triggers alert conditions when price touches a zone whose score is above the high-confidence threshold
Includes a clean top-5 ranking table so traders can identify the strongest daily levels at a glance
🎨 Visualization
Dynamic zone boxes show each PDH and PDL as a buffered reaction area rather than a thin horizontal line
Gradient-based score coloring makes weak levels fade cool and strong levels turn hot
On-chart labels display level type, age in sessions, and current score
Optional background highlight marks bars trading inside a high-confidence zone
Ranking dashboard lists the top levels by score along with touch counts and exact price levels
📖 Usage Guidelines
Level Detection
Session lookback (days) — Default: 7 — Range: 1 to 15 — Controls how many completed sessions of PDH/PDL levels remain active. Lower values keep the chart cleaner; higher values preserve more historical daily structure.
Zone buffer (× ATR-14) — Default: 0.15 — Range: 0.01 to 2.0 — Sets the half-width of each PDH/PDL zone in ATR units. Increase it for volatile markets; reduce it for tighter precision.
Adaptive Model
Adaptive model — Default: NLMS — Options: NLMS or Kalman — NLMS learns globally across all resolved touches, while Kalman maintains a separate evolving strength estimate for each level.
Reaction confirmation bars — Default: 6 — Range: 2 to 50 — Defines how long the script waits after a touch before measuring the realized reaction. Larger values emphasize slower reversals; smaller values emphasize immediate rejection.
NLMS step size (μ) — Default: 0.50 — Range: 0.01 to 2.0 — Controls learning speed for the NLMS model. Higher values adapt faster but can be more reactive.
Kalman process noise (Q) — Default: 0.010 — Minimum: 0.0001 — Controls how quickly a level’s true strength is allowed to drift between observations.
Kalman measurement noise (R) — Default: 0.20 — Minimum: 0.001 — Controls how noisy each touch observation is assumed to be. Higher values smooth updates and slow score changes.
Display & Alerts
Min score to display — Default: 55 — Range: 0 to 100 — Hides weaker levels from the chart while still tracking them internally
High-confidence threshold — Default: 75 — Range: 0 to 100 — Defines which zones qualify for hot-zone highlighting and touch alerts
Show ranking dashboard — Default: true — Toggles the top-ranked PDH/PDL table
Highlight bar inside high-confidence zone — Default: true — Adds background emphasis when price is currently trading inside a strong zone
✅ Best Use Cases
Intraday trading around prior-day liquidity and reaction zones
Session traders who want objective ranking of PDH/PDL instead of manually judging every level
Futures, indices, forex, and crypto markets where daily highs and lows act as repeat reaction points
Confluence trading alongside structure, liquidity sweeps, VWAP, or order-flow tools
Traders who want non-repainting, evidence-based level scoring instead of static daily levels
⚠️ Limitations
The model needs resolved touch history before scores become highly informative, so early readings are more neutral
PDH/PDL relevance depends on symbol behavior, session configuration, and timeframe context
Very low-liquidity markets or feeds with weak volume data can reduce the usefulness of the volume-spike feature
This indicator ranks reaction quality at prior-day levels; it does not predict trend direction by itself
Kalman and NLMS may emphasize different behaviors, so traders should test which model best fits their market
💡 What Makes This Unique
It does not just plot PDH and PDL — it learns which ones actually matter
Its labeling process is fully causal, so model updates occur only after the reaction window has completed
It combines level memory with adaptive inference instead of using a static heuristic score
It prevents untouched levels from dominating the rankings through trust-weighted prior shrinkage
🔬 How It Works
1. Session Level Creation:
At each new daily session boundary, the script stores the completed session’s high and low as fresh PDH and PDL levels
Each level is assigned metadata including age, touch count, score state, and pending-observation slots
2. Touch Feature Capture:
When price enters a zone from outside, the script records three features: wick rejection ratio, relative volume spike, and 3-bar ATR-normalized approach momentum
This entry-only logic prevents repeated relabeling while price chops inside the same zone
3. Causal Reaction Resolution:
After the selected confirmation window expires, the script measures realized rejection strength in ATR units
That realized move is mapped into a normalized target so the model learns from consistent cross-market observations
4. Adaptive Score Update:
In NLMS mode, the shared weight vector updates from every resolved observation, then blends the fresh model prediction with that level’s own EMA of realized reactions
In Kalman mode, each level updates its latent strength estimate using scalar predict-and-correct filtering
5. Display Ranking and Alerts:
The script converts model output into a 0–100 score, ranks active levels, colors zones by strength, and highlights high-confidence areas
An alert condition fires when price touches a zone whose score is already above the selected confidence threshold
💡 Note:
This script is designed to be non-repainting and strictly causal. For best results, use it as a level-prioritization engine inside a broader execution framework that includes market structure, trend context, and risk management. Indicateur

Structure Bias [FlowForge]Know the structural direction on two timeframes before you trade.
Structure Bias monitors market structure simultaneously on a higher and a lower timeframe, classifies each structural event in real time, and combines both readings into a single directional verdict. It answers the question most traders try to resolve by eye: are both timeframes pointing the same way?
───────────────────
DUAL-TIMEFRAME STRUCTURE DETECTION
The indicator evaluates confirmed swings on both configured timeframes independently. Each time price clears a prior confirmed swing, the event is classified by whether it aligns with the existing directional trend or breaks against it. A Break of Structure signals that the prevailing trend is continuing: price has extended beyond a prior swing in the same direction. A Change of Character signals a potential bias shift: price has broken a prior swing against the existing trend for the first time, indicating the directional bias may be reversing. Both readings update independently per timeframe so you always have a clear picture of where each one stands.
───────────────────
ALIGNED BIAS SUMMARY
The bottom row of the dashboard synthesizes both timeframe readings into a single verdict. When the higher and lower timeframe both report the same structural direction, the row shows a confirmed aligned bias. When they conflict, it shows Mixed, flagging a structurally undecided market where lower-conviction conditions apply. The most recently updated dashboard row is highlighted automatically so you can see at a glance which event is freshest.
───────────────────
LIVE DASHBOARD
A compact two-column table delivers the complete structural picture without adding clutter to the chart.
✥ Higher timeframe CHoCH: current Change of Character reading and direction
✥ Higher timeframe BOS: current Break of Structure reading and direction
✥ Lower timeframe CHoCH: same for your trading timeframe
✥ Lower timeframe BOS: same for your trading timeframe
✥ Overall Bias: aligned directional read, or Mixed when timeframes conflict
✥ Most recent structural event highlighted automatically
───────────────────
HOW TO USE
Add the indicator to your chart and configure the two timeframes to match your setup. A common starting point is your trading timeframe as the lower and one step above it as the higher. Read the four structure rows to understand what each timeframe is doing independently. Then look at the Overall Bias row as your directional filter: a confirmed aligned reading means both timeframes agree, which is the condition most traders treat as higher-conviction. A Mixed reading means the two timeframes disagree and the structural context is less clear. Use the CHoCH alerts to be notified when the lower timeframe bias flips; use the BOS alerts when a continuation move is confirmed. Use the Aligned variants when you only want signals under full dual-timeframe agreement.
───────────────────
ALERTS
Seven alert conditions, all firing on confirmed closed bars only.
✥ Bullish CHoCH: lower timeframe bias flipped to long
✥ Bearish CHoCH: lower timeframe bias flipped to short
✥ Bullish BOS: lower timeframe uptrend continuation confirmed
✥ Bearish BOS: lower timeframe downtrend continuation confirmed
✥ Aligned BOS Bullish: both timeframes aligned, bullish continuation
✥ Aligned BOS Bearish: both timeframes aligned, bearish continuation
✥ Aligned CHoCH: both timeframes aligned, high-confluence bias flip
───────────────────
CUSTOMIZATION
✥ Higher and lower timeframes: configurable independently
✥ Swing sensitivity: adjustable lookback depth for coarser or finer structure
✥ Dashboard position: four corner options
✥ Text size: four sizes
✥ Twenty color themes
───────────────────
THEMES
Twenty palettes are available. Four samples are shown below covering the default and three contrasting options. All twenty are accessible from the Theme input in the script settings.
Colorful (default)
Vivid
Copper
Ember
Indicateur

Market Structure Target Tracker [MarkitTick]💡 An advanced, multi-faceted analytical suite designed for traders who rely on price action and logical trend progressions. By systematically identifying structural pivots in the market, this tool automatically maps out Break of Structure (BOS) and Change of Character (CHoCH) events. Rather than simply plotting support and resistance, it integrates a sophisticated risk-management framework directly onto the chart, calculating dynamic Entry, Stop Loss (SL), and multiple Take Profit (TP) levels based on market volatility.
Price action trading requires constant vigilance to identify local maxima and minima. This script relieves the trader of manual chart marking by perpetually analyzing rolling windows of price data. When an established swing high or low is breached, the indicator locks in the structural shift, evaluates higher timeframe momentum to filter out false breakouts, and establishes a forward-looking target zone.
✨ Originality and Utility
Most market structure indicators limit their functionality to placing historical labels on the chart. The originality of this script lies in its forward-looking, state-aware tracking mechanism. It operates not just as an indicator, but as a simulated trade management dashboard.
Once a structural break occurs, the indicator shifts into an active tracking state. It dynamically projects Entry and SL/TP bands anchored to the breakout, using Average True Range (ATR) to adapt to the asset's current volatility. Furthermore, it continuously evaluates the life-cycle of the structural break, monitoring price action to determine if the target is successfully hit or if the setup is invalidated by an opposing swing breach. This level of state persistence provides traders with an objective, real-time assessment of trade feasibility, risk-to-reward ratios, and trend duration.
🔬 Methodology and Concepts
The script is built upon four foundational technical concepts, woven together into a unified logic sequence:
• Pivot Detection
The core engine scans for Pivot Highs and Pivot Lows. A Pivot High is confirmed when a specific bar's high is strictly greater than the highs of a defined number of bars both preceding and following it. This creates a fractal representation of market turning points.
• Break of Structure (BOS)
A bullish structure break occurs when the closing price of a confirmed bar exceeds the most recent Pivot High. Conversely, a bearish break occurs when the close drops below the most recent Pivot Low. The script categorizes the first break in a new direction as a CHoCH, and subsequent continuous breaks as BOS.
• Higher Timeframe (HTF) Alignment
To prevent trading against the dominant macroeconomic trend, the script optionally queries the Relative Strength Index (RSI) from a higher timeframe. If this filter is engaged, bullish breakouts are ignored unless the HTF RSI indicates bullish momentum, adding a crucial layer of directional confirmation.
• Volatility-Adjusted Target Mapping
Upon a valid breakout, the script captures the current ATR. It then maps out a predefined trade setup. The Entry is plotted slightly past the breakout line, the Stop Loss is placed at a multiple of the ATR away from the entry, and up to three Take Profit levels are projected using independent ATR multipliers.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
The indicator translates discretionary price action theory into a strict, rule-based algorithmic framework grounded in discrete mathematics and statistical dispersion.
• Local Extrema in Discrete Time Series
The pivot detection relies on the mathematical definition of local extrema within a bounded domain. For a given time series of high prices $H_t$, a local maximum is identified at time $t$ if $H_t \ge H_{t \pm k}$ for a defined neighborhood $k$ (the Swing Length). By anchoring structural logic to these extrema, the script removes the subjectivity of trendline drawing, relying strictly on empirical data points that define the boundaries of recent market equilibrium.
• Measurement of Dispersion via True Range
The risk management module utilizes the Average True Range. The True Range ( NYSE:TR $) is defined as the greatest of the following: the current high minus the current low, the absolute value of the current high minus the previous close, or the absolute value of the current low minus the previous close. The ATR is a smoothed moving average of this NYSE:TR $. In academic finance, variance and standard deviation are common measures of risk; however, ATR is particularly robust for trading applications as it accounts for overnight gaps and limits, providing a highly adaptive measurement of kinetic market energy to appropriately size stop-loss thresholds.
• Relative Momentum Standardization
The Higher Timeframe filter utilizes the Relative Strength Index. The RSI standardizes the velocity of price movement onto a 0-100 scale by comparing the exponential moving average of recent gains to recent losses. By enforcing a rule where NYSE:RSI > 50$ is required for bullish structural breaks, the algorithm mathematically demands that the higher-degree derivative of price (momentum) aligns with the lower-degree breakout, statistically reducing the probability of mean-reverting false breakouts.
🎨 Visual Guide
The script provides a rich, non-intrusive visual overlay to keep the trader informed of all active states and historical context.
• Structure Break Lines
Dashed Green Lines: Indicate historical and active Bullish breakouts.
Dashed Red Lines: Indicate historical and active Bearish breakouts.
Trend Labels: Triangles and markers (▲ BOS / ▼ CHoCH) appear at the midpoint of the break line to clearly annotate the structural shift.
• Trade Projection Lines
When a break is active, a cluster of dashed lines projects to the right of the current price action:
Blue Line (►): Proposed Entry level.
Red Line (✕): Stop Loss level based on ATR.
Green Lines (●, ★, ◆): Three tiered Take Profit targets based on escalating ATR multiples.
• The Heads-Up Dashboard
Located in the top right corner, this table is the operational nerve center. It displays:
Asset Ticker and Current Trend status.
HTF Direction and a visual block-bar representation of the HTF RSI.
Active BOS Level and Target Status (⏳ Pending or ✓ Hit).
Exact price coordinates for Entry, SL, and all TPs.
The active Risk-to-Reward (R:R) ratio for the first target.
Statistical tracking of Total BOS counts and the duration (in bars) of the active setup.
📖 How to Use
Traders can utilize this script as a complete ruleset for navigating trend continuations and reversals.
When observing the chart, wait for the script to print a new BOS or CHoCH label. This signifies that a confirmed candle has closed beyond a significant structural pivot. If the HTF filter is enabled, this break already has the backing of higher timeframe momentum.
Once the break prints, look to the dashed projection lines and the dashboard. The dashboard will display exact coordinates for a theoretical trade setup. You can use the blue Entry line to plan limit orders or market execution upon pullbacks. Set your structural stop-loss according to the red SL line, and place limit orders to secure profits at the green TP lines.
Monitor the Dashboard's "Tgt Status". If price action reverses heavily and crosses the opposing pivot point before reaching the target, the script will trigger its auto-invalidation sequence, clearing the active lines and returning to a neutral scanning state. This helps in dynamically cutting risk when a setup structurally fails.
⚙️ Inputs and Settings
The indicator is highly customizable, allowing adaptation to any asset or timeframe.
• BOS Group
Swing Length: Determines the lookback and lookforward period for pivot detection. Lower values react faster but produce more noise; higher values identify major macro swings.
• Visibility Group
Show BOS Line / Labels: Toggles the historical structural break drawings.
Auto-Invalidate: When enabled, the script will cancel an active setup if the opposing structural extreme is breached.
Color settings: Fully customize the hues for Bullish breaks, Bearish breaks, and Targets.
• SL/TP Group
Show Entry/SL/TP: Toggles the projection lines on the chart.
ATR Length: The lookback period for calculating market volatility.
Multipliers: Adjust the SL ATR Multiplier and the individual TP1, TP2, and TP3 multipliers to define your specific risk-to-reward parameters.
• HTF Group
HTF: Select the resolution for the higher timeframe filter (e.g., 240 for 4-hour, D for Daily).
HTF Filter: Toggle the momentum alignment requirement on or off.
HTF RSI Len: The period for the higher timeframe momentum oscillator.
• Alerts Group
The script features built-in webhook-ready JSON alerts that can notify external services the moment a BOS occurs or a target is successfully hit.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicateur

ML Liquidity Zone Classifier [PhenLabs]📊 ML Liquidity Zone Classifier
Version: PineScript™ v6
📌 Description
ML Liquidity Zone Classifier brings machine-learning-based filtering to liquidity mapping. Instead of drawing every possible order block, equal high, equal low, or volume zone, it evaluates current market conditions and only renders zones that score above a configurable confidence threshold.
The script uses a rolling k-Nearest Neighbors (k-NN) classifier built directly in Pine Script. Each potential zone is described using three normalized features: relative volume, higher-timeframe alignment, and displacement strength. Those features are compared against a rolling training set of prior bars to estimate whether the current setup resembles historically meaningful liquidity events.
The result is a cleaner liquidity tool designed to reduce chart clutter, improve selectivity, and help traders focus on zones with stronger contextual backing.
🚀 Points of Innovation
• Built-in k-NN classifier for liquidity zone confidence scoring
• Uses normalized multi-factor features instead of binary pattern logic alone
• Non-repainting delayed labeling system for training samples
• Auto higher-timeframe alignment that scales with the chart timeframe
• Zone overlap control, mitigation logic, and max-height clamping for cleaner structure
• Confidence-gated rendering so weak setups never reach the chart
🔧 Core Components
• KNN Classifier: Measures similarity between the current setup and prior labeled setups using Euclidean distance across three features
• Feature Engine: Converts volume, HTF proximity, and candle displacement into normalized 0 to 1 inputs
• Zone Detection Layer: Detects bullish and bearish order blocks, equal highs, equal lows, and high-volume nodes
• Zone Quality Gate: Filters zones by confidence, spacing, overlap, and size constraints
• Zone Lifecycle Manager: Maintains arrays for boxes and labels, prunes old zones, and removes mitigated ones
• Dashboard: Displays last detected zone, confidence score, and higher-timeframe directional bias
🔥 Key Features
• Machine-learning confidence score from 0 to 100 for every valid setup
• Automatic higher-timeframe selection based on current chart timeframe
• Support for bullish and bearish order blocks using ATR-based displacement logic
• Equal high and equal low detection using ATR-derived tolerance bands
• High-volume node detection using rolling average volume and local peak validation
• Zone deduplication to avoid stacked boxes at the same price area
• Optional mitigation that deletes broken zones after price closes through them
• Compact dashboard for live context and last-zone tracking
🎨 Visualization
• Confidence-based zone coloring with stronger opacity and border emphasis for higher-quality zones
• Labels printed directly on each zone with the zone type and confidence percentage
• Right-extended boxes so active liquidity areas remain visible into future price action
• Dashboard in the top-right corner showing Last Zone, Confidence, and HTF Bias
• Bullish zones are displayed in green tones, bearish zones in red tones, and lower-confidence zones fade toward orange or gray
📖 Usage Guidelines
KNN Classifier Settings
• K (neighbors) — Default: 5 — Controls how many historical neighbors are used when calculating confidence. Lower values react faster; higher values smooth the model.
• Training window — Default: 100 — Sets the maximum number of historical labeled samples stored in the rolling training set. Larger values add context but may slow adaptation.
HTF Alignment Settings
• Auto HTF — Default: true — Automatically selects a higher timeframe proportional to the current chart timeframe.
• Auto HTF multiplier — Default: 12.0 — Multiplies the current chart period to estimate the target higher timeframe.
• Manual HTF — Default: D — Used only when Auto HTF is disabled.
Zone Detection Settings
• Volume spike multiplier — Default: 1.5 — Minimum volume expansion required for a high-volume node.
• Order block ATR mult — Default: 1.5 — Minimum candle body size relative to ATR required to qualify as a displacement candle.
• Equal H/L tolerance — Default: 0.1 — ATR-based tolerance used to compare pivot levels for equal highs and equal lows.
Zone Quality Settings
• Min confidence to draw a zone — Default: 65 — Minimum classifier score required before a zone is rendered.
• Min bars between zones — Default: 5 — Cooldown period between newly drawn zones.
• Merge distance (ATR) — Default: 0.75 — Distance threshold used to reject overlapping or near-duplicate zones.
• Max zone height (ATR) — Default: 2.0 — Maximum vertical size of a zone before it is clamped.
• Remove zones when price breaks them — Default: true — Deletes support or resistance zones once price closes through them.
• Max visible zones — Default: 6 — Keeps only the most recent zones visible on the chart.
Advanced Settings
• ATR length — Default: 14 — Used for displacement measurement, tolerance scaling, and size normalization.
• Volume average length — Default: 20 — Rolling baseline for relative volume calculations.
• Volume node peak window — Default: 20 — Lookback used to confirm whether a bar is a true local volume peak.
• Pivot length — Default: 5 — Controls sensitivity for equal-high and equal-low pivot detection.
• Label evaluation window — Default: 10 — Number of bars waited before assigning a training label to a past setup.
• Label move threshold (ATR) — Default: 1.0 — Required future move in ATR units for a past setup to be labeled high probability.
• Show dashboard — Default: true — Enables or disables the on-chart summary table.
✅ Best Use Cases
• Traders who want fewer but higher-quality liquidity zones
• SMC and ICT-style workflows that need stronger filtering on OB and EQH/EQL logic
• Multi-timeframe traders who value HTF context in zone selection
• Intraday traders trying to avoid clutter from weak or repeated structure levels
• Quant-minded users who prefer confidence-based rendering over raw pattern detection
⚠️ Limitations
• The classifier is still a lightweight Pine implementation, not a full external ML model
• Confidence depends on the quality of recent market history inside the selected training window
• The script needs time to build its training set before meaningful zones begin to appear
• In highly abnormal volatility regimes, recent historical neighbors may be less representative
• This tool is a probability filter, not a guaranteed reversal or continuation signal
💡 What Makes This Unique
• Applies a true rolling k-NN classification process to liquidity-zone filtering inside Pine Script
• Combines market structure logic with volume, HTF context, and ATR displacement in one scoring model
• Keeps the chart clean by combining confidence gating, overlap suppression, cooldown spacing, mitigation, and pruning
• Gives traders an interpretable probability score instead of forcing all detected zones to appear equally important
🔬 How It Works
1. Feature Extraction
Each confirmed bar is converted into a three-feature vector. The script measures relative volume versus its moving average, distance to the nearest higher-timeframe OHLC level in ATR terms, and candle displacement strength based on body size versus ATR.
2. Delayed Labeling
After a configurable number of future bars passes, the script checks whether price moved far enough from the original bar. If that move exceeds the ATR-based threshold, the historical sample is labeled as high probability; otherwise it is labeled low probability.
3. KNN Confidence Scoring
When a new liquidity event appears, the script compares its feature vector against the rolling training set. It finds the nearest historical samples using Euclidean distance and converts their votes into a 0 to 100 confidence score.
4. Zone Validation
A zone is only drawn if the confidence exceeds the minimum threshold and the candidate zone does not overlap an existing one too closely. Oversized zones are clamped, repeated zones are filtered out, and only one new zone can be placed within the cooldown window.
5. Live Zone Management
Once drawn, zones extend to the right and remain active until mitigated. If price closes through a bullish zone from above or a bearish zone from below, the zone can be automatically removed to keep the display current.
Note:
This script is designed to be selective. If you use stricter confidence thresholds, larger gap settings, and mitigation enabled, you will typically see fewer but cleaner zones. Lowering the quality filters will increase signal frequency, but also increases chart noise. Indicateur
