VWAP with percentage adjustment

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #158752 quote
    ThePenntChemist
    Participant
    Average

    HI There,

    Is there an intraday VWAP indicator with % adjustment. Basically, it will have the main vwap and 2 additional vwap bands, 1 at above and 1 at below as per attached image.

    Wayne

    VWAP.jpg VWAP.jpg
    #158794 quote
    Nicolas
    Keymaster
    Master

    Please find below the VWAP code with bands in percentage, change the percentage setting at first line:

    percent = 1
    
    if day<>day[1] then
    d=0
    else
    d=d+1
    if volume >0 then
    VWAP = SUMMATION[d](volume*typicalprice)/SUMMATION[d](volume)
    endif
    
    endif
    
    RETURN VWAP  as "VWAP", vwap*(1+percent/100) as "up", vwap*(1-percent/100) as "down"
    #159770 quote
    ThePenntChemist
    Participant
    Average

    Hello Nicolas,

    Thank you for the code.

    I have tested the above code in ProRealTime but I’ve found the candles “Circled in orange” are not align to the main vwap, 2% vwap and -2%  vwap.

    I have attached image comparison PRT to two other platforms that may give you an insight to what I’m talking about.

    Many Thanks,
    Wayne

    2vwap.jpg 2vwap.jpg
    #159776 quote
    Vonasi
    Moderator
    Master

    What you get out depends on what you put in! The data feeding your two other platforms will be different to the PRT data feed. The output from any indicator when applied to different data will be different!

    I imagine if you check the candles and the volume for each candle on each platform you will see that they are different.

    #159783 quote
    ThePenntChemist
    Participant
    Average

    Hi Vonasi, thank you for the feedback.

    The codes Nicolas provided I think it’s based on intraday vwap with % outter bands. Would there be different if the code was based on daily vwap with % outter bands?

    I think I may gotten it mixed up with intraday vwap vs daily vwap.  Please see the attached image. I have added another indicator (daily vwap, orange line), it seems to be reflect to the other two platform. Could this be the issue here?

    2-3.jpg 2-3.jpg
    #159787 quote
    Vonasi
    Moderator
    Master

    They sound like the same thing to me. Nicolas’ code uses typical price in the calculation – perhaps the other indicators use close or median price?

    #159789 quote
    Nicolas
    Keymaster
    Master

    The internal VWAP of the platform uses the real volume by price (Bid/Ask) in order to calculate, which is not possible with custom coding, that’s why it differs a bit.

    Vonasi thanked this post
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.

VWAP with percentage adjustment


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 6 replies,
has 3 voices, and was last updated by Nicolas
5 years ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 01/21/2021
Status: Active
Attachments: 3 files
Logo Logo
Loading...