You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: Ordinal Pattern Transition Networks in MQL5.
We implement ordinal pattern transition networks in MQL5: a Lehmer-code encoder, a directed network over ordinal price patterns, and three complexity metrics. Two indicators expose a trend-versus-range regime from time-irreversibility and an efficiency gauge from permutation entropy, with a transparent parameter sweep showing how to tune settings on FX data.
Most indicators read the market through price magnitude. A moving average averages prices. An oscillator scales differences. A volatility band measures distance from a mean. All of these are sensitive to level, to scale, and to the slow drift that makes financial series so awkward to model. In this article we take a deliberately different route. We discard magnitudes almost entirely and keep only the shape of recent price action, the relative order of the last few values, and then we ask a question that shape alone can answer surprisingly well: is the market currently being driven in a direction, or is it just wandering?
The tool we will use to do this is the ordinal pattern transition network. It comes from nonlinear dynamics and complexity science. There it is used to separate chaos from noise, detect regime changes in EEG and climate data, and rank signal complexity. The idea maps almost one-to-one to trading problems, yet it is essentially absent from the MQL5 literature. We build it from scratch. First, we turn a rolling price window into a directed network of ordinal patterns. Then we compute three complexity metrics and provide two indicators for the two most useful metrics.
We will not pretend the result is a holy grail. In fact one of the most useful parts of this article is the honest account of what happened when we first ran the metrics on real EUR/USD data: they barely moved. The signal was there, but our settings were hiding it. Working out why, and fixing it with an empirical parameter sweep, taught us more about the method than any amount of theory, and that investigation has its own section below.
Author: Muhammad Minhas Qamar