Williams AD - price based

I am trying to get a working script for Williams AD (based on price rather than the typical “volume based”)

I thought this would work (found on a post a couple years back by Darren) but the script below does not seem to create a Williams AD based on price that looks anything like priced based Williams AD that I get on my other trading platforms.

Maybe this is only part of what’s necessary or maybe the formula’s wrong. Can anyone shed some light?

bp1 = HIGH() - OPEN();
sp1 = CLOSE() - LOW();
hl1 = HIGH() - LOW();
(bp1 + sp1) / (2 * hl1)

Hi Mark,

That is the formula for the DRF (Daily Raw Figure) which matches what I have in Perry Kaufman’s Trading Systems book.

Remember the distinction between the Breadth Advance Decline line and this AD Oscillator. It may be that the other trading apps are showing a breadth measure rather than this TA Indicator.

Bottom line. Your script is right and it matches what we have for the Williams Advance Decline indicator.

All the best

Mathew