Forums › ProRealTime English forum › ProBuilder support › Gann Hilo Activator and Volume Price Confirmation Indicator › Reply To: Gann Hilo Activator and Volume Price Confirmation Indicator
01/02/2017 at 6:06 PM
#19640
Because the instrument you put the indicator on need Volume.
You can try this version instead, which prevent the indicator to calculate if it has still not bar enough loaded:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
stvwmaperiods = 10 ltvwmaperiods = 50 stsmaperiods = 5 svpciperiods = 10 price = customclose if barindex>ltvwmaperiods then // Calculate Short Term & Long Term Volume Weighted Moving Averages ShortTermVWMA= Summation[stvwmaperiods](Volume*price)/Summation[stvwmaperiods](Volume) LongTermVWMA= Summation[ltvwmaperiods](Volume*price)/Summation[ltvwmaperiods](Volume) // Calculate Short Term Simple Moving Average ShortTermSMA= average[stsmaperiods](price) // Calculate the VPCI Components VPC= ShortTermVWMA - ShortTermSMA VPR= ShortTermVWMA / ShortTermSMA VM= ShortTermVWMA / LongTermVWMA // Calculate Volume Price Confirmation Indicator // Normalize VPCI values & Calculate Volume-Weighted MA of VPCI VPCI= VPC * VPR * VM//) * 10000 / C SmoothedVPCI= Summation[svpciperiods](Volume*VPCI)/Summation[svpciperiods](Volume) endif return VPCI,smoothedVPCI |
It’s working for me, but as I said, I’m not sure how it should look, because I saw many other different versions of this indicator over the internet.