OPEN-SOURCE SCRIPT
MA 3:1 & CZs

This is the script that finds Consolidation Zones in Real Time accompanied by Three Moving Averages (20-50-200).
How does it work?
-The script finds the highest/lowest bars using "Loopback Period".
-Then calculate the address.
-Using direction and high/low bar information, calculate Consolidation Zones in real time.
-If the length of the consolidation area is equal to or greater than the minimum length defined by the user, this area is displayed as Consolidation Zone.
-Then, the Consolidation Zone is automatically extended if there is no rupture.
If you increase the loopback length, you will get larger Consolidation Zones.
The Consolidation Zones allow us to operate within said Zones, becoming independent of the instability of the chart outside said Zones.
We can set a Resistance (green arrow) at the Support of the next higher Zone and a Support (red arrow) at the Resistance of the lower Zone.
How does it work?
-The script finds the highest/lowest bars using "Loopback Period".
-Then calculate the address.
-Using direction and high/low bar information, calculate Consolidation Zones in real time.
-If the length of the consolidation area is equal to or greater than the minimum length defined by the user, this area is displayed as Consolidation Zone.
-Then, the Consolidation Zone is automatically extended if there is no rupture.
If you increase the loopback length, you will get larger Consolidation Zones.
The Consolidation Zones allow us to operate within said Zones, becoming independent of the instability of the chart outside said Zones.
We can set a Resistance (green arrow) at the Support of the next higher Zone and a Support (red arrow) at the Resistance of the lower Zone.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.