Moving Average-TREND POWER v2.0-(AS)
Jun 28, 2023

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):
- 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.
- 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.
Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.
Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.
Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.
As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.
Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.
Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.
This does not represent our full Disclaimer. Please read our full disclaimer.
© 2026 LuxAlgo Global, LLC.

