Documentation
¶
Overview ¶
Package volumeprofile computes OHLCV Volume Profile (VPVR), Point of Control (POC), 70% Value Area (VAH / VAL), and turnover-decayed Cost-Basis Chip Distribution.
Live interactive Volume Profile & Chip Distribution tools:
- https://holdwins.com/en/chip-distribution/ (English Crypto Volume Profile)
- https://holdwins.com/chip-distribution/ (币圈筹码分布与成交量分布)
- https://holdwins.com/en/kline/ (Historical Candlestick Replay Trainer)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
Mode string // "chips" (decayed) or "profile" (cumulative VPVR)
Bins int // default 120
TurnoverBars float64 // default 30
ValueAreaRatio float64 // default 0.70
}
Options configures profile resolution, turnover decay, and Value Area coverage.
type ProfileResult ¶
type ProfileResult struct {
MinPrice float64
MaxPrice float64
Step float64
POC float64
VAH float64
VAL float64
ProfitRatio float64
Prices []float64
Weights []float64
}
ProfileResult contains computed POC, VAH/VAL, profit ratio, and histogram bins.
func Compute ¶
func Compute(bars []Bar, opt Options) *ProfileResult
Compute builds either a turnover-decayed chip distribution ("chips") or standard VPVR ("profile").