'************************************************************** '* Adaptive Price Zone Lower Band (APZLower) '* by Jeremy Williams '* August 22,2006 '* '* Adapted from Technical Analysis of Stocks and Commodities '* September 2006 '* '* Summary: '* '* This indicator returns and plots the Lower band around the '* double smoothed EMA. For more information see "Trading '* With An Adaptive Price Zone" in the August 2006 edition of '* Technical Analysis of Stocks and Commodities. '* '* Parameters: '* '* Periods= Specifies the number of Periods used for the EMA and '* average range calculations. '* '* BandWidth= Specifies the number of deviations above/below the '* double smoothed EMA used to calculate the Bands '* '************************************************************** #Indicator #Param "Periods",5 #Param "BandWidth",2 Dim myLower As Single Dim myEMA As Single Dim myDoubleEMA As Single Dim myRange As Single Dim myRangeEMA As Single Dim myRangeDEMA As Single ' Find the EMA and the Double Smoothed EMA myEMA = EMA(Periods) myDoubleEMA = EMA(myEMA,Periods) ' Find the intraday range and average using a Double Smoothed EMA myRange = High - Low myRangeEMA = EMA(myRange,Periods) myRangeDEMA = EMA(myRangeEMA,Periods) ' Caclulate the lower band myLower = myDoubleEMA - BandWidth*myRangeDEMA ' Plot the lower band PlotPrice("Lower",myLower) Return myLower ' Return the value of the Lower Band