VWAP PRT différend

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #237586 quote
    larouedegann
    Participant
    Master

    Bonjour,

    J’ai une différence de VWAP donc de déviation VWAP avec le VWAP PRT;

    ci-joint le code le plus récent trouver sur PRT et une copie du graphique 1 mn.

    Il me semble qu’il ne prend pas en compte le premier chandelier à 2H15.l’écart se réduit par la suite du fait que le volume augmente

    dans la journée.

    Merci si vous avez une idée

    //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
    SDlw3 = vwap-sd*3
    endif
     
    if vwap>vwap[1] then
    color = 1
    else
    color = -1
    endif
     
     
    RETURN VWAP  as "VWAP", SDup1 as "upper 1 STD",SDup2 as "upper 2 ",Sdup3 AS "upper 3 ",Sdlw1 as "lower 1",Sdlw2 as "lower 2",sdlw3 as "lower 3"
    
    #237595 quote
    JS
    Participant
    Senior
    #237627 quote
    larouedegann
    Participant
    Master

    NE FONCTIONNE PAS  CORRECTEMENT NON PLUS

    #237630 quote
    Iván González
    Moderator
    Master

    Le problème vient de la somme de l’expression. Si c'est ce que vous avez préparé exactement :

    if day<>day[1] then
    d=1
    VWAP=typicalprice
    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
    SDlw3 = vwap-sd*3
    endif
      
    RETURN VWAP  as "VWAP", SDup1 as "upper 1 STD",SDup2 as "upper 2 ",Sdup3 AS "upper 3 ",Sdlw1 as "lower 1",Sdlw2 as "lower 2",sdlw3 as "lower 3"
    #237726 quote
    larouedegann
    Participant
    Master

    Merci IVAN

    La VWAP est juste.

    J’ai juste remis la dérivation de nicolas qui me semble plus cohérente.

    Ce serait bien de poster ce code et de ne plus en parler une fois pour toutes.

    🙂

    #237760 quote
    Nicolas
    Keymaster
    Master
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

VWAP PRT différend


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
Summary

This topic contains 5 replies,
has 4 voices, and was last updated by Nicolas
1 year, 4 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 09/15/2024
Status: Active
Attachments: 4 files
Logo Logo
Loading...