William’s Variable Accumulation Distribution

The Williams Variable Accumulation Distribution (WVAD), developed by Larry Williams, is a volume-weighted price momentum indicator.  It measures the buying and selling pressure by calculating the relationship between the number of points the market has moved from the open to close relative to the period’s entire range.  Short positions are taken for a negative moving average value, and Long positions for positive average values.


WVAD = (( Close – Open ) / ( High – Low )) * Volume

The formula can be implemented with a DYO, as shown.   This is available as a package to download from the Ensign web site using the Package feature in Ensign 10.

A – Period for Moving Average (Line D)
B – Implements the formula.    WVAD = (( Close – Open ) / ( High – Low )) * Volume
C – Plot the formula values.  This statement is used because it will plot values that equal zero, whereas plotting directly from line B would not.
D – Simple Moving Average of the WVAD.  Plotted in Red.
F – Mark where the average crosses above zero.  This is the Long signal.
G – Mark where the average crosses below zero.  This is the Short signal.

ESPL: Sum Volume for a Swing

Q:  How can I determine the volume for a swing, or the volume between two bars on the chart?

A:  I will illustrate 3 ways in my answer.  The first way is to use the Pesavento Patterns study and change the Marker to the VOL selection, which will sum the volume for a swing.  This tool is automatic in picking the swing points.

The 2nd suggestion is to put on a Draw Line with the same VOL marker and the total volume in the bars spanned by the draw line will be printed at the end of the line.  See an example of the draw line’s volume in the next image.

The 3rd suggestion is to use the ESPL programming language, and sum the volume in a loop between two index locations on the chart.  The example will use two index points from the Pesavento Patterns study.  Any two index points could be used.

Line 12 finds the chart.  Line 13 finds the Pesavento Patterns study.  Lines 14 and 15 find the two indexes for the prior swing.   Line 16 writes the total volume to the output window.

The total volume is summed by the Function SumVolume which loops through the bars between the two indexes passed as parameters and adds each bar’s volume to the total.

Moving Average on Volume

Q:  In 1988 I had the first Knight Ridder Tradestation and I was able to do something that was pretty neat but I have never seen it since the demise of KR.  I could plot moving averages of volume and then display them on top of price. Using Fib numbers for the MA’s it gave very interesting wave structures and knowing this was a volume push was a powerful indicator.  Is there a way to do this in Ensign?

A:  Yes.   Change the Data Point for the Moving Average study to reference Volume.

Interactive Broker Chart Volumes

Q:  Why does my 15-second chart from IB have less volume than the same chart in Ensign?  When I refresh the Ensign chart from IB, the volume difference is corrected.

A: The higher volume bars in Ensign should be considered to be more correct than the IB chart, and here is why.   IB is a sampled feed, meaning they do not send all ticks.  The IB chart is charting the ticks seen and summing the tick volumes on those ticks. Ticks NOT sent, because it is a sampled feed, are totally ignored.

Ensign, on the other hand, compares the tick volume on the tick received with the change in total volume. Then they match, Ensign uses the tick volume value. When they differ, obviously some ticks were not sent and Ensign adds a filler tick with the needed tick volume to stay in sync with total volume.  These inserted ticks with the missing tick volume are the source of the larger volume values shown in Ensign compared to IB.

When the tick database is refreshed, Ensign receives 1 second records from IB to work with and this erases the filler ticks with the missing tick volume.  Thus the refreshed result looks more like the IB chart.  The refresh has forced Ensign to miss the ticks that the IB chart missed.  What Ensign is doing to account for missing volume in the live feed it better than what IB is doing.  The chart Ensign shows with the inserted missing tick volume is MORE like the charts from other data vendor who send all ticks.  It is recommended that refresh only be used when data is missing.

FYI, Ensign 10 does the same thing for the Yahoo Finance feed which is also a sampled feed.  Ensign 10 watches the change in total volume to calculate the tick volume that must have occurred since the last tick was received.

Volume Data for Indexes

Q: Traderbyte volume data is inconsistant on the $DOWI 30 min chart. Volume looks good on daily,weekly, and monthly although the volume amount shows milliions when should be billions.

A: The $DOWI is an index and as such is not a traded instrument.  The intra-day refresh does not have any volume information.   On the intra-day charts, what is being shown in the volume field for a bar is a tick count when the bar is built in real-time.  Each time a value is received, the volume is treated as 1 and the sum would be a total number of ticks in the bar’s time period.

On daily refresh from TraderBytes for this index, a volume value is returned. Their values
are shown in the millions. Possibly the values sent have a decimal shift to show 100 lots. Either way, Ensign displays the values returned on the data feed.

For weekly and monthly, the TraderBytes source does not have weekly and monthly bars, so Ensign requests refresh of daily bars and builds weekly and monthly bars from the daily data.  The daily volume values are summed to get a weekly value and a monthly value.