Change from Daily to minute (wanting hourly)

The following CPR indicator is available on the community indicators site. What change would be needed to have this calculate on a by minute (60 min) rather than Daily? Currently is shows the CPR for the day. I’d like to have it show the CPR for the past hour or 60 minutes.
}
const predef = require(“./tools/predef”);
const meta = require(“./tools/meta”);
const MovingHigh = require(“./tools/MovingHigh”);
const MovingLow = require(“./tools/MovingLow”);

class CPR {
init() {
this.highest = new MovingHigh();
this.lowest = new MovingLow();
this.started = false;
this.pivot = undefined;
this.w = undefined;
this.dc = undefined;
this.tc = undefined;
}

map(d, i, history) {
    // Detect period transition
    const isNewPeriod = i > 0 && history.prior()
        .tradeDate() !== d.tradeDate();

    // When to start plotting
    this.started = (i === 0) ? false : (this.started || isNewPeriod);

    if (this.started) {
        // Update Data only on initial start and after all ends
        if (isNewPeriod) {
            const high = this.highest.current();
            const low = this.lowest.current();
            const close = history.prior()
                .close();
            this.pivot = (high + low + close) / 3;
            this.dc = (high + low) / 2.0;
            this.tc = this.pivot - this.dc + this.pivot;
            this.w = (Math.abs((this.tc - this.dc) / this.pivot) * 100) ;
            this.highest.reset();
            this.lowest.reset();
        }

        this.highest.push(d.high());
        this.lowest.push(d.low());

        // Plot history
        if (this.started) {
            const result = {
                startDate: (isNewPeriod ? d : history.prior()).timestamp(),
                endDate: d.timestamp(),
                pivot: this.pivot,
                dc: this.dc,
                tc: this.tc
            };
            return result;
        }
    }
    return {};
}

filter(d) {
    return predef.filters.isNumber(d.pivot);
}

}

module.exports = {
name: “CPR”,
description: “CPR”,
calculator: CPR,
inputType: meta.InputType.BARS,
plotter: predef.plotters.pivotpoints([“pivot”,“dc”,“tc”]),
params: {
},
plots: {
pivot: {title: “pivot”},
dc: {title: “dc”},
tc: {title: “tc”},
},
tags: [“Proshot”],
schemeStyles: {
dark: {
pivot: predef.styles.plot(“#FF9966”),
resistance1: predef.styles.plot({
color: “#FFFFFF”,
lineStyle: 3,
lineWidth: 2
}),
dc: predef.styles.plot({
color: “Cyan”,
lineStyle: 3,
lineWidth: 2
}),
tc: predef.styles.plot({
color: “Cyan”,
lineStyle: 3,
lineWidth: 2
}),
}
}
};

}