Skip to content
All library documents

Building a Prime-Number Density Heat Map for Market Prices

Article MQL5 articles

Summary

The article describes an indicator that maps prime-number density around converted market price levels to colored chart zones. It explains scaling fractional quotes into integers, choosing a search radius, precomputing primes with the Sieve of Eratosthenes, counting primes near each level, normalizing the counts, and displaying the resulting density as a color gradient. The proposed interpretation is that dense zones may attract price while sparse zones may be easier to cross, with round-number behavior and algorithmic price handling offered as possible explanations.

The article reports a five-month backtest across five currency pairs, three cryptocurrencies, and two commodities on hourly-to-daily charts. It claims that dense zones matched trend reversals in 55–58% of cases, compared with a stated random-match baseline of about 35%. However, it provides no detailed testing protocol, sample counts, statistical uncertainty, or independent validation. Its explanations for a causal link are speculative, and the numeric mapping and radius choices may materially affect the heat map. The article itself cautions that mathematical structure does not guarantee trading profits.

Key ideas

  • The indicator converts prices to integers before measuring prime density within a configurable radius.
  • A cached Sieve of Eratosthenes supports repeated prime counts, which are normalized and shown as chart colors.
  • The article proposes that high-density zones may coincide with pauses or reversals and low-density zones with faster moves.
  • Its reported reversal association comes from a limited five-month test and lacks enough methodological detail to establish robustness.
  • The proposed psychological and algorithmic mechanisms are hypotheses rather than demonstrated causes.

Tags

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