Pivot points calculation code in trade-script

The formula to calculate the pivot points is known. But how do we implement it in pi scanner? because the previous day HLC need to be accounted, then the time frame of scanner cannot be 1,5,15. How to handle this?