Return value of the Williams Accumulation Distribution indicator of selected price.
Syntax:
1 |
WilliamsAccumDistr(price) |
Calculation :
TRH = the highest of (yesterday’s close or today’s high)
TRL = the smallest of (yesterday’s close or today’s low)
If the today’s close > yesterday’s close then A/D = today’s close – TRL
if the today’s close < the yesterday’s close then A/D = today’s close – TRH
If the today’s close = yesterday’s close then A/D = 0
A/D William = today’s A/D + yesterrday’s A/D William
Interpretation :
Accumultation results in a market controlled by buyers and Distribution results in a market controlled by sellers. The A/D gives good divergence signals.
A sell signal is given when a bearish divergence appears. A bearish divergence occurs when the stock price makes new highs while the A/D fails to make new highs.
A buy signal is given when a bullish divergence appears.
A bullish divergence occurs when the stocj price makes new lows while the A/D fails to make new lows.
Example :
1 2 3 4 5 6 7 8 9 10 11 |
i1 = WilliamsAccumDistr(close) if(i1>0) THEN bullish = bullish + 1 bearish = bearish - 1 ELSIF i1<0 THEN bullish = bullish - 1 bearish = bearish + 1 ENDIF RETURN bullish, bearish |