Volume Profile (VPVR) & Perpetual Cycle Reconstruction

Open algorithms for extracting structural support/resistance zones from public OHLCV bars and reconstructing institutional perpetual trade rounds without floating-point drift.

1. Triangular Intrabar Volume Distribution & 70% Value Area

Given only OHLCV bars (O, H, L, C, V) rather than tick-by-tick trades, distributing bar volume across price bins [L, H] with a triangular kernel centered on typical price P_typ = (H + L + C) / 3 avoids rectangular edge artifacts:

Chip Decay Factor α_t = min(0.95, V_t / (V_avg × Turnover_Window)) Updated Bin Weight D_t[i] = D_{t-1}[i] × (1 − α_t) + V_t × W_t[i]

The bin with maximum accumulated weight defines the Point of Control (POC); expanding bidirectionally from POC until 70% of total weight is captured yields VAL (Value Area Low) and VAH (Value Area High).

2. Flat-to-Flat Perpetual Cycle Grouping (18-Decimal Fixed Point)

Raw exchange fill feeds split single institutional orders into dozens of partial executions. Scaling prices and sizes to 10¹⁸ integer units prevents IEEE-754 rounding errors when detecting exact zero-crossings (flat → open → scale-in/out → flat) or single-fill position flips.

Live Analytics Tools & Open-Source Code