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 ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Vol-Price Confirmation Indicator for Amibroker (AFL)

Rating:
3 / 5 (Votes 6)
Tags:
trading system, amibroker

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

Screenshots

Indicator / Formula

Copy & Paste Friendly
// 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 );

// simple trading system follows
Buy = Vp > Vps AND
      ADX( 7 ) > 10 AND
      MACD( 12, 26 ) > Signal( 12, 26, 9 );
Sell = Vps < Vp;

1 comments

1. dfly

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.

Leave Comment

Please login here to leave a comment.

Back