Skip to content
All library documents

Statistical Price Levels and Z-Score Signals from Typical Price

Article MQL5 articles

Summary

This article develops an MQL5 Expert Advisor that summarizes a rolling sample of typical prices, defined from each bar's high, low, and close. It describes central tendency measures such as mean, median, and mode; dispersion measures including standard deviation, variance, and range; and distribution features such as percentiles, skewness, and kurtosis. The EA turns selected statistics into chart reference levels, including the interquartile boundaries, and uses a kernel-density estimate to identify price clusters. A z-score compares the latest typical price with the sample mean and standard deviation, with configurable entry and exit thresholds used to mark potential overextension and mean-reversion signals.

The described interface draws levels, metric labels, signal arrows, and touch or outcome markers, while monitoring interactions categorized as breakout, reversal, or no follow-through. The article presents illustrative outputs and interpretations rather than a controlled performance evaluation. It recommends treating the levels as decision support and does not establish that the signals predict reversals or remain effective across instruments, sampling windows, or market regimes.

Key ideas

  • Typical price provides the input series for the EA's distributional statistics and reference levels.
  • Mean, median, mode, percentiles, and dispersion measures describe different aspects of recent price behavior.
  • The EA uses a standardized deviation from the mean to trigger and clear configurable directional signal states.
  • Chart levels and monitored touch outcomes are presented as context for decisions, not as proof of predictive performance.

Tags

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