Moving Average Cross Toolkit
Apr 24, 2026

The Moving Average Cross Toolkit indicator provides a modular technical analysis framework allowing users to combine up to four distinct moving average types with advanced trend identification logic. This tool integrates 27 different mathematical smoothing algorithms, ranging from standard averages to scientific and adaptive models, to provide comprehensive trend detection and visual analysis on a single chart.
Usage
The Usage section describes how the script can be used to identify market regimes and trade setups. Users can select between 2, 3, or 4 active lines to build a custom trend hierarchy.
- Trend Identification: The script offers three logic modes:
- Strict Hierarchy: Defines a trend based on the sequential stack of all active MAs (e.g., MA1 > MA2 > MA3 > MA4 for a bullish state).
- Custom Pairs: Allows users to define specific relationships between any two MAs (e.g., MA1 vs MA2 and MA3 vs MA4) that must all align to trigger a trend change.
- Weighted Score: Assigns points to different MA crossovers; if the total score exceeds a user-defined threshold, a trend signal is generated.
- Visual Analysis: The toolkit provides visual fills between lines to represent the gap between fast and slow averages. The background dynamically changes color based on the selected trend logic, while cross signals (e.g., "1▲2") mark specific intersection points.
- Smart Cross Filter: Enabling this feature filters out low-quality signals by evaluating the momentum and consistency of a cross before plotting a signal.
Details
The script implements a wide variety of smoothing techniques categorized into three main groups:
- Standard Basics: Includes SMA, EMA, WMA, VWMA, HMA, RMA, SWMA, and ALMA.
- Scientific/Experimental: These use physics and biological analogies. For example, Fluid Dynamics adapts smoothing based on price "viscosity" (volatility), while Behavioral Economics uses Prospect Theory to weight downward moves differently than upward moves.
- Adaptive Algorithms: Features like KAMA, Jurik, FRAMA, and Hurst Adaptive change their responsiveness based on market efficiency or fractal dimension, aiming to reduce lag during trends while remaining smooth during consolidation.
The scientific implementations often utilize Taylor series expansions to calculate complex functions like hyperbolic tangents within the Pine Script environment, ensuring mathematical accuracy for the experimental models.
Settings
General & MA Configuration
- Moving Averages to Display: Determines how many MA lines (2, 3, or 4) are active and visible.
- Enable MA (1-4): Toggles the individual moving average calculation and plot.
- Type: Selects the specific smoothing algorithm (e.g., EMA, Jurik, SuperSmoother).
- Length: Sets the lookback period for the selected average.
- Source: Defines the price data used for calculation (Close, HL2, etc.).
Trend Logic
- Trend Identification Mode: Chooses between Strict Hierarchy, Custom Pairs, or Weighted Score logic.
- Pair Condition: Sets whether the "Fast" MA must be above or below the "Slow" MA to satisfy the logic.
- Weighted Score Threshold: The minimum points required from active pairs to trigger a Bullish/Bearish background state.
Smart Cross v2
- Minimum Quality Score: A filter (0.0 to 1.0) that determines how "clean" a cross must be to display a signal.
- Allow No History: Allows signals to trigger on the first cross of the chart even without prior data points.
Visuals
- Show MA Fills: Toggles the shaded area between moving average lines.
- Show Background Trend: Toggles the green/red/grey background highlights.
- Show Signals: Displays or hides arrow markers and labels for crossovers.
FAQ
How do I interpret the "1▲2" and "1▼2" labels? These indicate that MA1 has crossed above (▲) or below (▼) MA2. The numbers correspond to the specific MA slots defined in the settings.
What does the grey background mean? A grey background indicates a neutral or "mixed" state where your selected trend logic requirements (Strict, Custom, or Weighted) are not fully met.
How can I access this indicator? 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.

