OPEN-SOURCE SCRIPT

Simple Moving Average with Regime Detection by iGrey.Trading

This indicator helps traders identify market regimes using the powerful combination of 50 and 200 SMAs. It provides clear visual signals and detailed metrics for trend-following strategies.


Key Features:
- Dual SMA System (50/200) for regime identification
- Colour-coded candles for easy trend visualisation
- Metrics dashboard

Core Signals:
- Bullish Regime: Price < 200 SMA
- Bearish Regime: Price > 200 SMA
- Additional confirmation: 50 SMA Cross-over or Cross-under (golden cross or death cross)

Metrics Dashboard:
- Current Regime Status (Bull/Bear)
- SMA Distance (% from price to 50 SMA)
- Regime Distance (% from price to 200 SMA)
- Regime Duration (bars in current regime)

Usage Instructions:
1. Apply the indicator to your chart
2. Configure the SMA lengths if desired (default: 50/200)
3. Monitor the color-coded candles:
- Green: Bullish regime
- Red: Bearish regime
4. Use the metrics dashboard for detailed analysis

Settings Guide:
- Length: Short-term SMA period (default: 50)
- Source: Price calculation source (default: close)
- Regime Filter Length: Long-term SMA period (default: 200)
- Regime Filter Source: Price source for regime calculation (default: close)

Trading Tips:
- Use bullish regimes for long positions
- Use bearish regimes for capital preservation or short positions
- Consider regime duration for trend strength
- Monitor distance metrics for potential reversals
- Combine with other systems for confluence

#trend-following #moving average #regime #sma #momentum

Risk Management:
- Not a standalone trading system
- Should be used with proper position sizing
- Consider market conditions and volatility
- Always use stop losses

Best Practices:
- Monitor multiple timeframes
- Use with other confirmation tools
- Consider fundamental factors


Version: 1.0
Created by: iGREY.Trading


Release Notes
// v1.1 Allows table overlay customisation
// v1.2 Update to v6 pinescript
Bitcoin (Cryptocurrency)BTCBTCUSDBTCUSDTMomentum Indicator (MOM)moving_averageSimple Moving Average (SMA)simplemovingaveragessmatradingTrend Analysistrendfollowing

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?


更多:

免责声明