Professional Documents
Culture Documents
//Source
//Interval
//------------------------------------------------------------------------------------------------------------------------------------
-----------------------------
//Definitions
//------------------------------------------------------------------------------------------------------------------------------------
-----------------------------
//Interval Open
//New Interval
//Volume
v = volume
//VWAP
pv = src*v
VWAP = pvsum/vsum
//VWAR
rv = (high - low)*v
VWAR = rvsum/vsum
//Bands
//Colors
vcolor1 = VWAP > VWAP[1] ? lime : VWAP < VWAP[1] ? red : orange
vcolor2 = VWAP > VWAP[1] ? green : VWAP < VWAP[1] ? maroon : orange
barcolor = (VWAP > VWAP[1]) and (src > VWAP) and (src > src[1]) ? lime : (VWAP > VWAP[1]) and (src
> VWAP) and (src < src[1]) ? green : (VWAP < VWAP[1]) and (src < VWAP) and (src < src[1]) ? red :
(VWAP < VWAP[1]) and (src < VWAP) and (src > src[1]) ? maroon : orange
//------------------------------------------------------------------------------------------------------------------------------------
-----------------------------
//Plots
//------------------------------------------------------------------------------------------------------------------------------------
-----------------------------
//VWAP