Meet the Creators:
Xrust & Vinin
The XXMA indicator is a game-changing digital adaptive Moving Average specifically designed for MetaTrader 5. This tool not only helps traders distinguish between trending and flat price movements but also enhances your trend trading strategy with its unique flat-trend filter.
Take a look at the chart below. When the market is trending, the XXMA line dynamically shifts above or below the price chart, serving as a visual boundary for your trades. In contrast, during sideways market conditions, the line remains stable, indicating a flat trend. You'll want to enter a trade when the price closes above or below this line during a trend shift. Conversely, look to exit your position when the price crosses or closes the indicator line on a flat movement.
This innovative indicator was first brought to life in MQL4 and made its debut in the Code Base on August 17, 2009.
The XXMA indicator utilizes the classes from the SmoothAlgorithms.mqh library, which you’ll need to copy to your terminal data folder located at MQL5\Include. For a deep dive into how these classes work, check out the article "Averaging Price Series for Intermediate Calculations Without Using Additional Buffers".

Fig.1 The XXMA Indicator
Related Posts
- Mastering the Session Open H-Line Indicator for MT4
- Mastering the XXRSX StDev Signal Indicator for MetaTrader 5
- Mastering the XXDPO Indicator for MetaTrader 5: Your Guide to Trading Signals
- Maximize Your Trading with XXDPO_Candle Alerts for MetaTrader 5
- Mastering the XXDPO_HTF Indicator for MetaTrader 5