OPEN-SOURCE SCRIPT
Swing-Based Volatility Index

Swing-Based Volatility Index
This indicator helps traders quickly determine whether the market has moved enough over the past few hours to justify scalping.
It measures the percentage price swing (high to low) over a configurable time window (e.g., last 4–8 hours) and compares it to a minimum threshold (e.g., 1%).
✅ If the percent move exceeds the threshold → Market is volatile enough to scalp (green background).
🚫 If it's below the threshold → Market is too quiet (red background).
Features:
Adjustable lookback period in hours
Custom threshold for volatility sensitivity
Automatically adapts to the current chart timeframe
This tool is ideal for scalpers and short-term traders who want to avoid entering trades in low-volatility environments.
This indicator helps traders quickly determine whether the market has moved enough over the past few hours to justify scalping.
It measures the percentage price swing (high to low) over a configurable time window (e.g., last 4–8 hours) and compares it to a minimum threshold (e.g., 1%).
✅ If the percent move exceeds the threshold → Market is volatile enough to scalp (green background).
🚫 If it's below the threshold → Market is too quiet (red background).
Features:
Adjustable lookback period in hours
Custom threshold for volatility sensitivity
Automatically adapts to the current chart timeframe
This tool is ideal for scalpers and short-term traders who want to avoid entering trades in low-volatility environments.
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.