+1 888 340 6572

Predictors > Zero Balance

Article/Author: Aldo A. Palles for Omega Research Inc., 1997

Download: zerobal.ela

File Includes: Indicator - Zero Balance

Category: Indicator > Predictors

Description:

This Study is based on Zero Balance by Larry Williams. This tool is used to attempt to predict where prices will go. The 'Predict' Input will allow you to choose if you want to plot the current Zero Balance (0), tomorrow's Zero Balance (1), or Zero Balance 2 day forcast (2).

Usage:

Label each of the last eight highs and lows eight to one starting with eight being the most recent. Add the value of point six and five and subtract point eight (6 + 5 - 8 = Zero Balance). This should be where the market is going next. If price doesn't follow the Zero Balance line down, that is a bullish indication. If price doesn't follow the Zero Balance up, that is a bearish indication. If the market makes three consecutive up/down moves without the market following, we should have a big move in the opposite direction.




Inputs:

Predict - Zero Balance type:

0 - Current Zero Balance
1 - Tomorrow's Zero Balance
2 - Zero Balance 2 day forcast

EasyLanguage Code:
INPUTS: PREDICT(0);

VARS: LENGTH(7);
ARRAY: IRPNTS[8](0);

VARS: FLAG(1), IRHIGH(0), IRLOW(0), IRHIGHBAR(0), IRLOWBAR(0), HIGHBAR(0), LOWBAR(0), ZEROBAL(0), ZEROBAL1(0), ZEROBAL2(0), OFFSET(0);

IF BARNUMBER > LENGTH THEN BEGIN
CONDITION1 = HIGH > HIGHEST(HIGH, LENGTH)[1];
CONDITION2 = LOW < LOWEST(LOW, LENGTH)[1];
END;

IF CONDITION1 AND FLAG = 1 THEN BEGIN
FLAG = 2;
IRLOWBAR = BARNUMBER;
LOWBAR = LOWESTBAR(LOW, BARNUMBER - IRHIGHBAR + OFFSET);
IRLOW = LOWEST(LOW, BARNUMBER - IRHIGHBAR + OFFSET);
OFFSET = LOWBAR;
PLOT1[LOWBAR](IRLOW, "IR");
PLOT2[LOWBAR](IRLOW, "IR");
END;

IF CONDITION2 AND FLAG = 2 THEN BEGIN
FLAG = 1;
IRHIGHBAR = BARNUMBER;
HIGHBAR = HIGHESTBAR(HIGH, BARNUMBER - IRLOWBAR + OFFSET);
IRHIGH = HIGHEST(HIGH, BARNUMBER - IRLOWBAR + OFFSET);
OFFSET = HIGHBAR;
PLOT1[HIGHBAR](IRHIGH, "IR");
PLOT2[HIGHBAR](IRHIGH, "IR");
END;

IF FLAG <> FLAG[1] THEN BEGIN

FOR VALUE1 = 1 TO LENGTH BEGIN
IRPNTS[VALUE1] = IRPNTS[VALUE1+1];
END;

IF FLAG = 2 THEN
IRPNTS[LENGTH + 1] = IRLOW
ELSE
IRPNTS[LENGTH + 1] = IRHIGH;

IF IRPNTS[1] <> 0 THEN BEGIN
ZEROBAL = IRPNTS[6] + IRPNTS[5] - IRPNTS[3];
ZEROBAL1 = IRPNTS[7] + IRPNTS[6] - IRPNTS[4];
ZEROBAL2 = IRPNTS[8] + IRPNTS[7] - IRPNTS[5];
IF PREDICT = 0 THEN BEGIN
PLOT3[OFFSET](ZEROBAL, "ZEROBAL");
PLOT4[OFFSET](ZEROBAL, "ZEROBAL");
END;
IF PREDICT = 1 THEN BEGIN
PLOT3[OFFSET](ZEROBAL1, "ZEROBAL");
PLOT4[OFFSET](ZEROBAL1, "ZEROBAL");
END;
IF PREDICT = 2 THEN BEGIN
PLOT3[OFFSET](ZEROBAL2, "ZEROBAL");
PLOT4[OFFSET](ZEROBAL2, "ZEROBAL");
END;
END;
END;

IF DATE = LASTCALCDATE THEN BEGIN
IF IRPNTS[1] <> 0 THEN BEGIN
ZEROBAL = IRPNTS[6] + IRPNTS[5] - IRPNTS[3];
ZEROBAL1 = IRPNTS[7] + IRPNTS[6] - IRPNTS[4];
ZEROBAL2 = IRPNTS[8] + IRPNTS[7] - IRPNTS[5];
IF PREDICT = 0 THEN BEGIN
PLOT3[OFFSET](ZEROBAL, "ZEROBAL");
PLOT4[OFFSET](ZEROBAL, "ZEROBAL");
END;
IF PREDICT = 1 THEN BEGIN
PLOT3[OFFSET](ZEROBAL1, "ZEROBAL");
PLOT4[OFFSET](ZEROBAL1, "ZEROBAL");
END;
IF PREDICT = 2 THEN BEGIN
PLOT3[OFFSET](ZEROBAL2, "ZEROBAL");
PLOT4[OFFSET](ZEROBAL2, "ZEROBAL");
END;
END;
END;