[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Larry Williams A/D indicator



PureBytes Links

Trading Reference Links

I din't have it but the coding of this indicator would not be hard. 
This is the formula for it:

To calculate the Williams' Accumulation/Distribution indicator, 
determine:

True Range High (TRH) = Yesterday's close or today's high whichever 
is greater

True Range Low (TRL) = Yesterday's close or today's low whichever is 
less

The day's accumulation/distribution is then calculated by comparing 
today's closing price to yesterday's closing price.

If today's close is greater than yesterday's close: Today's A/D = 
today's close - TRL

If today's close is less than yesterday's close: Today's A/D = 
today's close - TRH

If today's close is the same as yesterday's close then the A/D is 
zero.

The Williams' Accumulation/Distribution indicator is a cumulative 
total of the daily values:

Williams A/D = Today's A/D + Yesterday's Williams A/D

Thus, the Williams' Accumulation/ Distribution indicator is used to 
determine if the Forex market is controlled by buyers (accumulation) 
or by sellers (distribution); and trading when there is divergence 
between price and the A/D indicator.

The Williams A/D indicator recommends buying when prices fall to a 
new low, yet the A/D indicator fails to reach a new low. Likewise, 
sell when the price makes a new high and the indicator fails to 
follow suit.

The code follows:

Barry

// Larry Williams' Accumulation/Distribution indicator

/*To calculate the Williams' Accumulation/Distribution indicator, 
determine:
True Range High (TRH) = Yesterday's Close OR today's High whichever 
is greater
True Range Low (TRL) = Yesterday's Close OR today's Low whichever is 
less
The Day's accumulation/distribution is then calculated by comparing 
today's closing price to yesterday's closing price.
if today's Close is greater than yesterday's Close: Today's A/D = 
today's Close - TRL
if today's Close is less than yesterday's Close: Today's A/D = 
today's Close - TRH
if today's Close is the same as yesterday's Close then the A/D is 
zero.
The Williams' Accumulation/Distribution indicator is a cumulative 
total of the daily values:
Williams A/D = Today's A/D + Yesterday's Williams A/D
*/

TRH = IIf(Ref(C, -1) > H, Ref(C, -1), H);
TRL = IIf(Ref(C, -1) < L, Ref(C, -1), L);
ad = IIf(C > Ref(C, -1), C - TRL, IIf(C < Ref(C, -1), C - TRH, 0));
WAD = Cum(ad); 
Plot(WAD, "Williams AD", colorBlue);
Plot(ad, "AD daily", colorRed, styleOwnScale | styleNoLine | 
styleNoLabel );

AddColumn(ad, "AD");
AddColumn(wad, "WAD");
Buy = Sell = C;
Filter = Buy OR Sell;

"Williams' Accumulation/ Distribution indicator is used to determine 
if the Forex market is controlled by buyers (accumulation) OR by 
sellers (distribution). \n\nTrade when there is Divergence between 
price AND the A/D indicator.\n\nThe Williams A/D indicator recommends 
buying when prices fall to a new Low, yet the A/D indicator fails to 
reach a new Low. \n\nLikewise, Sell when the price makes a new High 
AND the indicator fails to follow suit.";


--- In amibroker@xxxxxxxxxxxxxxx, "johnsyska" <johnsyska@xxx> wrote:
>
> Hi All,
> I need your help. Has anybody coded or could share with me the 
Larry 
> Williams' Accumulation and Distribution Indicator? I know that 
> standard A/D for AB is very simmilar but I would like to experiment 
> with the other one. Thank you in advance.
> 
> John S
>




Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/