- Katılım
- 23 Eki 2020
- Mesajlar
- 1,826
Volume Price Confirmation indicator (VPCI)
kaynak
traders.com
Kod:
// 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
Technical Analysis of STOCKS & COMMODITIES - THE TRADERS' MAGAZINE - Learn to Trade
Technical Analysis of Stocks & Commodities magazine is the savvy trader's guide to profiting in any market. Every month, we provide serious traders with information on how to apply charting, numerical, and computer trading methods to trade stocks, bonds, mutual funds, options, forex and futures.