Since the introduction of the native TOS Volume Profile, I’ve had numerous requests to publish “those lines” that were a part of my original Volume Profile study. The lines are a chart period VWAP (Volume Weighted Average Price) and three VWAP standard deviation bands which default to 1/2/3 sigma but are user selectable. By chart period I mean that the VWAP is not by day or week (like the TOS version) but rather will display the VWAP for all the chart data displayed. I have migrated my own use to the TOS profiles so this makes the studies feel more like my own. Happy Easter!
# TS_CHART_VWAP_SD_BANDS # http://www.thinkscripter.com # thinkscripter@gmail.com # Last Update 03 APR 2010 input VWAPStdev1 = 1.0; input VWAPStdev2 = 2.0; input VWAPStdev3 = 3.0; plot VWAP = TotalSum(((high+low+close)/3)*volume) / TotalSum(volume); def vwapSD = sqrt(TotalSum(Sqr(((high+low+close)/3)-VWAP)*volume)/TotalSum(volume)); VWAP.SetDefaultColor(color.magenta); VWAP.SetStyle(curve.SHORT_DASH); VWAP.SetLineWeight(3); plot r1 = VWAP+VWAPStdev1*vwapSD; plot s1 = VWAP-VWAPStdev1*vwapSD; plot r2 = VWAP+VWAPStdev2*vwapSD; plot s2 = VWAP-VWAPStdev2*vwapSD; plot r3 = VWAP+VWAPStdev3*vwapSD; plot s3 = VWAP-VWAPStdev3*vwapSD; r1.setDefaultColor(color.orange); r2.setDefaultColor(color.pink); r3.setDefaultColor(color.cyan); s1.setDefaultColor(color.orange); s2.setDefaultColor(color.pink); s3.setDefaultColor(color.cyan); r1.SetStyle(curve.SHORT_DASH); r2.SetStyle(curve.SHORT_DASH); r3.SetStyle(curve.SHORT_DASH); s1.SetStyle(curve.SHORT_DASH); s2.SetStyle(curve.SHORT_DASH); s3.SetStyle(curve.SHORT_DASH); VWAP.hideBubble(); r1.hideBubble(); r2.hideBubble(); r3.hideBubble(); s1.hideBubble(); s2.hideBubble(); s3.hideBubble();






Thank you Eric,
Much appreciated.
Peace-
RappidFyre
Interesting indicator. One of the aspects that I think might be misleading about this indicator is that it repaints since it always takes into account the total sum of the chart values as a new bar is added to the chart. This doesn’t necessarily take away from its ability to provide potentially useful projections for resistance / support but attempting to visually backtest it’s accuracy isn’t possible without actually “stepping back in time”.
Based on my research VWAP variations are typically used on intraday charts, but my intent is to see how it does on the daily charts, as I’m a swing trader.
The plot lines do not change after the fact. The TotalSum function is only aware of bars prior to it and hence the study lines will not change as the study is repainted each bar.
-Eric
Hello,
Is is it possible to have 2 periods for VWAP (Like a 5000 tick VWAP and a 10,000 tick VWAP)? If so, could each VWAP indicator be plotted on the same graph? Mark Whistler in his book, “Volatility Illuminated”, shows a graph where this is done. He also has the ability to show the standard deviations for each VWAP if desired.
Bob (puddie)
Interesting idea. I’m not sure if it can be done but worth investigating…
-Eric
is it an easy fix to modify this to work like the tos version does ?
for day, week, etc.
thank you
This study was purposefully designed not to work like the TOS version. That is, rather than replicate an already existing TOS study that works great, I wanted a version that would reflect whatever chart period I chose to plot without modifying the study in any way. The two complement each other rather than supplant each other.
-Eric
Hi Eric , I am not a client but I happened to stumble across your website and I would like to take this opportunity to THANK YOU for your DEDICATED SERVICE to our GREAT COUNTRY. Your lifetime achievements are absolutely remarkable. Your parents must be so proud of you. America truly needs more people just like you. Thanks Again
Hello. Is it possible to use VWAP standard deviation bands in filter script (custom study filter) on “Scan” tab in TOS? For example scan for prices which near or cross deviation bands.
Thanks for answer.
It would be really cool to have a VWAP STD indicator for the lower pane display which ranges between eith -3 to +3 or -4 to +4, as not to “clog up” the price window. Great stuff Eric !!!