OPEN-SOURCE SCRIPT
Liquidity + Order Blocks

Liquidity & Order Blocks [Pine Script
📌 Overview
Liquidity & Order Blocks [V6] is a price-action and Smart Money Concepts (SMC) style indicator designed to help traders visually identify important liquidity areas, liquidity sweeps, and potential order-block zones directly on the chart.
The indicator is designed primarily as a market-structure and price-action analysis tool. It does not guarantee profitable trades and should not be used as a standalone trading system.
---
🔹 What Does This Indicator Show?
1. Buy-Side Liquidity (BSL)
Buy-side liquidity is generally found above previous swing highs.
The indicator identifies swing highs and projects liquidity levels from them.
When price moves above a previous swing high and then closes back below that level, the indicator can identify it as a:
BSL Sweep — Buy-Side Liquidity Sweep
This can be useful when studying potential bearish reactions after liquidity has been taken.
---
2. Sell-Side Liquidity (SSL)
Sell-side liquidity is generally found below previous swing lows.
The indicator identifies swing lows and projects liquidity levels from them.
When price moves below a previous swing low and then closes back above that level, the indicator can identify it as:
SSL Sweep — Sell-Side Liquidity Sweep
This can be useful when studying potential bullish reactions after liquidity has been taken.
---
🔹 Order Blocks
The indicator automatically searches for potential order blocks following liquidity sweeps.
🟢 Bullish Order Block
A bullish order block is identified after a sell-side liquidity sweep when bullish price action appears.
The indicator searches backward for the most recent bearish candle and uses that candle's high/low as the potential bullish order-block zone.
🔴 Bearish Order Block
A bearish order block is identified after a buy-side liquidity sweep when bearish price action appears.
The indicator searches backward for the most recent bullish candle and uses that candle's high/low as the potential bearish order-block zone.
---
📚 How To Use It
A simple workflow is:
Step 1 — Identify the Market Structure
Start by looking at the overall trend and recent swing highs/lows.
Ask yourself:
- Is price making higher highs and higher lows?
- Is price making lower highs and lower lows?
- Where are the obvious swing points?
- Where might liquidity be resting?
Do not immediately enter a trade just because an order block appears.
---
Step 2 — Find Liquidity
Look for obvious:
Buy-side liquidity
- Previous swing highs
- Equal/near-equal highs
- Areas where traders may have placed stop orders
Sell-side liquidity
- Previous swing lows
- Equal/near-equal lows
- Areas where traders may have placed stop orders
---
Step 3 — Wait for the Sweep
Instead of chasing price into liquidity, watch how price reacts when the liquidity level is taken.
For example:
Price moves below a previous low → takes sell-side liquidity → closes back above the level.
This can indicate that the liquidity below the low has been taken.
The indicator marks this as an SSL Sweep.
---
Step 4 — Look for the Order Block
After a liquidity sweep, look for the corresponding order-block zone.
For a potential bullish setup:
SSL Sweep → Bullish reaction → Bullish Order Block
For a potential bearish setup:
BSL Sweep → Bearish reaction → Bearish Order Block
The order block should be treated as an area of interest, not an automatic entry.
---
Step 5 — Wait for Confirmation
Before entering a trade, consider additional confirmation such as:
- Market Structure Shift
- Break of Structure (BOS)
- Change of Character (CHoCH)
- Strong displacement
- Fair Value Gap (FVG)
- Retest of the order block
- Higher-timeframe direction
- Risk/reward conditions
The more confluence you have, the more selective your setup can become.
---
🎯 Example Bullish Setup
A simplified bullish sequence can look like:
Sell-Side Liquidity → SSL Sweep → Bullish Displacement → Bullish Order Block → Retest → Confirmation
Instead of buying immediately after the sweep, study whether price actually produces a meaningful bullish reaction.
---
🎯 Example Bearish Setup
A simplified bearish sequence can look like:
Buy-Side Liquidity → BSL Sweep → Bearish Displacement → Bearish Order Block → Retest → Confirmation
Again, the indicator is intended to help identify the area for further analysis rather than automatically telling you to sell.
---
⚙️ Important Settings
Swing Length
Controls how sensitive swing-high and swing-low detection is.
Lower value
- More swing points
- More liquidity levels
- More signals
- More noise
Higher value
- Fewer swing points
- Larger structural levels
- Less noise
- More selective analysis
Start with a moderate value and adjust it according to the market and timeframe.
---
Order Block Search Bars
Controls how far back the indicator searches for the candle used to create the potential order block.
A larger value allows the indicator to search farther back, but may also produce zones that are less relevant to the immediate price action.
---
Order Block Extension
Controls how far the order-block zone extends into the future.
---
Maximum Order Blocks
Controls the number of historical order-block zones displayed on the chart.
---
Remove Broken Order Blocks
When enabled, an order block can be removed after price invalidates it according to the indicator's rules.
---
📖 How To Learn Liquidity & Order Blocks
If you are new to this concept, don't try to memorize dozens of SMC terms at once.
Learn in this order:
1️⃣ Market Structure
Learn:
- Swing High
- Swing Low
- Higher High (HH)
- Higher Low (HL)
- Lower High (LH)
- Lower Low (LL)
2️⃣ Liquidity
Learn why liquidity can form around:
- Previous highs
- Previous lows
- Equal highs
- Equal lows
- Obvious support/resistance
3️⃣ Liquidity Sweeps
Study what happens when price trades beyond an obvious high/low and then reverses.
4️⃣ Displacement
Learn to recognize strong directional price movement following a liquidity event.
5️⃣ Order Blocks
Study the relationship between the final opposing candle, displacement, and subsequent price reaction.
6️⃣ Confluence
Finally, combine liquidity and order blocks with market structure, FVGs, higher-timeframe bias, and risk management.
⭐ Recommended Workflow
For a simple approach:
Higher-Timeframe Bias
↓
Identify Liquidity
↓
Wait for Liquidity Sweep
↓
Look for Displacement
↓
Identify Order Block
↓
Wait for Retest
↓
Look for Confirmation
↓
Manage Risk
The goal is not to take every signal.
The goal is to use the indicator to help you understand where liquidity may be located, what price does when that liquidity is taken, and where potential order-block zones may exist.
---
🔔 Alerts
The indicator includes alert conditions for:
- Buy-Side Liquidity Sweep
- Sell-Side Liquidity Sweep
- Bullish Order Block
- Bearish Order Block
You can create TradingView alerts from these conditions and use them as notifications for further analysis.
---
Trade smart. Study the chart. Manage your risk.
📌 Overview
Liquidity & Order Blocks [V6] is a price-action and Smart Money Concepts (SMC) style indicator designed to help traders visually identify important liquidity areas, liquidity sweeps, and potential order-block zones directly on the chart.
The indicator is designed primarily as a market-structure and price-action analysis tool. It does not guarantee profitable trades and should not be used as a standalone trading system.
---
🔹 What Does This Indicator Show?
1. Buy-Side Liquidity (BSL)
Buy-side liquidity is generally found above previous swing highs.
The indicator identifies swing highs and projects liquidity levels from them.
When price moves above a previous swing high and then closes back below that level, the indicator can identify it as a:
BSL Sweep — Buy-Side Liquidity Sweep
This can be useful when studying potential bearish reactions after liquidity has been taken.
---
2. Sell-Side Liquidity (SSL)
Sell-side liquidity is generally found below previous swing lows.
The indicator identifies swing lows and projects liquidity levels from them.
When price moves below a previous swing low and then closes back above that level, the indicator can identify it as:
SSL Sweep — Sell-Side Liquidity Sweep
This can be useful when studying potential bullish reactions after liquidity has been taken.
---
🔹 Order Blocks
The indicator automatically searches for potential order blocks following liquidity sweeps.
🟢 Bullish Order Block
A bullish order block is identified after a sell-side liquidity sweep when bullish price action appears.
The indicator searches backward for the most recent bearish candle and uses that candle's high/low as the potential bullish order-block zone.
🔴 Bearish Order Block
A bearish order block is identified after a buy-side liquidity sweep when bearish price action appears.
The indicator searches backward for the most recent bullish candle and uses that candle's high/low as the potential bearish order-block zone.
---
📚 How To Use It
A simple workflow is:
Step 1 — Identify the Market Structure
Start by looking at the overall trend and recent swing highs/lows.
Ask yourself:
- Is price making higher highs and higher lows?
- Is price making lower highs and lower lows?
- Where are the obvious swing points?
- Where might liquidity be resting?
Do not immediately enter a trade just because an order block appears.
---
Step 2 — Find Liquidity
Look for obvious:
Buy-side liquidity
- Previous swing highs
- Equal/near-equal highs
- Areas where traders may have placed stop orders
Sell-side liquidity
- Previous swing lows
- Equal/near-equal lows
- Areas where traders may have placed stop orders
---
Step 3 — Wait for the Sweep
Instead of chasing price into liquidity, watch how price reacts when the liquidity level is taken.
For example:
Price moves below a previous low → takes sell-side liquidity → closes back above the level.
This can indicate that the liquidity below the low has been taken.
The indicator marks this as an SSL Sweep.
---
Step 4 — Look for the Order Block
After a liquidity sweep, look for the corresponding order-block zone.
For a potential bullish setup:
SSL Sweep → Bullish reaction → Bullish Order Block
For a potential bearish setup:
BSL Sweep → Bearish reaction → Bearish Order Block
The order block should be treated as an area of interest, not an automatic entry.
---
Step 5 — Wait for Confirmation
Before entering a trade, consider additional confirmation such as:
- Market Structure Shift
- Break of Structure (BOS)
- Change of Character (CHoCH)
- Strong displacement
- Fair Value Gap (FVG)
- Retest of the order block
- Higher-timeframe direction
- Risk/reward conditions
The more confluence you have, the more selective your setup can become.
---
🎯 Example Bullish Setup
A simplified bullish sequence can look like:
Sell-Side Liquidity → SSL Sweep → Bullish Displacement → Bullish Order Block → Retest → Confirmation
Instead of buying immediately after the sweep, study whether price actually produces a meaningful bullish reaction.
---
🎯 Example Bearish Setup
A simplified bearish sequence can look like:
Buy-Side Liquidity → BSL Sweep → Bearish Displacement → Bearish Order Block → Retest → Confirmation
Again, the indicator is intended to help identify the area for further analysis rather than automatically telling you to sell.
---
⚙️ Important Settings
Swing Length
Controls how sensitive swing-high and swing-low detection is.
Lower value
- More swing points
- More liquidity levels
- More signals
- More noise
Higher value
- Fewer swing points
- Larger structural levels
- Less noise
- More selective analysis
Start with a moderate value and adjust it according to the market and timeframe.
---
Order Block Search Bars
Controls how far back the indicator searches for the candle used to create the potential order block.
A larger value allows the indicator to search farther back, but may also produce zones that are less relevant to the immediate price action.
---
Order Block Extension
Controls how far the order-block zone extends into the future.
---
Maximum Order Blocks
Controls the number of historical order-block zones displayed on the chart.
---
Remove Broken Order Blocks
When enabled, an order block can be removed after price invalidates it according to the indicator's rules.
---
📖 How To Learn Liquidity & Order Blocks
If you are new to this concept, don't try to memorize dozens of SMC terms at once.
Learn in this order:
1️⃣ Market Structure
Learn:
- Swing High
- Swing Low
- Higher High (HH)
- Higher Low (HL)
- Lower High (LH)
- Lower Low (LL)
2️⃣ Liquidity
Learn why liquidity can form around:
- Previous highs
- Previous lows
- Equal highs
- Equal lows
- Obvious support/resistance
3️⃣ Liquidity Sweeps
Study what happens when price trades beyond an obvious high/low and then reverses.
4️⃣ Displacement
Learn to recognize strong directional price movement following a liquidity event.
5️⃣ Order Blocks
Study the relationship between the final opposing candle, displacement, and subsequent price reaction.
6️⃣ Confluence
Finally, combine liquidity and order blocks with market structure, FVGs, higher-timeframe bias, and risk management.
⭐ Recommended Workflow
For a simple approach:
Higher-Timeframe Bias
↓
Identify Liquidity
↓
Wait for Liquidity Sweep
↓
Look for Displacement
↓
Identify Order Block
↓
Wait for Retest
↓
Look for Confirmation
↓
Manage Risk
The goal is not to take every signal.
The goal is to use the indicator to help you understand where liquidity may be located, what price does when that liquidity is taken, and where potential order-block zones may exist.
---
🔔 Alerts
The indicator includes alert conditions for:
- Buy-Side Liquidity Sweep
- Sell-Side Liquidity Sweep
- Bullish Order Block
- Bearish Order Block
You can create TradingView alerts from these conditions and use them as notifications for further analysis.
---
Trade smart. Study the chart. Manage your risk.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Free forex gold & crypto signals
t.me/LondonTradingStandards
free gold signals
t.me/+F9p2HlCBcosyMDE8
exness broker one.exnessonelink.com/a/g8y6w860c5
t.me/LondonTradingStandards
free gold signals
t.me/+F9p2HlCBcosyMDE8
exness broker one.exnessonelink.com/a/g8y6w860c5
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Free forex gold & crypto signals
t.me/LondonTradingStandards
free gold signals
t.me/+F9p2HlCBcosyMDE8
exness broker one.exnessonelink.com/a/g8y6w860c5
t.me/LondonTradingStandards
free gold signals
t.me/+F9p2HlCBcosyMDE8
exness broker one.exnessonelink.com/a/g8y6w860c5
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.