XPloRR MA-Trailing-Stop Strategy
Mar 4, 2018

The XPloRR MA-Trailing-Stop Strategy indicator provides a long-term trend-following framework designed to capture significant market moves using moving average crossovers filtered by directional strength and an ATR-based trailing stop.
Usage
The Usage section describes how the script can be used to identify trend entries and manage exits through volatility-adjusted stops.
The strategy employs a dual-mechanism for trade management:
- Entry Logic: A long position is initiated when the Fast Buy EMA crosses above the Slow Buy SMA, provided the EMA exhibits a specific upward "strength" (directional coefficient).
- Exit Logic: A trade is closed when either the Fast Sell EMA crosses below the Slow Sell SMA (with downward strength) or when the short-term price EMA (6-period) falls below the calculated trailing stop level.
Users should optimize the EMA, SMA, and Strength parameters for individual assets, as different instruments respond to different lookback periods. The strategy is designed for long-term cycles, aiming for a low number of high-quality trades to maximize capital appreciation.
Details
The script utilizes directional strength to filter out "weak" moving average crossovers that often occur during sideways market regimes. This strength is calculated as the percentage change of the EMA.
The Trailing Stop is a dynamic component based on the Average True Range (ATR). It is calculated as a multiple of the 15-period SMA of the high-low range. This stop only moves upward during a long trade, protecting gains while allowing the asset room to breathe during normal volatility.
Visual elements on the chart include:
- Blue and Orange Lines: The Buy-side EMA and SMA.
- Navy and Red Lines: The Sell-side EMA and SMA.
- Green/Red Columns: These represent the current trade's entry basis and trailing stop level. If the current price is below the entry price, the columns transition to red to indicate a temporary drawdown.
Settings
Time Filter
- Start/Stop Year/Month/Day: Sets the backtesting window for the strategy execution.
- Background: Toggles the visibility of the background highlight during the active test period.
Buy Parameters
- Fast EMA Buy: The period for the fast exponential moving average used for entry signals.
- Slow SMA Buy: The period for the slow simple moving average used for entry signals.
- Minimum Buy Strength: The required upward slope intensity of the Fast EMA to validate a crossover.
Sell Parameters
- Fast EMA Sell: The period for the fast exponential moving average used for exit signals.
- Slow SMA Sell: The period for the slow simple moving average used for exit signals.
- Minimum Sell Strength: The required downward slope intensity of the Fast EMA to validate an exit.
Risk Management
- Trailing Stop (#ATR): The multiplier applied to the 15-period ATR to determine the distance of the trailing stop from the price.
FAQ
How do I optimize the strategy for a specific stock?
You can adjust the EMA, SMA, and Strength settings in the script inputs while monitoring the Strategy Tester tab. Aim for a balance between Net Profit and Percent Profitable.
What does "Minimum Strength" represent?
It is a directional coefficient that measures how steeply the EMA is rising or falling. Higher values require a more aggressive trend to trigger a signal.
How can I access this script?
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.

