Hot to get Prevoius days Week Month OHLC prices

Equal function required in PI Script for following AFL code

DayH = TimeFrameGetPrice(“H”, inDaily, -1);

DayH = TimeFrameGetPrice(“H”, inWeekly, -1);

DayH = TimeFrameGetPrice(“H”, inMonthly, -1);

Syntax

HIGH = HHV(21)

the above high is the highest high in the past 21 bars

you can replace 21 according to your value and time frame.