All indicators

Moving Average-TREND POWER v2.0-(AS)

Jun 28, 2023

Static chart image
SignalsMoving Averages

The Moving Average-TREND POWER v2.0-(AS) indicator tracks and quantifies trend strength by accumulating a value based on the duration price spends above or below a selected moving average. It provides a visual representation of trend momentum and identifies ranging markets through automated reset logic.

Usage

The Usage section describes how the script can be used to identify market regimes and trend intensity. Users can apply this tool to distinguish between active trending phases and sideways consolidation.

  • Trend Identification: When the price remains above the selected Moving Average (MA), the indicator value grows positively at an accelerating rate. Conversely, when price remains below the MA, the value decreases into negative territory.
  • Ranging Markets: The indicator value resets to zero when specific crossover conditions are met, signaling a lack of trend or a potential reversal.
  • Trend Strength: Higher absolute values indicate a prolonged trend. Users can look for the indicator moving away from the zero line to confirm entry points or returning to zero to exit positions.

For long-term trend analysis, users should select slower MA types (e.g., SMA or WMA) with larger periods. For short-term scalping or day trading, faster MAs and shorter periods are more effective.

Details

The indicator functions by counting the number of consecutive bars the price spends on one side of a Moving Average. Each bar adds a growth factor (0.01 multiplied by the current bar count) to the cumulative indicator value. This creates a parabolic growth effect during sustained trends.

A key feature of the script is its conditional reset logic involving "Thresholds" (TSH):

  1. Inside Thresholds: If the current trend duration (number of bars) is within the Upper and Lower thresholds, the indicator resets to zero if the MA crosses any price source (close, high, low, ohlc4, etc.). This allows for higher sensitivity during sideways movement.
  2. Outside Thresholds: If the trend duration exceeds the thresholds, the reset logic becomes more restrictive. The value only returns to zero if the MA crosses the "High" during an uptrend or the "Low" during a downtrend, helping to filter out minor pullbacks in a strong trend.

Settings

Main Settings

  • MA1_LEN/TYP: Determines the length and the mathematical calculation method of the baseline Moving Average. Options include EMA, HMA, WMA, SMA, and RMA.
  • TSH ->UP/DN: Sets the upper and lower thresholds for trend duration. These values determine when the indicator switches from sensitive reset logic to trend-protection logic.
  • PLOT->TSH/NUMofBARS?: Toggles the visibility of the threshold levels and the raw count of bars spent above or below the MA.
  • !---!READ ME!---!: Displays a tooltip containing the core functional logic of the indicator.
  • ADDITIONAL INFORMATION: Displays a tooltip with specific optimization tips and developer notes.

FAQ

How do I interpret the indicator hitting zero?

When the indicator value returns to zero, it signifies that the price has crossed the Moving Average in a way that satisfies the reset conditions, suggesting the current trend has lost power or the market is entering a range.

What is the difference between the Indicator Value and the Trend Number?

The Trend Number is a raw count of bars above or below the MA, while the Indicator Value is the accumulated result of the growth factor formula, providing a smoother representation of trend momentum.

How can I access this tool?

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.