OPEN-SOURCE SCRIPT
2MA Cross with Glow Effects

2MA Cross with Glow Effects
Overview
This indicator enhances the classic moving average crossover strategy with a dynamic and visually appealing "glow" effect. It plots two customisable moving averages on the chart and illuminates the area around them when a crossover occurs, providing a clear and intuitive signal for potential trend changes.
Features
How It Works
The core of the indicator is the calculation of two moving averages based on the user's selected type and length. The script continuously monitors the relationship between these two MAs.
The "glow" is a sophisticated visual effect achieved by using Pine Script's `fill()` function to create a smooth, colored gradient around the MA lines. The glow is conditionally rendered:
To ensure a consistent visual appearance across different chart timeframes, the indicator incorporates a `tfMultiplier` that automatically adjusts the glow's width.
How to Use
This indicator can be used in the same way as a standard moving average crossover strategy
Traders can use this for trend identification, entry/exit signals, and as a component of a more comprehensive trading system. For example, a common setup is using a 20-period EMA and a 50-period EMA to capture medium-term trends.
Disclaimer
This indicator is designed as a technical analysis tool and should be used in conjunction with other forms of analysis and proper risk management.
Past performance does not guarantee future results, and traders should thoroughly test any strategy before implementing it with real capital.
Overview
This indicator enhances the classic moving average crossover strategy with a dynamic and visually appealing "glow" effect. It plots two customisable moving averages on the chart and illuminates the area around them when a crossover occurs, providing a clear and intuitive signal for potential trend changes.
Features
- Dual Moving Averages: Configure two independent moving averages to suit your trading style.
- Multiple MA Types: Choose from a wide range of moving average types for each line, including:
SMA (Simple Moving Average)
EMA (Exponential Moving Average)
WMA (Weighted Moving Average)
VWMA (Volume-Weighted Moving Average)
RMA (Relative Moving Average)
HMA (Hull Moving Average)
ALMA (Arnaud Legoux Moving Average)
LSMA (Least Squares Moving Average)
- Customisable Appearance: Adjust the length, line width, and color for each moving average.
- Unique Glow Effect: A configurable glow appears around the moving averages during a crossover, providing an unmistakable visual cue. You can control the intensity and width of this effect.
How It Works
The core of the indicator is the calculation of two moving averages based on the user's selected type and length. The script continuously monitors the relationship between these two MAs.
The "glow" is a sophisticated visual effect achieved by using Pine Script's `fill()` function to create a smooth, colored gradient around the MA lines. The glow is conditionally rendered:
- When the first moving average (MA1) crosses above the second (MA2), MA1 will glow above its line.
- When MA1 crosses below MA2, it will glow below its line.
- The same logic is applied to MA2, creating a dual-glow effect that clearly shows which MA is dominant.
To ensure a consistent visual appearance across different chart timeframes, the indicator incorporates a `tfMultiplier` that automatically adjusts the glow's width.
How to Use
This indicator can be used in the same way as a standard moving average crossover strategy
- Bullish Signal: Look for the shorter-period moving average to cross above the longer-period moving average. The glow effect will make this event highly visible.
- Bearish Signal: Look for the shorter-period moving average to cross below the longer-period moving average.
Traders can use this for trend identification, entry/exit signals, and as a component of a more comprehensive trading system. For example, a common setup is using a 20-period EMA and a 50-period EMA to capture medium-term trends.
Disclaimer
This indicator is designed as a technical analysis tool and should be used in conjunction with other forms of analysis and proper risk management.
Past performance does not guarantee future results, and traders should thoroughly test any strategy before implementing it with real capital.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.