Skip to content
All library documents

Adaptive Market State Graphs for Signals, Randomness Tests, and Trade Exits

Article MQL5 articles

Summary

This article describes an Expert Advisor that represents market conditions as vertices in a state-transition graph. It discretizes normalized trend, volatility, and momentum measures, counts transitions between states, smooths and decays those counts, then uses a k-step random walk to estimate directional bias. Entropy provides a confidence measure that can suppress weak forecasts. A second graph tracks how trades progress through R-multiple milestones and estimates the probability of reaching the next one, which can inform exits.

The method also compares the clustering of a thresholded market graph with Erdos–Renyi random graphs of similar size and edge density. This z-score is offered as an optional filter, not proof of predictive power. The article reports a backtest in which the randomness gate did not improve performance and the outcome-based exit rule underperformed a simple fixed target. It emphasizes that thresholds remain fixed inputs, results require out-of-sample validation, and transition or survival probabilities alone do not establish positive expected value.

Key ideas

  • Market states are formed from discretized, volatility-normalized trend, volatility, and momentum measures.
  • A smoothed transition matrix supports k-step forecasts, while row entropy measures forecast uncertainty.
  • A random graph comparison tests whether network clustering differs from a density-matched chance baseline.
  • An outcome graph estimates trade survival across R-multiple milestones to guide position exits.
  • The reported tests do not establish an edge, and the article calls for out-of-sample validation and expected-value analysis.

Tags

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