This script is based on Buff Pelz Dormeier’s article “Investing with Volume Analysus”
As you knows the Volume is the Only Indicator to prior Candles.
So, Lot's of CMT(Charted Market Technicians) invest the Volume Indicator and the Buff Dormeier's VPCI is very popular.
If you have interest let's prey to God Google then he'll be answered.
Anyway, The Basic Logic is this.
a. VPC=SUM(C*V,PERIOD)/SUM(V,PERIOD)-MA(C,PERIOD)
b. VPR= SUM(C*V,PERIOD)/SUM(V,PERIOD)/MA(C,PERIOD)
c. VM=AVG(V,PERIOD)/AVG(V,PERIOD*K)
d. VPCI=VPC*VPR*VM
Feel free to use my script.