Anchored VWAP High and Low

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #188565 quote
    JackD
    Participant
    Junior

    Hi,

    Would it be possible to get a Anchored VWAP indicator for the daily high and the daily low? There is one on Tradingview but I cant seem to find anything close on PRT

    Cheers,

    Jack

    #188593 quote
    Nicolas
    Keymaster
    Master

    The below code will compute and plot in real time the VWAP anchored on both daily high and daily low:

    if dhigh(0)>dhigh(0)[1] then 
    starthigh=barindex
    endif
    if dlow(0)<dlow(0)[1] then 
    startlow=barindex
    endif 
    
    dh = max(1, barindex-starthigh)
    dl = max(1, barindex-startlow)
    
    VWAPh = SUMMATION[dh](volume*typicalprice)/SUMMATION[dh](volume)
    VWAPl = SUMMATION[dl](volume*typicalprice)/SUMMATION[dl](volume)
    
    
    RETURN VWAPh coloured("red"), vwapl coloured("green")
    #188688 quote
    JackD
    Participant
    Junior

    Great thank you so much!!! 🙂

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

Anchored VWAP High and Low


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
JackD @jackd Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by JackD
3 years, 11 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 02/20/2022
Status: Active
Attachments: No files
Logo Logo
Loading...