it uses an approximation of Up and Down Volume (because they are not kept by Tradingview/not accessible by Pinescript).
The approximation is:
The “up path” on the “up” candle can be approximated by ( High-Low ).
The “down path” on the “up” candle can be approximated by (High-Close)+(Open-Low).
(and similar for the down candle, like in the 1st post.)
Total path=up path + down path.
Up volume = Tick volume * up path/total path
Down volume = Tick volume * down path/total path
(description from original author: kprsa)
//PRC_Monster Cumulative Delta | indicator
//30.06.2022
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
//converted from pinescript
//U1
if(close>=open and (close-open+2*(high-close)+2*(open-low)))>0 then
U1= volume*(high-low)/(close-open+2*(high-close)+2*(open-low))
else
U1=0.0
endif
//D1
if(close<open and (open-close+2*(high-open)+2*(close-low)))>0 then
D1 = volume*(high-low)/(open-close+2*(high-open)+2*(close-low))
else
D1=0.0
endif
//Delta
if(close>=open) then
Delta= U1
else
Delta= -D1
endif
if barindex>1 then
cumDelta=(cumDelta[1])+Delta
if close>=open then
hi= cumDelta
else
hi =cumDelta[1]
endif
if close<=open then
lo= cumDelta
else
lo=cumDelta[1]
endif
drawcandle(cumDelta[1], hi, lo, cumDelta)
endif
return
You must be logged in to post a comment.
Ciao Nicolas, molto bello questo indicatore, l'ho apprezzato molto. Lo sto testando insieme al VWAP e al Volume profile. Entrambi si aggiornano ogni mattina (ripartono da 0), sarebbe possibile farlo ripartire da zero ogni giorno? Grazie e buona giornata. Andrea
A contrario du commentaire précédent, cet indicateur est génial à condition de comprendre le "Delta Cumulé" ! Cependant là ou je rejoins le commentaire de "Regisnouveau", c'est que la plateforme ne lui détecte aucune valeur ! Donc impossible d'y appliquer un indicateur ou même une "Alerte sur seuil" via la plateforme!!! @Nicolas, penses-tu pouvoir lui donner une data qui permettra de régler cet inconvénient ??? Merci
Je poste ici un lien afin de mieux appréhender le CVD-Cumulative Volume Delta : https://www.beatmarket.fr/p/bientot-le-meilleur-moment-dinvestir#:~:text=Le%20Cumulative%20Volume%20Delta%20(CVD)%20est%20un%20indicateur%20qui%20trace,ordres%20de%20vente%20au%20march%C3%A9).