All indicators

Weighted Moving Average with Trend Color

Feb 7, 2018

Static chart image
SignalsMoving Averages

The Weighted Moving Average with Trend Color indicator provides a visual representation of price momentum by calculating a weighted average that emphasizes recent data points and changes color based on the current slope. This tool is particularly effective for identifying trend direction and potential reversals across various timeframes.

Usage

The Weighted Moving Average with Trend Color can be used as a standalone trend filter or as a core component of trend-following strategies. Users typically look for the line color to identify the prevailing market bias: a green line indicates an upward slope (bullish momentum), while a red line indicates a downward slope (bearish momentum).

This indicator is highly effective for Weinstein-based strategies, particularly on weekly timeframes, where a 30-period WMA is often used to distinguish between stage 2 (advancing) and stage 4 (declining) market cycles. Traders can also utilize the built-in alert system to receive notifications the moment the WMA slope changes direction.

Details

The script calculates a standard Weighted Moving Average (WMA), which assigns more weight to the most recent price data compared to older data in the lookback period. This results in an indicator that is more responsive to price action than a Simple Moving Average (SMA).

The trend detection logic is based on a point-to-point comparison:

  • Bullish Trend: Triggered when the current WMA value is greater than or equal to the previous bar's WMA value.
  • Bearish Trend: Triggered when the current WMA value is lower than the previous bar's WMA value.

By color-coding these states directly on the price chart, the indicator reduces the cognitive load required to determine if a trend is accelerating or decelerating.

Settings

  • Source: Determines the price data used for the calculation (e.g., Close, Open, High, Low, HL2).
  • WMA Length: Sets the lookback period for the weighted moving average calculation. A higher value results in a smoother line with less lag, while a lower value makes the indicator more sensitive to short-term price fluctuations.

FAQ

How do I interpret the color changes on the WMA? A change from red to green indicates that the WMA has begun sloping upward, suggesting a potential shift to bullish momentum. Conversely, a change from green to red indicates a downward slope, suggesting bearish momentum.

Can this indicator be used for day trading? Yes, while it is popular for weekly Weinstein strategies, the WMA can be applied to any timeframe. Shorter lengths are generally preferred for intraday trading to capture faster price movements.

How can I access the Weighted Moving Average with Trend Color? 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.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.