Mid price

midpricebuilding_blocksForge API 1

Halfway between the highest high and the lowest low of a window.

Inputs

NameTypeDefaultRange
periodint141 to 5000

Outputs

NameTypeRequiredDescription
midpricevalueOptionalcolor theme.series_c, style line, width 1
Warm-up
period - 1 bars (13 at the defaults)
Repaints
No
Parity
TA-Lib, within 1e-12

Formula

(highest high + lowest low) / 2 over the last period bars. This is not the median price of one bar, which is (high + low) / 2.