Discussing the article: "Market Heat Map Indicator Based on Prime-Number Density"

 

Check out the new article: Market Heat Map Indicator Based on Prime-Number Density.

An innovative indicator based on prime number theory helps identify strong reversal levels that other traders overlook. Testing on 10 assets showed that reversals in mathematically significant zones occur 1.5 to 1.8 times more frequently. Five practical application scenarios with specific rules for filtering out false breakouts and making precise market entries.

Each price on the chart is a number. 1.0850 for EURUSD. 2147.50 for gold. 67,432 for Bitcoin. We are used to thinking of them as the result of supply and demand, but we forget a simple truth: every number has mathematical properties that exist independently of the market.

Prime numbers are distributed unevenly throughout the number line. There are areas where they are densely concentrated, and there are "gaps" where there are almost none. This irregularity is governed by profound mathematical laws that mathematicians have been studying for centuries. What if this hidden structure of numbers influences price behavior?

The idea seems absurd until you look at the data. A prime-number density heat map overlays colored zones on the chart: blue areas indicate price levels with the highest concentration of prime numbers in the surrounding numerical range, while red areas indicate those with the lowest. And here's what happens in the real market.


Author: Yevgeniy Koshtenko

 
Hello. How do I buy this?
 
Besla #:
Hello. How do I buy it?
You don’t have to. It’s an article, after all. It includes the source code. Just download it, compile it and you’ll get it for free.
 
It seems that transparency doesn’t make any difference.
 
How can you write an article about round price levels and then crop the price scale out of all the screenshots???
 

Flaws in the original Prime Density Heat Map

Premise

  1. The score had no market input at all. prime_density was a pure function of MathRound(price × PriceMultiplier) . No bar, volume, or price-action data entered the calculation.
  2. The output was static wallpaper. Every rectangle spanned startTime → TimeCurrent() , so each price row held one fixed colour across the entire chart. Your two screenshots show exactly this — bands indifferent to trending, ranging, or reversing price.
  3. PriceMultiplier was arbitrary and outcome-determining. 10,000 vs 100,000 produces a completely different set of "prime-dense" zones from identical price data. Real structure shouldn't flip based on decimal scaling.
  4. Local prime density barely varies. It follows ~1/ln(n) (Prime Number Theorem), which is near-constant across any instrument's trading range. The visible banding was sampling noise in a radius-100 window, palette-mapped to look deliberate.
  5. AnalysisPeriod was near-decorative. It changed only the drawing extent and price range — never the score, since the score ignored bars entirely.
  6. The stated mechanisms don't hold. Round-number psychology is real but unrelated to primality; "algorithms use numbers" is true of every indicator; the Chinese Remainder Theorem paragraph is unconnected to price formation.
  7. The 55–58% vs 35% claim is unfalsifiable as published — no sample size, no reversal definition, no out-of-sample split.

Implementation

  1. The prime cache was useless at the documented settings. Cache capped at 100,000, but the docs recommend PriceMultiplier = 100000 for 5-digit quotes → EURUSD lands at ~108,500, exceeding maxCachedPrime , so every lookup fell through to per-number trial division. On XAUUSD it's ~21,000,000 — the cache never applies at all.
  2. CountPrimesInRange linear-scanned the cache from index 0 for every level. Binary search on a sorted array was the obvious call.
  3. Inconsistent normalisation. minPrimeDensity was computed with a > 0 filter, so zero-density levels were excluded from the minimum but still coloured against it.
  4. Transparency did nothing. It only chose between STYLE_DOT and STYLE_SOLID — never altered opacity.
  5. ClearPreviousObjects used StringFind(...) >= 0 , matching the substring anywhere in a name rather than as a prefix.
  6. 500 objects deleted and recreated every bar, with no ChartRedraw() .

    Genuine improvements in the final version

    • Score derived from four measurable components: wick rejections (wick reached the row, body didn't), body consolidation (accepted/traded through), distributed tick volume, and an explicit, switchable round-number bonus.
    • Recalculates over a sliding window of closed bars, so zones actually move with price action.
    • Per-component min-max normalisation with auto-exclusion of components carrying no information, and an activeComponents readout.
    • AutoScalePalette — set false and a dull map honestly tells you there's no structure.
    • Composite spread displayed in the info panel as your degeneracy check.
    • Real transparency via background blending; object reuse instead of churn; ChartRedraw() ; warn-once latches.