How to calculate VWAP deviation bands?

Discussion in 'Technical Analysis' started by abotarga, Nov 22, 2019.

  1. abotarga

    abotarga

    It doesn't help that different online resources have different formulas for calculating the bands.

    It doesn't appear to be as simple as finding the standard deviation of the VWAP.
     
    #11     Nov 22, 2019
  2. abotarga

    abotarga

    The closest I've been able to get is using the standard deviation of closing price
     
    #12     Nov 22, 2019
  3. Real Money

    Real Money

    I think the problem you might be having is that the standard deviation formula uses an average price. What average are you using? I use session VWAP, so it is reset at the open (9:30AM).

    Your daily charts are going to use the daily VWAP data and find an average ( close? ). It makes a big difference what you use......
     
    #13     Nov 22, 2019
  4. MichalTr

    MichalTr

    But this link exactly do the job. Screenshot attached.

    - N is number of observations, to make it simpler - how many units you have since beginning of observation (let's say you use 5min chart, and there is 1 hour after session start, N=12)
    - i is iteration for each unit (1,2,3...N)
    - xi is VWAP for iteration i
    - x with dash is average VWAP since start of observation
     
    #14     Nov 22, 2019
  5. abotarga

    abotarga

    I'm not sure what you mean by average price. Do you mean average close? Or average VWAP?

    VWAP is reset at open. Calculating the VWAP is not an issue. It's the bands I don't understand.
     
    #15     Nov 22, 2019
  6. abotarga

    abotarga

    Thanks for telling me what all the variables are -- the article didn't explain it well.

    When I plug all the numbers into the formula, I'm still getting the wrong results. Unless I'm doing the math completely wrong (which is entirely possible).
     
    #16     Nov 22, 2019
  7. Real Money

    Real Money

    I will tell you this. In ThinkorSwim you can go into the VWAP study and just view the source code. It will tell you what they are using.
     
    #17     Nov 22, 2019
  8. abotarga

    abotarga

    Thanks so much for sharing this. I had no idea this was possible. The code makes a lot more sense than the other articles I've seen.
     
    #18     Nov 22, 2019
  9. Real Money

    Real Money

    No problem. I have been using all of their source code to build indicators and analysis tools.

    thinkScript is an incredibly powerful tool for traders trying to get an edge.
     
    #19     Nov 22, 2019
  10. MichalTr

    MichalTr

    Out of curiosity - could you paste this code with standard deviation bands calculation in ToS ?

    I don't use it, but made also this excel calculation after your post and I want to check where is the difference.
     
    #20     Nov 22, 2019