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.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
MikeJSaylor @ telegram
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
MikeJSaylor @ telegram
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน