Colored Moving Averages With Close Signals
Jan 17, 2023

The Colored Moving Averages With Close Signals [Whvntr][TradeStation] indicator provides a dynamic trend-following visualization that combines color-coded moving averages with price action signals to identify potential trend reversals.
Usage
The Usage section describes how the script can be used to identify trend direction and specific entry or exit points based on the relationship between price and the moving average.
- Trend Identification: The moving average line changes color based on its slope. An upward-sloping average is plotted in green (bullish), while a downward-sloping average is plotted in red (bearish).
- Signal Generation: The indicator generates "Buy" and "Sell" labels based on the interaction between the closing price and the trend color:
- A Buy signal is triggered when the price closes above the moving average while the average is in a bullish (green) state.
- A Sell signal is triggered when the price closes below the moving average while the average is in a bearish (red) state.
- Customization: Users can toggle labels on or off and adjust the visual styles of the tags and text to suit different chart backgrounds.
Details
The script is based on concepts from TradeStation's "Colored Moving Averages Can Help You Spot Trends" study, modified to include actionable signals. It allows users to select from seven different moving average types to suit different trading styles and timeframes:
- Modified Hull MA: A variation using a Simple Moving Average (SMA) of the standard Hull formula for smoother oscillations.
- Hull MA (HMA): Designed to reduce lag while maintaining smoothness.
- Exponential Moving Average (EMA): Places more weight on recent price data.
- Weighted Moving Average (WMA): Assigns a heavier weighting to more recent data points linearly.
- RMA: The moving average type typically used in the calculation of the RSI.
- Volume Weighted MA (VWMA): Weights the average based on volume activity.
- Simple Moving Average (SMA): The standard arithmetic mean of price over a period.
Settings
- Longs: Toggles the display of bullish "Buy" labels.
- Shorts: Toggles the display of bearish "Sell" labels.
- Moving Average Color: Allows customization of the colors for uptrends and downtrends.
- Close Tags Color: Sets the background color for the Buy and Sell labels.
- Text Color: Sets the color of the text within the Buy and Sell labels.
- MA Length: Determines the lookback period for the calculation (default is 5).
- MA Type: A numerical selector (1-7) to choose the underlying moving average formula.
- Source: Determines the price data used for the calculation (default is Close).
FAQ
How do I interpret the different colors on the moving average? The color transition represents the slope of the moving average; a color change typically indicates a shift in momentum or the start of a new trend direction.
Can I set alerts for the Buy and Sell signals? Yes, the script includes built-in alert conditions for both "Buy Alert" and "Sell Alert" which trigger when the price closes in confirmation with the moving average trend.
How do I access the Colored Moving Averages With Close Signals [Whvntr][TradeStation] indicator? 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.