Meta:
	Weblink("http://www.tradesignalonline.com/lexicon/view.aspx?id=16748"),
    Synopsis("Price Zone Oscillator Indicator, based on the article in the 05/2011 issue of Stocks And Commodities. This indicator is
    useful in uptrends, downtrends or even sideways market conditions. It can be seen as a complement to the Volume Zone Oscillator"),
    ShortCode("PZO"),
    Subchart( True );

Input:
	Period(14),
	Upper_Line_1( 60 , 1 ),
	Upper_Line_2( 40 , 1 ),
	Upper_Line_3( 15 , 1 ),
	Lower_Line_1( -5 , -100 ),
	Lower_Line_2( -40 , -100 ),
	Lower_Line_3( -60 , -100 );

Vars: 
	absClose, digitalClose, avgDigitalClose, avgClose, pzOscillator;
 
absClose = AbsValue(Close);

digitalClose = Sign(Close - Close[1]) * absClose;
avgDigitalClose = XAverage(digitalClose, Period);
avgClose = Xaverage(absClose, Period);
 
if avgClose <> 0 then 
	pzOscillator = 100 * avgDigitalClose / avgClose;
 
DrawLine( pzOscillator, "pzOscillator", StyleSolid, 2, Blue );
DrawLine( Upper_Line_1, "UL 1", StyleDash, 2, DarkGreen );
DrawLine( Upper_Line_2, "UL 2", StyleDash, 1, Black );
DrawLine( Upper_Line_3, "UL 3", StyleDash, 1, Black );

DrawLine( Lower_Line_1, "LL 1", StyleDash, 1, Black );
DrawLine( Lower_Line_2, "LL 2", StyleDash, 1, Black );
DrawLine( Lower_Line_3, "LL 3", StyleDash, 2, Red );

DrawLine( 0, "Zero", StyleDot, 1, Black );

// *** Copyright tradesignal GmbH ***
// *** www.tradesignal.com ***