premium_discount

forge.tafunctionSince Forge API 1
Signaturepython
forge.ta.premium_discount(high: ArrayLike,low: ArrayLike,swing_len: int = 5) -> dict[str, np.ndarray | Zone]

The upper and lower halves of the active swing range, split at equilibrium.

Parameters

NameTypeDefault
highArrayLike
lowArrayLike
swing_lenint5

Indicator: Premium and discount

The active range runs from the lowest low since the latest swing low to the highest high since the latest swing high, once both swings are confirmed. equilibrium is its middle, premium the zone above it and discount the zone below it. A flat range shows nothing.