Market-Wide Zone-Proximity Scanner and Ranking
Install and import#
npm install fintech-algorithmsimport { marketWideZoneProximityScannerRanking } from "fintech-algorithms/geometric-chart-patterns/level-confluence-and-zone-scoring/market-wide-zone-proximity-scanner-ranking";Signature#
marketWideZoneProximityScannerRanking(input)Filters point-in-time zone records by proximity and ranks eligible instruments from proximity, strength, and freshness.
Parameters#
| Name | Type | Notes |
|---|---|---|
input | { as_of: string; max_distance_bps: number; freshness_half_life_hours: number; instruments: { instrument_id: string; current_price: number; zone_lower: number; zone_upper: number; zone_strength: number; observed_at: string }[] } | Record containing zoned as_of, maximum distance, freshness half-life, and non-empty unique instrument records. |
Returns#
{ state, as_of, eligible_count, ranked }
One calculated scanner record; eligible rows include inside-zone flag, distances, strength, freshness, score, and stable rank.
Errors#
- When as-of time, thresholds, instrument identity, zone geometry, price, strength, or observation time is invalid — throws
Complexity: time ,
space .
Worked example#
executed Captured by running this function on the input its own test provides. Real output of real code — but not asserted against a published figure.
Input#
{
"as_of": "2026-08-03T12:00:00Z",
"max_distance_bps": 40,
"freshness_half_life_hours": 12,
"instruments": [
{
"instrument_id": "SYN01",
"current_price": 79.76,
"zone_lower": 79.82,
"zone_upper": 80.18,
"zone_strength": 55,
"observed_at": "2026-08-03T12:00:00Z"
},
{
"instrument_id": "SYN02",
"current_price": 83.84,
"zone_lower": 83.82,
"zone_upper": 84.18,
"zone_strength": 62,
"observed_at": "2026-08-03T11:00:00Z"
},
{
"instrument_id": "SYN03",
"current_price": 87.92,
"zone_lower": 87.82,
"zone_upper": 88.18,
"zone_strength": 69,
"observed_at": "2026-08-03T10:00:00Z"
}
]
}Call#
marketWideZoneProximityScannerRanking(input)Returns#
object with 4 fields: state, as_of, eligible_count, ranked
{
"state": "calculated",
"as_of": "2026-08-03T12:00:00Z",
"eligible_count": 24,
"ranked": [
{
"instrument_id": "SYN24",
"current_price": 171.92,
"zone_lower": 171.82,
"zone_upper": 172.18,
"inside_zone": true,
"distance": 0,
"distance_bps": 0,
"strength": 93,
"freshness": 0.749153538438,
"rank_score": 94.137303076575,
"rank": 1
},
{
"instrument_id": "SYN18",
"current_price": 148,
"zone_lower": 147.82,
"zone_upper": 148.18,
"inside_zone": true,
"distance": 0,
"distance_bps": 0,
"strength": 92,
"freshness": 0.749153538438,
"rank_score": 93.837303076575,
"rank": 2
},
{
"instrument_id": "SYN12",
"current_price": 124.08,
"zone_lower": 123.82,
"zone_upper": 124.18,
"inside_zone": true,
"distance": 0,
"distance_bps": 0,
"strength": 91,
"freshness": 0.749153538438,
"rank_score": 93.537303076575,
"rank": 3
}
]
}Other exports#
This module also exports
calculate, priceByVolumeProfileConstruction, pocValueAreaHvnLvnDetection, fibonacciRetracementExtensionProjection, psychologicalRoundNumberLevelGeneration, multiSourceSupportResistanceZoneFusion, supportResistanceZoneStrengthDecayScoring, supportResistanceRoleReversalStateMachine, breakoutAndRetestDetection. Every module additionally exports run as an alias of its
primary function, and a meta object carrying its catalog id, domain, family,
shape and article URL.
Diagrams#
How it works#
This page states the contract — how to call it correctly. The article explains the concept: why it works, and where it breaks.
References#
- Foundations of Technical Analysis: Computational Algorithms, Statistical Inference, and Empirical Implementation — Andrew W. Lo, Harry Mamaysky, and Jiang Wang
- Currency Orders and Exchange-Rate Dynamics: Explaining the Success of Technical Analysis — Carol L. Osler
- Volume profile indicators: basic concepts — TradingView
- Session volume profile charts explained — TradingView
- Evidence boundary