Skip to content
All library documents

Persistence Entropy and Loop Strength for Market Regime Reading

Article MQL5 articles

Summary

The article turns topological features of a rolling price window into chart and Expert Advisor buffers. It defines persistence entropy separately for H0 connected-component bars and H1 loop bars: entropy is low when persistence is concentrated in a few features and higher when it is spread more evenly. H0 is interpreted as a measure of structural fragmentation, while H1 reflects the complexity of cyclical patterns. A normalized loop-strength measure, based on the longest H1 feature relative to the point-cloud diameter, feeds an adaptive regime classification using rolling percentiles.

To keep results stable across differing amounts of loaded history, the indicator warms up its rolling statistics from a fixed full window; a capped history and step grid are used to limit the cost of the underlying cubic-time calculation. The article includes definitions, examples, and a chart-based interpretation, plus buffer access for EAs. It presents the indicator as descriptive and does not demonstrate predictive accuracy or a profitable trading rule; parameter choices and market interpretations require separate validation.

Key ideas

  • Persistence entropy summarizes how evenly finite feature lifetimes are distributed within a dimension.
  • H0 entropy describes the spread of component merge scales, while H1 entropy describes the spread of loop lifetimes.
  • Loop strength scales the longest persistent loop by the point-cloud diameter to make readings comparable across price scales.
  • Rolling percentile ranks divide loop strength into low, middle, and high regimes relative to recent history.
  • Warm-up rules, history caps, and stepped calculations address reproducibility and computational load.

Tags

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