This is from the same article as the FVE Indicator that is meant for short term trading. If someone could port this... much obliged.
Website: http://mkatsanos.com/VFI.html
The VFI is based on the popular On Balance Volume (OBV) but with three very important modifications:
Website: http://mkatsanos.com/VFI.html
Code:
Amibroker Code
Period = Param("VFI Period", 130, 26, 300, 10 );
Smooth=Param( "SMOOTH", 3, 1, 10, 1 );
MAP=Param( "MA Period", 30, 20, 100, 10 );
Coef = 0.2;
VCoef = Param("Vol Cutoff", 2.5, 1, 5, .5 );
inter = log( Avg ) - log( Ref( Avg, -1 ) );Vinter = StDev(inter, 30 );
Cutoff = Coef * Vinter * Close;Vave = Ref( MA( V, Period ), -1 );
Vmax = Vave * Vcoef;Vc = Min( V, VMax );MF = Avg - Ref( Avg, -1 );
VCP = IIf( MF > Cutoff, VC, IIf ( MF < -Cutoff, -VC, 0 ) );
VFI1 = Sum( VCP , Period )/Vave;
VFI =EMA( VFI1, smooth ); MAVFI=MA(VFI,MAP);
dynamic_color = IIf( VFI >= 0, colorGreen, colorRED ) ;
Plot( VFI, "VFI(" + PERIOD + ")", dynamic_color, styleThick );
Plot( MAVFI, "",coloryellow, styleDashed );
PlotGrid( 0, colorBlueGrey );
The VFI is based on the popular On Balance Volume (OBV) but with three very important modifications:
- Unlike the OBV, indicator values are no longer meaningless. Positive readings are bullish and negative bearish.
- The calculation is based on the day's median instead of the closing price.
- A volatility threshold takes into account minimal price changes and another threshold eliminates excessive volume.
- The indicator takes into account only the latest 6 month volume action and not the entire data loaded in the chart.