OPEN-SOURCE SCRIPT
Advanced MTF Supply & Demand Zones

How it works
MTF Setup: By default, it looks at the 240 minute (4 Hour) timeframe to find significant structures while you trade on a lower timeframe chart.
Pivot Identification: It looks for pivot highs and lows on the higher timeframe. You can adjust the Left Length and Right Length in the settings to dictate how major a pivot needs to be to form a zone.
Zone Drawing:
Supply zones are drawn from the high of a major high to the body (highest of the open/close) of that candle.
Demand zones are drawn from the lowest low to the body of that candle.
Breakouts: When the chart's closing price breaks out of the top of a supply zone or the bottom of a demand zone, it becomes invalidated. You can toggle "Show Broken Zones" in the settings to either remove them immediately or keep them on the chart with higher transparency.
What's New:
Order Flow & Imbalance Constraints:
You can now toggle "Require Volume Confirmation" in the settings. This ensures a zone only forms if the pivot candle had higher than average volume (acting as an order block).
You can toggle "Require FVG / Imbalance" to ensure that immediately after the pivot, there was a Fair Value Gap created, confirming strong institutional order flow displacement.
Major & Minor Zones:
In the settings, you can now change "Zone Significance" to display only Major zones, only Minor zones, or Both. Major zones use longer pivot lengths, meaning they represent stronger, more significant structural points, whereas minor zones form on shorter, more frequent pivot points.
Tested vs Untested States:
The indicator keeps track of price returning to test the zones. When a zone is tested (price enters the zone but doesn't close on the other side to break it), its background color shifts to a secondary color.
You have 4 color options now: Fresh Demand, Tested Demand, Fresh Supply, and Tested Supply.
Here's what changed:
Label Positioning: Supply labels are positioned at the top center of the supply zones with their pointers pointing down (label.style_label_down). Demand labels are positioned at the bottom center with their pointers pointing up (label.style_label_up).
Dynamic Centering: As the zone boxes extend over time onto new candles, the script updates the X-coordinate of the label so it continues to stay perfectly centered within the box.
Dynamic Formatting: The labels say whether the zone is Major or Minor (e.g. Major Demand, Minor Supply). When the zone is tested, the label text color will match the updated 'tested' color of the zone box. If a zone breaks and Show Broken Zones is active, the label also becomes highly transparent to match the dashed/faded aesthetic.
MTF Setup: By default, it looks at the 240 minute (4 Hour) timeframe to find significant structures while you trade on a lower timeframe chart.
Pivot Identification: It looks for pivot highs and lows on the higher timeframe. You can adjust the Left Length and Right Length in the settings to dictate how major a pivot needs to be to form a zone.
Zone Drawing:
Supply zones are drawn from the high of a major high to the body (highest of the open/close) of that candle.
Demand zones are drawn from the lowest low to the body of that candle.
Breakouts: When the chart's closing price breaks out of the top of a supply zone or the bottom of a demand zone, it becomes invalidated. You can toggle "Show Broken Zones" in the settings to either remove them immediately or keep them on the chart with higher transparency.
What's New:
Order Flow & Imbalance Constraints:
You can now toggle "Require Volume Confirmation" in the settings. This ensures a zone only forms if the pivot candle had higher than average volume (acting as an order block).
You can toggle "Require FVG / Imbalance" to ensure that immediately after the pivot, there was a Fair Value Gap created, confirming strong institutional order flow displacement.
Major & Minor Zones:
In the settings, you can now change "Zone Significance" to display only Major zones, only Minor zones, or Both. Major zones use longer pivot lengths, meaning they represent stronger, more significant structural points, whereas minor zones form on shorter, more frequent pivot points.
Tested vs Untested States:
The indicator keeps track of price returning to test the zones. When a zone is tested (price enters the zone but doesn't close on the other side to break it), its background color shifts to a secondary color.
You have 4 color options now: Fresh Demand, Tested Demand, Fresh Supply, and Tested Supply.
Here's what changed:
Label Positioning: Supply labels are positioned at the top center of the supply zones with their pointers pointing down (label.style_label_down). Demand labels are positioned at the bottom center with their pointers pointing up (label.style_label_up).
Dynamic Centering: As the zone boxes extend over time onto new candles, the script updates the X-coordinate of the label so it continues to stay perfectly centered within the box.
Dynamic Formatting: The labels say whether the zone is Major or Minor (e.g. Major Demand, Minor Supply). When the zone is tested, the label text color will match the updated 'tested' color of the zone box. If a zone breaks and Show Broken Zones is active, the label also becomes highly transparent to match the dashed/faded aesthetic.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.