OPEN-SOURCE SCRIPT
Liquidity Magnet Clusters

Liquidity Magnet Clusters
Liquidity Magnet Pro is an educational liquidity-mapping indicator designed to help traders study where price may interact with prior volume concentration, untested Point of Control levels, value-area boundaries, and sweep-based liquidity events.
This script is not a trading strategy and does not place or simulate orders. It does not provide backtested performance results, win-rate claims, profitability claims, or financial advice. Its purpose is to organize liquidity-related information directly on the chart so traders can use it as a research and decision-support tool alongside their own market structure, risk management, and testing process.
What the script does
The indicator combines five main analytical components:
1. Rolling Volume Profile
The script builds an internal rolling volume profile from recent bars. It divides the selected lookback range into price bins and distributes each bar’s volume across the bins touched by that bar. From this profile, it identifies:
- POC: the price bin with the highest accumulated volume.
- VAH: the upper boundary of the selected value area.
- VAL: the lower boundary of the selected value area.
- HVN zones: high-volume areas that may represent prior acceptance or liquidity concentration.
- LVN zones: low-volume areas that may represent thinner auction areas or faster price traversal zones.
This profile is calculated inside Pine Script and does not rely on an external volume-profile feed.
2. Naked POC Tracker
The script snapshots the rolling POC from a selected anchor timeframe, such as 4H, Daily, Weekly, or Monthly. These historical POC levels remain active until price tests them or until they expire based on the selected maximum age.
The purpose of the Naked POC tracker is to highlight untested prior POC levels that may act as reference levels for future market interaction. To reduce chart clutter, the script can merge nearby Naked POCs into visible cluster zones instead of drawing every individual level.
3. Liquidity Sweep Detection
The script detects potential liquidity sweeps using recent swing highs and swing lows. A bearish sweep is detected when price moves above a prior swing high and then closes back below it. A bullish sweep is detected when price moves below a prior swing low and then closes back above it.
An optional above-median volume filter can be used to reduce low-conviction sweep signals.
4. A-Grade Confluence Engine
The A-Grade label is a confluence marker, not a buy or sell command. It appears only when a detected sweep also aligns with nearby liquidity geography.
The confluence score can include:
- Sweep near VAH or VAL.
- Sweep near an HVN zone.
- Sweep near an active Naked POC.
- Movement through an LVN zone.
The script uses a 0–5 scoring model. When the score reaches the selected A-Grade threshold, the script displays an A marker on the chart. A higher threshold generally produces fewer but more selective signals, while a lower threshold produces more frequent signals.
5. Liquidity Dashboard
The dashboard summarizes the current liquidity context, including:
- Current anchor timeframe.
- Current POC, VAH, and VAL.
- Distance from price to profile levels.
- Value-area bias.
- Number of active Naked POCs above and below price.
- Last sweep direction and age.
- Current HVN and LVN zone count.
How to use it
This indicator is intended to be used as a chart-reading and setup-discovery tool.
A practical workflow is:
1. Identify the current value-area context using POC, VAH, and VAL.
2. Observe whether price is trading inside value, above value, or below value.
3. Watch for untested Naked POC levels or clusters above and below current price.
4. Use sweep markers to identify possible stop-run or liquidity-grab events around recent swing highs or lows.
5. Treat A-Grade labels as areas requiring further analysis, not automatic entries.
6. Confirm any setup with your own market structure, execution rules, invalidation level, risk model, and out-of-sample testing.
Originality and usefulness
This script is designed as a liquidity-confluence framework rather than a simple signal overlay. Its purpose is to combine rolling volume-profile context, untested POC tracking, sweep detection, and a transparent scoring model into one chart-based workflow.
The components are intended to work together as follows:
- The rolling profile defines the current auction structure.
- Naked POCs identify prior untested high-volume reference levels.
- HVN and LVN zones provide context for acceptance and thin-volume areas.
- Sweep detection identifies possible liquidity events around recent swing points.
- The A-Grade score only appears when a sweep occurs near meaningful liquidity context.
This combination is intended to help traders evaluate where liquidity events occur in relation to volume-profile structure, rather than viewing sweeps or POC levels in isolation.
Important limitations
This indicator does not predict future price movement.
A Naked POC, HVN, LVN, VAH, VAL, sweep marker, or A-Grade label does not guarantee continuation, reversal, support, resistance, or profitability.
Volume-profile calculations in Pine Script are approximations based on available chart bars and the script’s selected binning method. Results may differ from exchange-native or platform-native volume-profile tools.
Signals and levels can vary depending on:
- Symbol.
- Timeframe.
- Market session.
- Available historical bars.
- Volume quality.
- Profile lookback length.
- Number of bins.
- Anchor timeframe.
- Sweep pivot length.
- Confluence threshold.
Traders should test the indicator across multiple symbols, timeframes, and market conditions before using it in any decision-making process.
Main settings
Volume Profile Engine
- Rolling Profile Lookback: controls how many bars are used to build the rolling volume profile.
- Profile Bins: controls the profile resolution.
- Value Area %: defines how much volume is included in the value area.
- HVN Percentile Threshold: controls which volume bins are classified as high-volume nodes.
- LVN Percentile Threshold: controls which volume bins are classified as low-volume nodes.
Naked POC Tracker
- Anchor Timeframe: defines the higher timeframe used to snapshot prior POC levels.
- Max Naked POC Age: controls how long untested Naked POCs remain active.
- Max Tracked Naked POCs: limits stored levels to protect object limits.
- Consumption Rule: determines whether a Naked POC is considered tested by a wick touch or by a close through the level.
- Cluster Mode: merges nearby Naked POCs into cleaner zones.
Liquidity Sweeps
- Swing Pivot Length: controls the swing-high and swing-low structure used for sweep detection.
- Liquidity Pool Lookback: limits how old a swing level can be and still qualify as sweepable liquidity.
- Require Above-Median Volume: filters sweep signals using a volume condition.
Confluence Engine
- Level Proximity: defines how close a sweep must be to a liquidity level to count as confluence.
- A-Grade Threshold: sets the minimum score required to display an A-Grade label.
Dashboard
- Dashboard Position: controls panel location.
- Dashboard Text Size: controls panel readability.
- Dashboard Theme: provides light or dark panel options.
- Dashboard Accent: controls dashboard accent color.
Alerts
The script includes alert conditions for:
- Bearish Sweep.
- Bullish Sweep.
- A-Grade Short.
- A-Grade Long.
- Value Area Break Up.
- Value Area Break Down.
- Naked POC Tested.
These alerts are informational and should not be interpreted as automatic trade instructions.
Recommended use
This indicator is best used by traders who understand auction-market concepts, volume-profile reference levels, swing liquidity, and discretionary confirmation. It is designed to support analysis, not replace a complete trading plan.
Liquidity Magnet Pro is an educational liquidity-mapping indicator designed to help traders study where price may interact with prior volume concentration, untested Point of Control levels, value-area boundaries, and sweep-based liquidity events.
This script is not a trading strategy and does not place or simulate orders. It does not provide backtested performance results, win-rate claims, profitability claims, or financial advice. Its purpose is to organize liquidity-related information directly on the chart so traders can use it as a research and decision-support tool alongside their own market structure, risk management, and testing process.
What the script does
The indicator combines five main analytical components:
1. Rolling Volume Profile
The script builds an internal rolling volume profile from recent bars. It divides the selected lookback range into price bins and distributes each bar’s volume across the bins touched by that bar. From this profile, it identifies:
- POC: the price bin with the highest accumulated volume.
- VAH: the upper boundary of the selected value area.
- VAL: the lower boundary of the selected value area.
- HVN zones: high-volume areas that may represent prior acceptance or liquidity concentration.
- LVN zones: low-volume areas that may represent thinner auction areas or faster price traversal zones.
This profile is calculated inside Pine Script and does not rely on an external volume-profile feed.
2. Naked POC Tracker
The script snapshots the rolling POC from a selected anchor timeframe, such as 4H, Daily, Weekly, or Monthly. These historical POC levels remain active until price tests them or until they expire based on the selected maximum age.
The purpose of the Naked POC tracker is to highlight untested prior POC levels that may act as reference levels for future market interaction. To reduce chart clutter, the script can merge nearby Naked POCs into visible cluster zones instead of drawing every individual level.
3. Liquidity Sweep Detection
The script detects potential liquidity sweeps using recent swing highs and swing lows. A bearish sweep is detected when price moves above a prior swing high and then closes back below it. A bullish sweep is detected when price moves below a prior swing low and then closes back above it.
An optional above-median volume filter can be used to reduce low-conviction sweep signals.
4. A-Grade Confluence Engine
The A-Grade label is a confluence marker, not a buy or sell command. It appears only when a detected sweep also aligns with nearby liquidity geography.
The confluence score can include:
- Sweep near VAH or VAL.
- Sweep near an HVN zone.
- Sweep near an active Naked POC.
- Movement through an LVN zone.
The script uses a 0–5 scoring model. When the score reaches the selected A-Grade threshold, the script displays an A marker on the chart. A higher threshold generally produces fewer but more selective signals, while a lower threshold produces more frequent signals.
5. Liquidity Dashboard
The dashboard summarizes the current liquidity context, including:
- Current anchor timeframe.
- Current POC, VAH, and VAL.
- Distance from price to profile levels.
- Value-area bias.
- Number of active Naked POCs above and below price.
- Last sweep direction and age.
- Current HVN and LVN zone count.
How to use it
This indicator is intended to be used as a chart-reading and setup-discovery tool.
A practical workflow is:
1. Identify the current value-area context using POC, VAH, and VAL.
2. Observe whether price is trading inside value, above value, or below value.
3. Watch for untested Naked POC levels or clusters above and below current price.
4. Use sweep markers to identify possible stop-run or liquidity-grab events around recent swing highs or lows.
5. Treat A-Grade labels as areas requiring further analysis, not automatic entries.
6. Confirm any setup with your own market structure, execution rules, invalidation level, risk model, and out-of-sample testing.
Originality and usefulness
This script is designed as a liquidity-confluence framework rather than a simple signal overlay. Its purpose is to combine rolling volume-profile context, untested POC tracking, sweep detection, and a transparent scoring model into one chart-based workflow.
The components are intended to work together as follows:
- The rolling profile defines the current auction structure.
- Naked POCs identify prior untested high-volume reference levels.
- HVN and LVN zones provide context for acceptance and thin-volume areas.
- Sweep detection identifies possible liquidity events around recent swing points.
- The A-Grade score only appears when a sweep occurs near meaningful liquidity context.
This combination is intended to help traders evaluate where liquidity events occur in relation to volume-profile structure, rather than viewing sweeps or POC levels in isolation.
Important limitations
This indicator does not predict future price movement.
A Naked POC, HVN, LVN, VAH, VAL, sweep marker, or A-Grade label does not guarantee continuation, reversal, support, resistance, or profitability.
Volume-profile calculations in Pine Script are approximations based on available chart bars and the script’s selected binning method. Results may differ from exchange-native or platform-native volume-profile tools.
Signals and levels can vary depending on:
- Symbol.
- Timeframe.
- Market session.
- Available historical bars.
- Volume quality.
- Profile lookback length.
- Number of bins.
- Anchor timeframe.
- Sweep pivot length.
- Confluence threshold.
Traders should test the indicator across multiple symbols, timeframes, and market conditions before using it in any decision-making process.
Main settings
Volume Profile Engine
- Rolling Profile Lookback: controls how many bars are used to build the rolling volume profile.
- Profile Bins: controls the profile resolution.
- Value Area %: defines how much volume is included in the value area.
- HVN Percentile Threshold: controls which volume bins are classified as high-volume nodes.
- LVN Percentile Threshold: controls which volume bins are classified as low-volume nodes.
Naked POC Tracker
- Anchor Timeframe: defines the higher timeframe used to snapshot prior POC levels.
- Max Naked POC Age: controls how long untested Naked POCs remain active.
- Max Tracked Naked POCs: limits stored levels to protect object limits.
- Consumption Rule: determines whether a Naked POC is considered tested by a wick touch or by a close through the level.
- Cluster Mode: merges nearby Naked POCs into cleaner zones.
Liquidity Sweeps
- Swing Pivot Length: controls the swing-high and swing-low structure used for sweep detection.
- Liquidity Pool Lookback: limits how old a swing level can be and still qualify as sweepable liquidity.
- Require Above-Median Volume: filters sweep signals using a volume condition.
Confluence Engine
- Level Proximity: defines how close a sweep must be to a liquidity level to count as confluence.
- A-Grade Threshold: sets the minimum score required to display an A-Grade label.
Dashboard
- Dashboard Position: controls panel location.
- Dashboard Text Size: controls panel readability.
- Dashboard Theme: provides light or dark panel options.
- Dashboard Accent: controls dashboard accent color.
Alerts
The script includes alert conditions for:
- Bearish Sweep.
- Bullish Sweep.
- A-Grade Short.
- A-Grade Long.
- Value Area Break Up.
- Value Area Break Down.
- Naked POC Tested.
These alerts are informational and should not be interpreted as automatic trade instructions.
Recommended use
This indicator is best used by traders who understand auction-market concepts, volume-profile reference levels, swing liquidity, and discretionary confirmation. It is designed to support analysis, not replace a complete trading plan.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.