OPEN-SOURCE SCRIPT
Market Sleep Zones

Hey traders 👋
This script shows when the market is in a "sleeping" or low volatility phase. I call it Market Sleep Zones 😴
It looks at the average price movement over a window (default 20 bars), and if the price changes are small (under a % threshold you set), it highlights that area on the chart with a soft green background.
💡 This can help spot moments when the market is quiet — maybe before a breakout or just moving sideways.
It also places labels to mark where these zones start and end, so it's easy to track.
You can change:
The window size (how many bars to look back)
The breath depth (how much price is allowed to move before it’s "not sleeping" anymore)
Not perfect, but helpful if you want to avoid getting chopped in low-volatility zones or want to prepare for when the market "wakes up" 😄
Let me know if you find it useful or have ideas to improve it!
This script shows when the market is in a "sleeping" or low volatility phase. I call it Market Sleep Zones 😴
It looks at the average price movement over a window (default 20 bars), and if the price changes are small (under a % threshold you set), it highlights that area on the chart with a soft green background.
💡 This can help spot moments when the market is quiet — maybe before a breakout or just moving sideways.
It also places labels to mark where these zones start and end, so it's easy to track.
You can change:
The window size (how many bars to look back)
The breath depth (how much price is allowed to move before it’s "not sleeping" anymore)
Not perfect, but helpful if you want to avoid getting chopped in low-volatility zones or want to prepare for when the market "wakes up" 😄
Let me know if you find it useful or have ideas to improve it!
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.