Navigation: Study Formulas > Volume

Volume

Top  Previous  Next

The study formulas included in the Volume section are:

 

 

accDist()

 

This function calculates the Accumulation/Distribution of a security as Volume * (Close-Open)/(High-Low).

 

Parameters

 

inv

select the bar interval on which this study should be calculated or leave blank to calculate on the default bar interval

 

 

 

negativeVolIndex()

 

This function calculates the negative volume index (NVI). The interpretation of the NVI assumes that on days when volume increases, the crowd-following "uninformed" investors are in the market. Conversely, on days with decreased volume, the "smart money" is quietly taking positions. Thus, the NVI displays what the smart money is doing.

 

Parameters

 

inv

select the bar interval on which this study should be calculated or leave blank to calculate on the default bar interval

 

 

 

onBalanceVol()

 

This function calculates the On Balance Volume (OBV). OBV is the difference between Up Volume and Down Volume over the available data bars.

 

Parameters

 

inv

select the bar interval on which this study should be calculated or leave blank to calculate on the default bar interval

 

 

 

volCum()

 

Intraday Only. This function calculates a cumulative volume value for a trading session. The calculation is reset on each new day. So if you were using 5-min bars with a session from 09:30 to 16:00 then the value returned by volCum() at 9:30 would be the volume of the 9:30am bar. The value returned at 9:35 would be the 9:30 volume plus the 9:35 volume. The value returned at 9:40 would be the 9:30 volume plus the 9:35 volume plus the 9:40 volume, etc. When using this function you must be certain that you have enough bars available in ScanExpert to account for 1 full day. For 1-min bars with a session from 9:30 to 16:00 you would need to request at least 390 bars. Because ScanExpert is restricted to loading a maximum of 600 bars per symbol, this function cannot be used in conjunction with 24-hour 1-min bars (which would require a minimum of 1440 bars).

 

Parameters

 

inv

select the bar interval on which this study should be calculated or leave blank to calculate on the default bar interval

 

 

 

vwap()

 

This function calculates a proxy for volume weighted average price. The calculation is reset on each new day. The formula is cumulative volume * price divided by cumulative volume. When using this function you must be certain that you have enough bars available in ScanExpert to account for 1 full day. For 1-min bars with a session from 9:30 to 16:00 you would need to request at least 390 bars. Because ScanExpert is restricted to loading a maximum of 600 bars per symbol, this function cannot be used in conjunction with 24-hour 1-min bars (which would require a minimum of 1440 bars).

 

Parameters

 

inv

select the bar interval on which this study should be calculated or leave blank to calculate on the default bar interval

 

 

 

vwapCum()

 

This function calculates a proxy for volume weighted average price, which is calculated over the number of days specified. So, for example, a 2-day vwapCum would include the data from the prior trading day as well as the data up to the current bar in the current trading day. The calculation is cumulative volume * price divided by cumulative volume. In the event that more days are requested than exist in the current dataset, the function will use all of the data that is available (so if you request a 10-day vwapCum but only 8 days worth of data is available, then you will end up with an 8-day wvapCum).

 

Parameters

 

days

number of days over which to calculate the vwap (1-12)

inv

select the bar interval on which this study should be calculated or leave blank to calculate on the default bar interval