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.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.