VWAP svp aider pour timeframe x minute

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #201382 quote
    bertrandpinoybertrandpinoy
    Participant
    Veteran

    Bonsoir,

    Pouvez vous m apporter votre aide pour visualiser le code en time frame x minute, disons 5min… (ligne 6).

    Mes tentatives échouent. Merci par avance, cordialement.

    //PRC_VWAP intraday
    //07.09.2016
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    
    d = max (1, intradaybarindex)
    
    VWAP = SUMMATION[d](volume*typicalprice)/SUMMATION[d](volume)
    if(intradaybarindex=0) then
    sd = 0
    else
    sd = SUMMATION[d](max(abs(high-vwap),abs(vwap-low)))/d
    endif
    
    SDup1 = vwap+sd
    SDlw1 = vwap-sd
    SDup2 = vwap+sd*2
    SDlw2 = vwap-sd*2
    SDup3 = vwap+sd*3
    SDlw3 = vwap-sd*3
    
    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"
    

     

    d avance, cordialement.

    VWAP..itf
    #201397 quote
    NicolasNicolas
    Keymaster
    Legend

    Pas bien compris ta question, souhaites tu visualiser la valeur de la VWAP 5-minutes sur un timeframe plus petit ?

    #201413 quote
    bertrandpinoybertrandpinoy
    Participant
    Veteran

    Oui c’est cela.

    #201421 quote
    NicolasNicolas
    Keymaster
    Legend

    Très bien, donc simplement ajouter l’instruction TIMEFRAME adéquat devant le code à calculer dans ce timeframe, soit :

    //PRC_VWAP intraday
    //07.09.2016
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    
    timeframe(5 minutes,updateonclose)
    d = max (1, intradaybarindex)
    
    VWAP = SUMMATION[d](volume*typicalprice)/SUMMATION[d](volume)
    if(intradaybarindex=0) then
    sd = 0
    else
    sd = SUMMATION[d](max(abs(high-vwap),abs(vwap-low)))/d
    endif
    
    SDup1 = vwap+sd
    SDlw1 = vwap-sd
    SDup2 = vwap+sd*2
    SDlw2 = vwap-sd*2
    SDup3 = vwap+sd*3
    SDlw3 = vwap-sd*3
    
    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"
    bertrandpinoy thanked this post
Viewing 4 posts - 1 through 4 (of 4 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

VWAP svp aider pour timeframe x minute


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
Summary

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

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 09/25/2022
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...