Support/Resistance Zone Strength and Decay Scoring
Install and import#
npm install fintech-algorithmsimport { supportResistanceZoneStrengthDecayScoring } from "fintech-algorithms/geometric-chart-patterns/level-confluence-and-zone-scoring/support-resistance-zone-strength-decay-scoring";Signature#
supportResistanceZoneStrengthDecayScoring(input)Scores zone strength from source confluence, decayed touches, rejection quality, durability, and break penalties.
Parameters#
| Name | Type | Notes |
|---|---|---|
input | { source_confluence: number; zone_age_bars: number; half_life_bars: number; break_count: number; rejection_target_atr: number; touches: { age_bars: number; rejection_atr: number }[] } | Record containing source confluence, zone age, decay half-life, break count, rejection target, and touch observations. |
Returns#
{ state, score, grade, components, decayed_touch_evidence, touch_count }
One calculated score record with a bounded 0-100 score, qualitative grade, and every component contribution.
Errors#
- When confluence, age, half-life, break-count, rejection, or touch input is outside its declared range — 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#
{
"source_confluence": 0.8,
"zone_age_bars": 10,
"half_life_bars": 20,
"break_count": 0,
"rejection_target_atr": 1,
"touches": [
{
"age_bars": 2,
"rejection_atr": 0.8
},
{
"age_bars": 8,
"rejection_atr": 1.4
},
{
"age_bars": 20,
"rejection_atr": 0.4
}
]
}Call#
supportResistanceZoneStrengthDecayScoring(input)Returns#
object with 6 fields: state, score, grade, components, decayed_touch_evidence, touch_count
{
"state": "calculated",
"score": 81.604861183733,
"grade": "strong",
"components": {
"source": 24,
"touch": 31.086403443236,
"rejection": 19.447389928631,
"durability": 7.071067811865,
"break_penalty": 0
},
"decayed_touch_evidence": 2.190891274792,
"touch_count": 3
}Other exports#
This module also exports
calculate, priceByVolumeProfileConstruction, pocValueAreaHvnLvnDetection, fibonacciRetracementExtensionProjection, psychologicalRoundNumberLevelGeneration, multiSourceSupportResistanceZoneFusion, supportResistanceRoleReversalStateMachine, breakoutAndRetestDetection, marketWideZoneProximityScannerRanking. 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
- Evidence boundary