Skip to content

MIDPRICE

Summary

Midpoint of the price range over a rolling window: the average of the highest high and lowest low across the last optInTimePeriod bars. An overlap-study line plotted on price.

Formula

MIDPRICE = (Highest(High, N) + Lowest(Low, N)) / 2, over the N=optInTimePeriod bars ending at each index

Inputs

  • inPriceHL — High and Low price series

Outputs

  • outReal — Midpoint of the period's high/low extremes

Parameters

  • optInTimePeriod — Window length over which the high/low extremes are taken

Implementation

TA-Lib Definition: midprice.c · midprice.yaml

Native File
C ta_MIDPRICE.c
Rust midprice.rs
Java Core.java

TA-Lib is also available for Python, R and more using a wrapper.

Aliases

Midpoint Price

See Also

MIDPOINT · MEDPRICE