| Trading Indicators Post your custom trading indicators. If you download, remember to click INSTALL. |
![]() | | Tweet | |
VWAP Indicator with 1SD and 2SD bands Details »» | |||||||||||||||||||||||||||
Guys I am not a TS coding guru by any means...still new at it but wanted to share this code if anyone else was interested. Just wrote this code for myself to keep up with JPERL's threads on Market Statistics. It plots the VWAP, and 1st and 2nd Standard Deviation bands. It lines up with his numbers within a tick or two so I think it is working correctly. Any other TS coders out there please take a look because it can probably be improved upon. This is my first post of a file so if I screwed something up...be gentle! Hope this helps, dbntina boxmeister Download Now
Show Your Support
| |||||||||||||||||||||||||||
| ∧ Similar Indicator | ||||
| Mod | Developer | Type | Replies | Last Post |
| TS Tick by Tick PVP Plotted with VWAP and SD Bands | dbntina | Trading Indicators | 51 | 11:54 AM 02-18-2012 |
| The Following 13 Users Say Thank You to dbntina For This Useful Post: | ||
| Comments |
| | #2 | ||
![]() | Re: VWAP Indicator with 1SD and 2SD bands Thank you for posting this. I had always wanted an indicator that provided statistical representation of what was happening today. Nice job! | ||
| |
|
| | #3 | ||
![]() | Re: VWAP Indicator with 1SD and 2SD bands I dont think there are too many ninja users out there - everybody seems to use esignal or tradestation! Cheers, Jay. | ||
| |
|
| | #4 | ||
![]() | Re: VWAP Indicator with 1SD and 2SD bands I am not sure if the calculation for vi is correct. In your EL you have used variance_i = ((UpTicks[Value1]+DownTicks[Value1])/ShareW) * (Square(AvgPrice[i]-VolWAPValue)); where (UpTicks[i]+DownTicks[i]) represents volume of the bar [i]... I think in a probability calculation one should use total volume at price i, not just volume of the bar i. Lets ask Jerry for clarification. | ||
| |
|
| | #5 | ||
![]() | Re: VWAP Indicator with 1SD and 2SD bands I am not sure if the calculation for vi is correct. In your EL you have used variance_i = ((UpTicks[Value1]+DownTicks[Value1])/ShareW) * (Square(AvgPrice[i]-VolWAPValue)); where (UpTicks[i]+DownTicks[i]) represents volume of the bar [i]... I think in a probability calculation one should use total volume at price i, not just volume of the bar i. Lets ask Jerry for clarification. NickM001, You are correct. In the code, ShareW is always the total share volume up to the current time from your start. You divide the volume of the current bar by the total volume and use this "normalized volume" to multiply with according to Jerry. This should be correct if I am understanding the formula correctly. It also seems to line up with Jerry's bands so I think it is correct. Let me know...I can correct if I am not suppossed to normalize this way... Thanks for taking a look at the code if it is incorrect we want to find out now. dbntina | ||
| |
|
| | #6 | ||
| Re: VWAP Indicator with 1SD and 2SD bands Thank you for your contribution. If you happen to need any updating on the code, threads here can be edited at anytime so please feel free to do so. Also, would it be possible to add a screenshot of the indicator in action? It would help traders give a visual clue on what the indicator is all about. Thanks.
__________________ | |||
| |
|
| | #7 | ||
![]() | Re: VWAP Indicator with 1SD and 2SD bands Thanks, dbntina | ||
| |
|
| | #8 | ||
![]() | Re: VWAP Indicator with 1SD and 2SD bands QUOTE#################### ################### While we won't address all these questions in one thread their answers can be obtained by analysis of the volume distribution function. To do so requires that we introduce a third property of the volume distribution function called the Standard Deviation of the VWAP, SD for short. SD is computed from the following equations: NOTE : Formula did not copy ... see http://www.traderslaboratory.com/for...dard-2101.html where the summation subscript i, runs over all prices in the volume distribution pi = ith price in the volume distribution Pi = vi/V is the probability of occurrence of price pi vi = the volume traded at price pi from the volume distribution V = total volume for the entire distribution ######################### ######## Note that factor vi is volume traded at price pi. If I understand your code, you have used volume of the bar[i], or volume at time [i], not as described in the formula. To get proper value for vi, you would have to keep track of all the volume distribution at EACH price level of the range in the array and use the value of volume array element [i] that corresponds to price pi. It can be done, but it would take more then few lines of code, unfortunately. For some odd reason, it does not seem to make much difference even if you set vi/V = 1, for the few sample charts I looked at. So for all practical purposes, SD value is usable... | ||
| |
|
![]() |
| Tags |
| vwap |
| Thread Tools | |
| Help Others By Rating This Thread | |
| |
| ∧ Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Trading With Market Statistics.II The Volume Weighted Average Price (VWAP). | jperl | Market Profile | 65 | 02-25-2012 04:02 PM |
| Trading with Market Statistics III. Basics of VWAP Trading | jperl | Market Profile | 73 | 01-03-2012 08:06 AM |
| Question regarding Bollinger Bands | Robert | Technical Analysis | 22 | 08-08-2009 10:37 PM |
| Is the RSI indicator any good? | Lisa | Technical Analysis | 14 | 04-27-2008 12:41 PM |