// Downloaded From https://www.WiseStockTrader.com
function VZO( Period ) 
{ 
 R = sign( Close - Ref( Close, -1 ) ) * Volume; 
 VP = EMA( R, Period ); 
 TV = EMA( Volume, Period ); 
 return Nz( 100 * VP / TV ); 
} 

Period = Param("Period", 14, 1, 100 ); 
Plot( VZO( Period ), "Volume Zone Osc" + _PARAM_VALUES(), colorBlack, styleThick ); 
Plot( 60, "", colorLightOrange, styleNoLabel ); 
Plot( 40, "", colorLightOrange, styleNoLabel  ); 
Plot( 0, "", colorBlack, styleNoLabel  ); 
Plot( -40, "", colorLime, styleNoLabel  ); 
Plot( -60, "", colorLime, styleNoLabel  );