Skip to content
All library documents

Building a Matrix-Based Market Score Indicator in MQL5

Article MQL5 articles

Summary

The article develops an MQL5 indicator that combines trend, momentum, and volatility into a rolling market score. Trend is measured by the linear-regression slope of prices in a window, momentum by the price change across that window, and volatility by standard deviation. Weighted components form a composite score, with the sign and threshold crossings used to identify possible bullish or bearish signals. A separate-window version is intended to help inspect the calculation, followed by a chart version that can draw arrows and issue alerts.

The main-chart implementation uses closed-bar data, can apply an optional EMA direction filter, and includes a minimum-bar cooldown between signals. The article gives no performance results establishing that the signals are profitable. It notes that choppy, low-volatility conditions can produce false crossings and suggests tuning the weights and thresholds or adding other filters. Since raw price-based inputs can behave differently across instruments, normalization may be needed for comparisons or broader application.

Key ideas

  • The composite score combines regression slope, window price change, and standard deviation using configurable weights.
  • Threshold crossings turn the continuous score into candidate buy and sell events.
  • An optional EMA filter and signal cooldown can reduce countertrend trades and repeated triggers.
  • Closed-bar calculations are used to avoid relying on future price data.
  • Choppy conditions can produce false signals, and the article provides no evidence of profitability.

Tags

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