the reference percentrank: the percentage of the previous period values that are less than or equal to the current one. The current bar is the subject of the comparison, not part of the window, so the first answer lands at index period.
percentrank
period
the reference
percentrank: the percentage of the previousperiodvalues that are less than or equal to the current one. The current bar is the subject of the comparison, not part of the window, so the first answer lands at indexperiod.