VWAP Bands, le bon code ?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #208165 quote
    KryptoKat
    Participant
    New

    Bonjour à tous, bonjour Nicolas.

    Je cherche le code exact de l’indicateur VWAP Bands intégré à PRT.

    Effectivement, il y a bien déjà été ajouté par Nicolas dans un message de janvier 2020 ; mais si on compare chaque graphique, on voit qu’ils sont en réalité parfois très différents (selon les formules utilisées). Donc, et sauf erreur de ma part ou de mes lunettes, ce n’est pas tout à fait ça.

    Les sujets que j’ai déjà consultés :

    https://www.prorealcode.com/prorealtime-indicators/vwap-intraday/ (2016)

    VWAP Bands

    Is there any working intraday VWAP?

    Voici ce que j’utilise à ce jour et qui donne un graphique le plus proche de l’indicateur intégré à PRT.

    Merci à tous de votre retour.

    David

    // source : https://www.prorealcode.com/topic/vwap-bands/
    // modifé par david 25.01.2023
    
    //PRC_vwap intraday
    //SAME VERSION AS THE ORIGINAL vwap FROM THE PLATFORM
    //09.01.2020
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
     
    d = 1440
    prx = close
    vw = volume*prx // volume*close
    vwsum = SUMMATION[d](vw)
    volsum = SUMMATION[d](volume)
    
    vwap = vwsum/volsum
    sd = std[d](prx) //
    
    // autre version sincitytrader depuis les commentaires de https://www.prorealcode.com/prorealtime-indicators/vwap-intraday/
    // vwap = SUMMATION[d](volume*typicalprice)/SUMMATION[d](volume)
    // sd = SUMMATION[d](max(abs(high-vwap),abs(vwap-low)))/d
     
    sdup1 = vwap+sd
    sdlw1 = vwap-sd
    sdup2 = vwap+sd*2
    sdlw2 = vwap-sd*2
    sdup3 = vwap+sd*3
    sdlw3 = vwap-sd*3
     
    RETURN vwap AS "vwap", sdup1 AS "upper 1 std", sdlw1 AS "lower 1 std", sdup2 AS "upper 2 std", sdlw2 AS "lower 2 std", sdup3 AS "upper 3 std", sdlw3 AS "lower 3 std"
    
    #208168 quote
    Nicolas
    Keymaster
    Master

    Celui ci devrait répondre à ta demande, selon moi cette dernière version correspond à la version actuelle de la plateforme (qui a évolué pour les bandes en v11.1).

    VWAP Band indicator

    KryptoKat thanked this post
    #208173 quote
    KryptoKat
    Participant
    New

    Magnifique !

    Merci Nicolas. Effectivement, sur ma version 11 , c’est parfait.

    Si cela intéresse certains, voici ensuite la version que j’utilise :

    d = 1440
     
    VWAP = SUMMATION[d](volume*typicalprice)/SUMMATION[d](volume)
    
    p1 = SUMMATION[d](volume*typicalprice)
    p2 = SUMMATION[d](volume)
    p3 = SUMMATION[d](volume*typicalprice*typicalprice)
    ma = p1/p2
    ma2 = p3/p2
    sd = sqrt(abs(ma2 - ma * ma))
     
    SDup1 = vwap+sd
    SDlw1 = vwap-sd
    SDup2 = vwap+sd*2
    SDlw2 = vwap-sd*2
    SDup3 = vwap+sd*3
    SDlw3 = vwap-sd*3
     
    RETURN vwap AS "vwap", sdup1 AS "upper 1 std", sdlw1 AS "lower 1 std", sdup2 AS "upper 2 std", sdlw2 AS "lower 2 std", sdup3 AS "upper 3 std", sdlw3 AS "lower 3 std"
    Nicolas and Alai-n thanked this post
    #208179 quote
    Nicolas
    Keymaster
    Master

    Merci pour ton retour ! 🙂

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

VWAP Bands, le bon code ?


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
KryptoKat @kryptokat Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by Nicolas
3 years, 1 month ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 01/25/2023
Status: Active
Attachments: No files
Logo Logo
Loading...