VWAP & MVWAP indicators

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #127540 quote
    kumar_AK
    Participant
    Junior

    HI There,

    I am looking to use VWAP indicator & MVWAP( ExponencialMooving Averate(VWAP 30 days).

    I have very little knowledge of this indicator. I am trying to plot these on my chart.

    There is vwap indicator available on advanced chart. so I added that with daily period. (VWAP(Daily) not sure what period to use.

    how do I get MVAP.

    can some one help me and put in a direction to explore more.

    Thanks

    AK

    #127555 quote
    Nicolas
    Keymaster
    Master

    MVWAP is an EMA of the last X calculation of the VWAP. I think I can handle the code for that, but with PRT v11 only. Is that ok?

    #127562 quote
    kumar_AK
    Participant
    Junior

    I am currently using PRT V10.3

    I am not aware if 11 is available. I can upgrade.

    #127563 quote
    kumar_AK
    Participant
    Junior

    Hi Nicolas,

    I did a quick research. V11 is not available for IG clients. I am using IG platform.

    Did you have nay work around.

    thanks

    #127585 quote
    Nicolas
    Keymaster
    Master

    Try that code:

    period = 30
    
    if day<>day[1] then
    d=0
    else
    d=d+1
    if volume >0 then
    VWAP = SUMMATION[d](volume*typicalprice)/SUMMATION[d](volume)
    endif
    MVWAP = average[period](vwap)
    
    endif
    
    RETURN VWAP as "VWAP", MVWAP as "MVWAP"
    kumar_AK thanked this post
    #127592 quote
    kumar_AK
    Participant
    Junior

    Thank you very much Nic.

    I have successfully Plotted  VWAP & MVWAP on my char.

    Your code VWAP line is very close to the default indicator provided by IG VWAP(Daily).

    only drawback is it is not working on daily chart. IT is working all the time frames below daily (15min, 30 min, 1hr,2hr,3hr,4 hr).

    My screener is not working using this indicator. Is there a way to scan the stocks VWAP Cross over MVAP.

    when I tried I am getting all the stocks.

    #127603 quote
    Nicolas
    Keymaster
    Master

    The code I provided  is an intraday VWAP.

    The below code introduce a setting to choose the vwap period, to add it onto the daily chart. So the VWAP calculation start at VWAPPERIOD+1, I don’t know if that’s relevant though.. Usually the VWAP is anchored at the beginning of a fixed period (day, month, year, date ..)

    vwapPeriod = 100
    mvwapPeriod = 30
    
    
    d=vwapperiod
    if volume >0 and barindex>vwapperiod then
    VWAP = SUMMATION[d](volume*typicalprice)/SUMMATION[d](volume)
    endif
    MVWAP = average[mvwapperiod](vwap)
    
    RETURN VWAP as "VWAP", MVWAP as "MVWAP"
    kumar_AK thanked this post
    #159208 quote
    guarins
    Participant
    New

    hi! how can i download VWAP for my platform? i’m using 11.1 version. i would like to add daily VWAP. could you help me? i don’t find ITF file :/

    #159209 quote
    guarins
    Participant
    New

    Try that code:

     

    hi! how can i download VWAP for my platform? i’m using 11.1 version. i would like to add daily VWAP. could you help me? i don’t find ITF file :/

    #159220 quote
    kumar_AK
    Participant
    Junior

    thanks Nicolas.

    this code is working fine on 10.3 and 11.1

    create a new indicator with this code and add to your chart. easy to use.

    #159222 quote
    guarins
    Participant
    New

    thanks Nicolas.

    this code is working fine on 10.3 and 11.1

    create a new indicator with this code and add to your chart. easy to use.

    i did it, but the indicator draw a straight line, look the png files

    1-2.jpg 1-2.jpg 2.jpg 2.jpg
    #159225 quote
    guarins
    Participant
    New

    thanks Nicolas.

    this code is working fine on 10.3 and 11.1

    create a new indicator with this code and add to your chart. easy to use.

    i would like to setup an VWAP daily, how can i do? :/

    #175207 quote
    IG_CFD_Trader
    Participant
    Average

    Hi Nicolas (and all PRC experts).

    Regarding your intraday VWAP indicator that you published in the forum:

    DEFPARAM CALCULATEONLASTBARS = 96

    defparam drawonlastbaronly = True
    d = intradaybarindex + 1 //(OR d = max(1,intradaybarindex)
    VWAP = SUMMATION[d](volume*Close)/SUMMATION[d](volume)

    Return VWAP coloured(255,0,255) STYLE(line,1) as “VWAP”

    I have the following question:

    Although this indicator correctly resets itself at 00:00 start of every day, it also continues to show VWAP for a few days in the past (depending on chart units and/or CALCULATEONLASTBARS value (96 in above code). This is perfectly fine but my question is as follows:

    If I wanted to carry out further analysis and calculations on the indicator, how do I limit my calculations to JUST the bars after 00:00 of the current day (i.e. any intradaybars prior to 00:00 of current day (eg yesterday and day before yesterday intradaybars) are excluded)?

    At the moment, any calcs I do on indicator is applied to 96 bars and depending on where time of current bar is (example at 5am in the morning), 96 bars is well into yesterday’s intraday.

    I am sure there is a simple solution to this.

     

    Thank you and regards.

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

VWAP & MVWAP indicators


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
kumar_AK @kumar_ak Participant
Summary

This topic contains 12 replies,
has 3 voices, and was last updated by IG_CFD_Trader
4 years, 6 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 04/23/2020
Status: Active
Attachments: 2 files
Logo Logo
Loading...