vwap bands with more than 3 deviation bands

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #148571 quote
    ed65
    Participant
    Average

    hi , is it possible to add deviation bands to the 3 usual ones

    #148621 quote
    Nicolas
    Keymaster
    Master

    Below is the code of the VWAP with 4 standard deviation bands:

    //PRC_VWAP intraday 
    //SAME VERSION AS THE ORIGINAL VWAP FROM THE PLATFORM
    //09.01.2020
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    
    if day<>day[1] then
    d=0
    else
    d=d+1
    if volume >0 then
    VWAP = SUMMATION[d](volume*typicalprice)/SUMMATION[d](volume)
    endif
    sd = std[d](abs(typicalprice-vwap))
    
    SDup1 = vwap+sd
    SDlw1 = vwap-sd
    SDup2 = vwap+sd*2
    SDlw2 = vwap-sd*2
    SDup3 = vwap+sd*3
    SDup4 = vwap+sd*4
    SDlw3 = vwap-sd*3
    SDlw4 = vwap-sd*4
    endif
    
    if vwap>vwap[1] then
    color = 1
    else
    color = -1
    endif
    
    
    RETURN VWAP coloured by color STYLE(LINE,2) as "VWAP", SDup1 coloured(102,102,102) STYLE(DOTTEDLINE,1) as "upper 1 STD", SDlw1 coloured(102,102,102) STYLE(DOTTEDLINE,1) as "lower 1 STD", SDup2 coloured(102,102,102) STYLE(DOTTEDLINE,1) as "upper 2 STD", SDlw2 coloured(102,102,102) STYLE(DOTTEDLINE,1) as "lower 2 STD", SDup3 coloured(102,102,102) STYLE(DOTTEDLINE,1) as "upper 3 STD", SDlw3 coloured(102,102,102) STYLE(DOTTEDLINE,1) as "lower 3 STD",SDup4 coloured(102,102,102) STYLE(DOTTEDLINE,1) as "upper 4 STD", SDlw4 coloured(102,102,102) STYLE(DOTTEDLINE,1) as "lower 4 STD"
    Doji thanked this post
    #148634 quote
    Vonasi
    Moderator
    Master

    ed65 – Topic moved to the ProBuilder forum as it is an indicator question. Please try to post in the most relevant forum with future topics.

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

vwap bands with more than 3 deviation bands


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
ed65 @ed65 Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 10/26/2020
Status: Active
Attachments: No files
Logo Logo
Loading...