### Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....

#1 Selling Amibroker Plugin featuring:

Neural Networks
And Much More ....
Find Out More Here

### Vol-Price Confirmation Indicator for Amibroker (AFL) smithf16 over 4 years ago Amibroker (AFL)

Rating:
Tags:

This indicator combines price and volume action to produce reliable signals.
Signals are generated on crossovers.

### Indicator / Formula

```// volume weighted MA
function VWMA( array, period )
{
return Sum( array * V, period ) / Sum( V, period );
}

// Volume Price Confirmation Indicator
function VPCI( speriod, Lperiod )
{
Vw = VWMA( C, lperiod );
Vpc = Vw - MA( C, lperiod );

Vpr = VWMA( C, speriod ) / MA( C, speriod );

Vm = MA( V, speriod ) / MA( V, Lperiod );

return Vpc * Vpr * Vm;
}

// plot VPCI
speriod = Param("Short period", 5, 1, 50, 1 );
lperiod = Param("Long period", 20, 1, 100, 1 );

Vp = VPCI( speriod, Lperiod );
Plot( Vp, "VPCI"+ _PARAM_VALUES(), colorRed );

// and VPCI smoothed
aperiod = Param("Smoothing period", 20, 1, 30, 1 );
Vps = MA( Vp, aperiod);
Plot( Vps, "MA("+aperiod+")", colorBlue );

Buy = Vp > Vps AND
ADX( 7 ) > 10 AND
MACD( 12, 26 ) > Signal( 12, 26, 9 );
Sell = Vps < Vp;```

1.

Firtsly, thank you to the author for providing this code. I find it well written, well laid out and easy to understand.

This code has two variations from the formula described in Buff Pelz Dormeieir’s book “Investing with Volume Analysis” on page 185.

Both variations are in the calculation of the Smoothed VPCI (Vps).

Default smoothing period
Buff specifies using the short term period (5 in this case) rather than the long term period as the code uses.
`aperiod = Param("Smoothing period", 20, 1, 30, 1 );`
Change the 20 to 5 if you wish to see the book’s recommendation.

Type of moving average used to calculate Smoothed VPCI
Buff specifies using a VWMA to calculate the Smoothed VPCI rather than an SMA as the code uses
`Vps = MA( Vp, aperiod);`
Change MA to VWMA to see the book’s recommendation.

I am not suggesting one choice is better than the other. The author may have found his settings performed better.