OPEN-SOURCE SCRIPT
Vietnamese Stock: Discount Linear Regression Liquidity Grab

The Discount Linear Regression Liquidity Grab is a sophisticated technical analysis tool that combines statistical trend analysis with Premium/Discount Zone and Price Action logic. Unlike standard Linear Regression Channels that repaint or stretch indefinitely, this indicator is dynamic: it automatically detects volatility breakouts to "reset" the channel, creating distinct market "Sections."
This tool is designed to help traders identify trend exhaustion, fair value gaps (FVGs), and high-probability reversal or continuation zones using two distinct built-in strategies.
Key Features
1. Dynamic Channel Resets
The core engine calculates a Linear Regression Channel based on a Pearson R coefficient and Deviation multipliers.
- How it works: When price breaks out of the Upper or Lower Deviation bands, the script recognizes a shift in momentum. It "locks" the previous channel and begins calculating a new one from the breakout point.
- Benefit: This creates a historical map of market structure, showing you exactly where previous trends began and ended.
2. Smart Money Concepts (SMC) Integration
For every completed section (channel), the indicator automatically highlights:
Highest High & Lowest Low Boxes: Identifies the structural range of the previous move.
- Gaps & FVGs: Automatically draws boxes for Fair Value Gaps and Price Gaps within the channel, acting as potential magnets for price.
3. The Discount Zone (New Feature)
The indicator projects a Discount Area (Red Box) from the previous section's midline down to its lowest low.
- Logic: This box represents the "Discount" pricing relative to the previous move.
- Behavior: The box extends to the right until price successfully "grabs liquidity" (closes below the midline/red line). Once the grab occurs, the box stops extending, marking that the liquidity event is complete.
Built-In Strategies
This indicator includes two automated strategy signals based on the interaction between current price and historical sections.
Strategy 1: Breakout & Retest (Trend Continuation)
This strategy looks for a classic resistance-turned-support setup.
- Breakout: Price closes above the Highest High of a previous section (Triangle Up).
- Retest: Price pulls back and closes at or below that breakout level (Triangle Down).
- Confirmation: Price breaks above the high of the initial breakout candle (Green Background).
Strategy 2: Midline Reclaim (Mean Reversion / Discount Buy)
This strategy focuses on buying from the "Discount" zone.
- Liquidity Grab: Price drops below the Midline (Red Line) of a previous section, entering the Discount Zone.
- Reclaim: Price closes back above the Midline, signaling that the dip was bought up.
Signal: A Diamond shape and Teal Background appear.
How to Use
- Trend Trading: Use the Dynamic Channels to visualize the current slope. If the channel is angling up, look for long setups.
- Confluence: Use the Discount Zones and FVG boxes as areas of interest. If price enters a Red Discount Box and forms a reversal pattern, it is a high-probability entry.
- Stop Loss Placement: The Lowest Low boxes of previous sections serve as excellent invalidation points for long positions.
Alerts
The indicator comes with pre-configured alerts for:
- Strategy 1 Confirmation.
- Strategy 2 Midline Reclaim.
- New Channel Formation (Trend Reset).
- Liquidity Grab Events.
This tool is designed to help traders identify trend exhaustion, fair value gaps (FVGs), and high-probability reversal or continuation zones using two distinct built-in strategies.
Key Features
1. Dynamic Channel Resets
The core engine calculates a Linear Regression Channel based on a Pearson R coefficient and Deviation multipliers.
- How it works: When price breaks out of the Upper or Lower Deviation bands, the script recognizes a shift in momentum. It "locks" the previous channel and begins calculating a new one from the breakout point.
- Benefit: This creates a historical map of market structure, showing you exactly where previous trends began and ended.
2. Smart Money Concepts (SMC) Integration
For every completed section (channel), the indicator automatically highlights:
Highest High & Lowest Low Boxes: Identifies the structural range of the previous move.
- Gaps & FVGs: Automatically draws boxes for Fair Value Gaps and Price Gaps within the channel, acting as potential magnets for price.
3. The Discount Zone (New Feature)
The indicator projects a Discount Area (Red Box) from the previous section's midline down to its lowest low.
- Logic: This box represents the "Discount" pricing relative to the previous move.
- Behavior: The box extends to the right until price successfully "grabs liquidity" (closes below the midline/red line). Once the grab occurs, the box stops extending, marking that the liquidity event is complete.
Built-In Strategies
This indicator includes two automated strategy signals based on the interaction between current price and historical sections.
Strategy 1: Breakout & Retest (Trend Continuation)
This strategy looks for a classic resistance-turned-support setup.
- Breakout: Price closes above the Highest High of a previous section (Triangle Up).
- Retest: Price pulls back and closes at or below that breakout level (Triangle Down).
- Confirmation: Price breaks above the high of the initial breakout candle (Green Background).
Strategy 2: Midline Reclaim (Mean Reversion / Discount Buy)
This strategy focuses on buying from the "Discount" zone.
- Liquidity Grab: Price drops below the Midline (Red Line) of a previous section, entering the Discount Zone.
- Reclaim: Price closes back above the Midline, signaling that the dip was bought up.
Signal: A Diamond shape and Teal Background appear.
How to Use
- Trend Trading: Use the Dynamic Channels to visualize the current slope. If the channel is angling up, look for long setups.
- Confluence: Use the Discount Zones and FVG boxes as areas of interest. If price enters a Red Discount Box and forms a reversal pattern, it is a high-probability entry.
- Stop Loss Placement: The Lowest Low boxes of previous sections serve as excellent invalidation points for long positions.
Alerts
The indicator comes with pre-configured alerts for:
- Strategy 1 Confirmation.
- Strategy 2 Midline Reclaim.
- New Channel Formation (Trend Reset).
- Liquidity Grab Events.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
MikeJSaylor @ telegram
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
MikeJSaylor @ telegram
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.