Skip to content
All library documents

An RSI-Adaptive MACD with Variable-Speed Moving Averages

Article ProRealCode

Summary

This indicator adapts the responsiveness of its fast and slow moving averages according to the distance of RSI from its midpoint. It calculates RSI from closing prices, transforms that reading into a scaling factor, and uses the factor to adjust the smoothing coefficients for both averages. Their difference forms the MACD line, while a separate moving average smooths that difference into a signal line. The display colors the signal according to whether it is rising or falling.

The document provides ProRealTime code translated from an MQL4 version and lists example settings for the fast, slow, signal, and RSI periods. It suggests users can adjust parameters to suit their trading style, but supplies no entry or exit rules, backtest, or performance evidence. The code describes an indicator rather than a complete trading strategy, so its usefulness depends on how a trader tests and applies it.

Key ideas

  • RSI distance from its midpoint controls the smoothing speed of the fast and slow averages.
  • The difference between those adaptive averages is the MACD line.
  • A moving average of the MACD line provides the signal line.
  • The example changes the signal line’s display color based on its direction.
  • The document gives indicator code but no trading rules or performance results.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.