#Indicator
'**************************************************************
'*   Volume Price Confimation Indicator (VPCI.txt)
'*     by Jeremy Williams
'*	   May. 9, 2007
'*
'*	Adapted from Technical Analysis of Stocks and Commodities
'*     July 2007
'*
'*  Summary: 
'*
'*      This indicator is uses volume information to better gauge
'*  market direction. The calculation of the VPCI indicator requires
'*  the following indicators:
'*
'*  Volume Multiplier    			VM.txt
'*  Volume Price Confimation        VPC.txt
'*  Volume Price Ratio				VPR.txt
'*  Volume Weighted Moving Average  VWMA.txt
'*
'*  For more information see "Between Price and Volume"
'*  in the July 2007 issue of Technical Analysis of Stocks 
'*  and Commodities.
'*
'*  Parameters:
'*
'*  Short_Periods -  Specifies the number of periods for the 
'*                    short moving average calculation 
'*  
'*  Long_Periods - Specifies the number of periods for the
'*                    long moving average calculation
'*
'************************************************************** 
#Param "Short_Periods", 10
#Param "Long_Periods",50

Dim myVPC		As Single
Dim myVPR		As Single
Dim myVM		As Single
Dim myVPCI		As Single

' Calculate the indicators used for the calculation
myVPC = VPC(Long_Periods)
myVPR = VPR(Short_Periods)
myVM = VM(Short_Periods,Long_Periods)

' Calculate the indicator
myVPCI = myVPC*myVM*myVPR

' Plot the indicator
Plot("VPCI", myVPCI)

' Return the value calculated by the indicator
Return myVPCI