fintech-algorithms
Using a coding agent? Give it the skill: npx skills add IslamBaraka90/Fintech-Algorithms-Library What it does →

Point of Control, Value Area, HVN, and LVN Detection

Install and import#

bash
npm install fintech-algorithms
ts
import { pocValueAreaHvnLvnDetection } from "fintech-algorithms/geometric-chart-patterns/level-confluence-and-zone-scoring/poc-value-area-hvn-lvn-detection";

Signature#

pocValueAreaHvnLvnDetection(input)

Selects the point of control, expands a deterministic value area, and identifies local high- and low-volume nodes.

Parameters#

NameTypeNotes
input{ profile_rows: { lower: number; upper: number; volume: number }[]; value_area_fraction: number; hvn_median_ratio: number; lvn_median_ratio: number }Record containing at least three ordered contiguous profile_rows and declared value-area, HVN, and LVN thresholds.

Returns#

{ state, poc_index, poc_price, poc_volume, value_area_low, value_area_high, value_area_volume, value_area_share, target_share, included_indices, expansion_trace, hvn, lvn }

One calculated feature record with auditable expansion order and node diagnostics; insufficient rows are rejected rather than emitted as positional warmup.

Warm-up#

The first 0 positions are not emitted. This record transform has no warm-up output: fewer than three profile rows are rejected explicitly instead of producing positional or state warm-up values.

Errors#

  • When profile rows are too few, unordered, non-contiguous, or thresholds are outside their canonical ranges — 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#

input
{
  "profile_rows": [
    {
      "lower": 99,
      "upper": 99.5,
      "volume": 10
    },
    {
      "lower": 99.5,
      "upper": 100,
      "volume": 18
    },
    {
      "lower": 100,
      "upper": 100.5,
      "volume": 35
    }
  ],
  "value_area_fraction": 0.7,
  "hvn_median_ratio": 1.2,
  "lvn_median_ratio": 0.65
}

Call#

pocValueAreaHvnLvnDetection(input)

Returns#

object with 13 fields: state, poc_index, poc_price, poc_volume, value_area_low, value_area_high, value_area_volume, value_area_share, …

{
  "state": "calculated",
  "poc_index": 4,
  "poc_price": 101.25,
  "poc_volume": 120,
  "value_area_low": 100,
  "value_area_high": 102.5,
  "value_area_volume": 350,
  "value_area_share": 0.755939524838,
  "target_share": 0.7,
  "included_indices": [2, 3, 4, 5, 6],
  "expansion_trace": [4, 5, 3, 6, 2],
  "hvn": [
    {
      "price": 101.25,
      "volume": 120,
      "median_ratio": 3
    },
    {
      "price": 103.25,
      "volume": 50,
      "median_ratio": 1.25
    }
  ],
  "lvn": [
    {
      "price": 102.75,
      "volume": 20,
      "median_ratio": 0.5
    }
  ]
}

Other exports#

This module also exports calculate, priceByVolumeProfileConstruction, fibonacciRetracementExtensionProjection, psychologicalRoundNumberLevelGeneration, multiSourceSupportResistanceZoneFusion, supportResistanceZoneStrengthDecayScoring, 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#

Point of Control, Value Area, HVN, and LVN Detection — system map

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.

Read the article →

References#

The rest of the Level Confluence and Zone Scoring family#