Moving Average Color EMA/WMA
Jun 2, 2017

The Moving Average Color EMA/WMA indicator provides a visual trend analysis tool by plotting color-coded Exponential and Weighted Moving Averages to help traders identify momentum shifts and trend direction at a glance.
Usage
The indicator is designed to streamline trend identification by applying dynamic colors to moving average lines. Traders can use the script to determine the prevailing market bias: a green line signifies an uptrend (increasing value), while a red line signifies a downtrend (decreasing value).
By enabling both the EMA and WMA simultaneously, users can compare two different smoothing methods to confirm trend strength or identify potential crossovers. The indicator also features built-in alert conditions that trigger when the moving averages change direction, assisting in the timing of potential entries or exits.
Details
The script is a refactored version of original concepts developed by @caballar1 and Robert Nance. It calculates direction by comparing the current output of the moving average to its value on the previous bar. If the current value is greater than the previous, the "Up" state is triggered; if lower, the "Down" state is triggered. The EMA reacts more significantly to recent price data, while the WMA assigns a linear weighting to the lookback period, providing a different perspective on price action smoothing.
Settings
- Show EMA1 on chart: Toggles the visibility of the Exponential Moving Average line.
- EMA Length: Determines the number of bars used to calculate the Exponential Moving Average.
- Show WMA on chart: Toggles the visibility of the Weighted Moving Average line.
- WMA Length: Determines the number of bars used to calculate the Weighted Moving Average.
FAQ
What do the green and red colors signify? The colors represent the slope of the moving average. Green indicates the moving average is currently rising, suggesting bullish momentum, while red indicates it is falling, suggesting bearish momentum.
Can I set alerts for direction changes? Yes, the script includes alert logic that triggers whenever the EMA or WMA switches from an upward slope to a downward slope and vice versa.
How do I access the Moving Average Color EMA/WMA? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.