File Includes: Indicator - Uni-Channel
Category: Indicator > Bands
This is the Uni-channel indicator from Ensign. The type designation of 1 means the channel is created from the addition of the Average plus the constant. The type of 2 uses the Average * the constant and adds it to the average.
Bands define the upper and lower boundaries of a security's normal trading range. A sell signal is generated when the security reaches the upper band whereas a buy signal is generated at the lower band. The optimum percentage shift depends on the volatility of the security--the more volatile, the larger the percentage.
The logic behind bands is that overzealous buyers and sellers push the price to the extremes (i.e., the upper and lower bands), at which point the prices often stabilize by moving to more realistic levels.
There are two kinds of bands: envelops and Bollinger bands.
The difference between Bollinger bands and envelopes is envelopes are plotted at a fixed percentage above and below a moving average, whereas Bollinger bands are plotted at standard deviation levels above and below a moving average. Since standard deviation is a measure of volatility, the bands are self-adjusting: widening during volatile markets and contracting during calmer periods. Bollinger Bands were created by John Bollinger.
Price - specifies which price of the asset to use
MaLen - number of trailing bars to average
Const1 - upper band multiplier
Const2 - lower band multiplier
Type - mode of indicator
INPUTS: PRICE(CLOSE),MALEN(10),CONST1(.8), CONST2(1.2),TYPE(1);
VARS: CENTLINE(0), UPPER(0), LOWER(0);
IF TYPE=1 THEN BEGIN
IF TYPE=2 THEN BEGIN