Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
"The Standard Deviation Bands for the Volume Weighted Average Price on different timeframe bars will be different. This is because the Standard Deviation is calculated over the chart bar values, and you have vastly different values. For example, you only have every fifth value on a 5 minute bar chart versus a 1 minute bar chart.
float CumulativeBarStandardDeviationDifferenceSquaredTimesVolume = 0
The following repeats at each bar.
Diff = CurrentBarPrice - VolumeWeightedAveragePriceAtBar
BarPriceStdDevDiffSquared = (Diff * Diff)
CumulativeBarStandardDeviationDifferenceSquaredTimesVolume += (BarPriceStdDevDiffSquared * BarVolume)
CalcResult = CumulativeBarStandardDeviationDifferenceSquaredTimesVolume + BarPriceStdDevDiffSquared * BarVolume
StandardDeviation = SquareRoot (CalcResult / CumulativeVolumeForPeriod)
StandardDeviationWithDistanceMultiplier = StandardDeviation * DistanceMultiplier"
Actually, there is no contradiction. What I said earlier is correct, namely:
* vwap and stdev use same underlying data
* vwap and stdev are volume weighted (stdev was previously not volume weighted)
Neo is also correct (he actually looked at the code - thank you) in that the calc is done per bar, so the values are at a point in time. So, while the stddev is volume weighted, it is still approximated somewhat because a single calc is done instead of calculating for every tick within the bar. Because this is a per bar calc, using an overlay will not produce the same stdev results across different timeframe bars.
You mean an overlay will produce the same STD results across different times frames? It's an overlay based on a fixed study of X timeframe/ bars, the calc should be irrespective of different timeframes your overlaying the study onto. i'm assuming that's the logic of an SC overlay study.
No thats not what I meant. Sorry if I was not clear, but what I was getting at was that you can not use an overlay study to compare the values from diff timeframes for things that are calculated on a per bar basis because the values are different.
The overlay study is meant to grab values from another chart/study and plot them on the current chart. This is generally done using the bar timestamp to find the correct bar on the target chart and then bring that value over.
I see now, thanks. I just figured that the overlay would plot from the source like a line graph connecting the data points, but I can see how this wouldn't work now based on the timestamps.
So there is no current solution in SC to plot the VWAP band accuracy of a 1tick chart on a higher resolution/ time frame chart?
Actually, if you calc the stdev on a tick chart, that would be the most accurate value (using the right algo). The overlay could then bring that over on a bar by bar basis. The only thing to remember, is you are pulling the value for the beginning of the bar (8:30 15-min bar will have the value from 8:30 not the value as the bar progresses). I generally do not use the overlay study because of this. I know there should be a few other versions of the overlay laying around that work differently (i.e. look at start/end time of bar accordingly).
Of course the bigger issue is why bother? If you are getting a slightly more accurate stddev (less than a tick) does it really matter? I would argue it does not, except in the case of proving the numbers/algo is correct. This is similar to how people freak out about the TICK being slightly off/different, when in reality it is about the patterns and what the patterns are telling you. The original issue of the stddev not being volume weighted was worth finding/fixing because the values were just wrong.
This isn't really anything like people obsessing over tick charts. There can instances where the developing bands on say a 15min chart are quite different to those on say a 5min/1min/1 tick- As per the examples posted. I don't want to be referencing a 15min chart to see that price failed to touch the top of a STD band, to then look at a smaller time frame chart eg 5min/1min/1tick and see that price actually had.
The real question is simply, will @SierraChart add the ability for the standard deviation bands on VWAP to be calculated based on underlying data, so they are as accurate as possible?