+1 888 340 6572

Bands > Price Channel

Article/Author: Omega Research Inc., 1997

Download: PRICECHANNEL.ELA

Category: Indicator > Bands

Description:

The Price Channel indicator calculates the highest high and lowest low of the trailing number of bars specified by the input Length. Lines representing the trailing highs and the trailing lows are then plotted.

Usage:

When a market moves above the upper band, it is a sign of market strength. Conversely, when a market moves below the lower band, it is a sign of market weakness. A sustained move above or below the channel lines may indicate a significant breakout.




Inputs:

Length - Number of bars of data to be included in calculation
Displace - Number of bars to displace the plot of the Price Channel

EasyLanguage Code:
INPUTS: LENGTH(10), DISPLACE(0);

VARIABLES: TCHAN(0), BCHAN(0);

TCHAN = HIGHEST(HIGH, LENGTH)[1];
BCHAN = LOWEST(LOW, LENGTH)[1];

IF DISPLACE >= 0 OR CURRENTBAR > ABSVALUE(DISPLACE) THEN BEGIN
PLOT1[DISPLACE](TCHAN, "TOPCHAN");
PLOT2[DISPLACE](BCHAN, "BOTCHAN");

{ALERT CRITERIA}
CONDITION1 = PLOT1 <> PLOT2;
IF CLOSE > PLOT1 AND CONDITION1 THEN
ALERT("PRICE HAS CLOSED OVER THE TOP BAND")
ELSE
IF CLOSE < PLOT2 AND CONDITION1 THEN
ALERT("PRICE HAS CLOSED UNDER THE BOTTOM BAND");

END;