Time Anchored VWAP

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #128162 quote
    snow_onarsnow_onar
    Participant
    Senior

    Hello
    What are the settings for an intraday 1 min chart. I would like define 3 anchored vwap:

    2 am, 7 am and 9:30 am.

    Thanks a lot for your support.

    #128382 quote
    NicolasNicolas
    Keymaster
    Legend

    I made this specific code to anchor the VWAP on a specific intraday time:

    //time anchored VWAP
    //SAME VERSION AS THE ORIGINAL VWAP FROM THE PLATFORM
    //27.04.2020
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    
    timestart = 070000
    
    if time=timestart then
    d=0
    drawtext("➤",barindex,typicalprice,dialog,bold,20)
    else
    d=d+1
    if volume >0 then
    VWAP = SUMMATION[d](volume*typicalprice)/SUMMATION[d](volume)
    endif
    endif
    
    if vwap>vwap[1] then
    color = 1
    else
    color = -1
    endif
    
    
    RETURN VWAP coloured by color STYLE(LINE,1) as "VWAP"

    The start of the VWAP is labelled with an arrow.

    time-anchored-vwap.png time-anchored-vwap.png
    #219178 quote
    KumoNoJuzzaKumoNoJuzza
    Participant
    New

    Hi,

    I would like to compute the VWAP with a sliding interval as per the attached pic.

    Should I amend the code as follow ?

    //time anchored VWAP
    //SAME VERSION AS THE ORIGINAL VWAP FROM THE PLATFORM
    //27.04.2020
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    
    timestart = currenttime-010000
    
    if time=timestart then
    d=0
    drawtext("➤",barindex,typicalprice,dialog,bold,20)
    else
    d=d+1
    if volume >0 then
    VWAP = SUMMATION[d](volume*typicalprice)/SUMMATION[d](volume)
    endif
    endif
    
    if vwap>vwap[1] then
    color = 1
    else
    color = -1
    endif
    
    
    RETURN VWAP coloured by color STYLE(LINE,1) as "VWAP"
    image_2023-08-16_125923308.png image_2023-08-16_125923308.png
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Time Anchored VWAP


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
snow_onar @snow_onar Participant
Summary

This topic contains 2 replies,
has 1 voice, and was last updated by KumoNoJuzzaKumoNoJuzza
3 years, 2 months ago.

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