percentrank

forge.tafunctionSince Forge API 1
Functionpython
forge.ta.percentrank(source: ArrayLike, period: int = 100) -> np.ndarray

The share of the previous period values at or below the current value.

Parameters

NameTypeDefault
sourceArrayLike
periodint100

Indicator: Percent rank

The result is from 0 to 100. The current bar is compared with the bars before it, not with itself, so the first value is on bar period. A window that holds a missing value has no value.

Classpython
forge.ta.PercentRank(**inputs: Any) -> None

Where the value sits among its previous values, from 0 to 100.

Inputs

NameTypeDefaultRange
sourcesourceclose
periodint1001 to 5000

The share of the previous period values that are less than or equal to the current value, from 0 to 100. The current bar is compared with the bars before it, not with itself. A window holding a missing value has no value.