OPEN-SOURCE SCRIPT
Market Regime Detector

📊Market Regime - Algo Akademi (Market Filter System)
This indicator is a market regime filter designed to help traders avoid "choppy" price action and focus only on high-probability environments. Rather than providing direct Buy/Sell signals, it identifies when the market conditions are "ideal" for trend-following strategies.
When the background turns green, it means all your predefined criteria for a healthy market are met.
🔍 Core Logic (4-Point Confirmation)
The script uses a hybrid approach to analyze the market's "quality":
Trend Strength (ADX): It checks if ADX is above 25. This ensures you are not trading in a flat or sideways market.
Bullish Momentum (RSI): By ensuring RSI is above 50, it filters for zones where buyers have the upper hand.
Volatility Control (ATR %): It calculates the ATR as a percentage of price. If volatility is above 3%, the background stays clear to protect you from "stop-hunting" or extreme spikes.
Time Filter: It automatically excludes Mondays to avoid the typical weekly open manipulations and "fake-outs."
💡 How to Use
The "Green Light" Rule: Use this as a secondary filter for your existing strategy. If your main setup triggers while the background is green, the statistical probability of success is generally higher.
Compatibility: Works best on 15m, 1h, and 4h timeframes.
Asset Class: While optimized for general use, you can tweak the 3% volatility threshold in the code to better suit Crypto (high vol) or Forex (low vol).
Disclaimer: Trading involves risk. This tool is for educational purposes and should be used as part of a complete trading plan.
This indicator is a market regime filter designed to help traders avoid "choppy" price action and focus only on high-probability environments. Rather than providing direct Buy/Sell signals, it identifies when the market conditions are "ideal" for trend-following strategies.
When the background turns green, it means all your predefined criteria for a healthy market are met.
🔍 Core Logic (4-Point Confirmation)
The script uses a hybrid approach to analyze the market's "quality":
Trend Strength (ADX): It checks if ADX is above 25. This ensures you are not trading in a flat or sideways market.
Bullish Momentum (RSI): By ensuring RSI is above 50, it filters for zones where buyers have the upper hand.
Volatility Control (ATR %): It calculates the ATR as a percentage of price. If volatility is above 3%, the background stays clear to protect you from "stop-hunting" or extreme spikes.
Time Filter: It automatically excludes Mondays to avoid the typical weekly open manipulations and "fake-outs."
💡 How to Use
The "Green Light" Rule: Use this as a secondary filter for your existing strategy. If your main setup triggers while the background is green, the statistical probability of success is generally higher.
Compatibility: Works best on 15m, 1h, and 4h timeframes.
Asset Class: While optimized for general use, you can tweak the 3% volatility threshold in the code to better suit Crypto (high vol) or Forex (low vol).
Disclaimer: Trading involves risk. This tool is for educational purposes and should be used as part of a complete trading plan.
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.