Epuisement via CVD Cumulative Volume Delta (Bis)
Forums › ProRealTime forum Français › Support ProBuilder › Epuisement via CVD Cumulative Volume Delta (Bis)
- This topic has 5 replies, 2 voices, and was last updated 6 hours ago by Alai-n.
-
-
09/04/2024 at 12:59 PM #237073
Je relance le sujet comme ceci, car impossible de le remonter dans la file depuis des semaines…
09/04/2024 at 5:02 PM #237094Bonjour. J'apprécierais que vous puissiez partager le code que vous avez actuellement car dans le fil de discussion précédent, je vois que vous avez apporté des modifications et que vous ne les avez pas partagées. À partir de là, que voulez-vous montrer exactement.
09/05/2024 at 10:54 AM #237128Bonjour Ivan, j’ai juste retouché les lignes 94, 98, 102… J’ai beaucoup de mal à reprendre ton code pour l’amener à terme!
Epuisement Price via CVD123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140//"Absorption-Epuisement PriceCumDelta" Cycle via MACD//--------------------------------------------------------////--------------------------------------------------------////"Cumulative Delta" (by Nicolas/ProRealcode)//--------------------------------------------------------////U1if(close>=open and (close-open+2*(high-close)+2*(open-low)))>0 thenU1= volume*(high-low)/(close-open+2*(high-close)+2*(open-low))elseU1=0.0endif//D1if(close<open and (open-close+2*(high-open)+2*(close-low)))>0 thenD1 = volume*(high-low)/(open-close+2*(high-open)+2*(close-low))elseD1=0.0endif//--------------------------------------------------------////Deltaif(close>=open) thenDelta= U1elseDelta= -D1endif//--------------------------------------------------------//if barindex>1 thencumDelta=(cumDelta[1])+Deltaif close>=open thenhi= cumDeltar=255g=255b=255elsehi =cumDelta[1]endifif close<=open thenlo= cumDeltar=255g=0b=0elselo=cumDelta[1]endifdrawcandle(cumDelta[1], hi, lo, cumDelta) coloured(r,g,b)endif//--------------------------------------------------------////-----MACD-----------------------------------------------//fastema=average[12,1](close)slowema=average[26,1](close)mymacd=fastema-slowemasignal=average[9,1](mymacd)histo=mymacd-signal//--------------------------------------------------------//if histo crosses under 0 then$priceLow[n+1]=low$histoLow[n+1]=histo$cumdeltaLow[n+1]=cumdelta$barprice[n+1]=barindex$barhisto[n+1]=barindex$bardelta[n+1]=barindexn=n+1elsif histo < 0 thenif low < $pricelow[n] then$pricelow[n]=low$barprice[n]=barindexendifif histo < $histolow[n] then$histoLow[n]=histo$barhisto[n]=barindexendifif cumdelta < $cumdeltalow[n] then$cumdeltaLow[n]=cumdelta$bardelta[n]=barindexendifendif//--------------------------------------------------------//if histo crosses over 0 then$priceHigh[n+1]=high$histoHigh[n+1]=histo$cumdeltaHigh[n+1]=cumdelta$barprice[n+1]=barindex$barhisto[n+1]=barindex$bardelta[n+1]=barindexn=n+1elsif histo > 0 thenif high > $pricehigh[n] then$pricehigh[n]=high$barprice[n]=barindexendifif histo > $histohigh[n] then$histoHigh[n]=histo$barhisto[n]=barindexendifif cumdelta > $cumdeltahigh[n] then$cumdeltahigh[n]=cumdelta$bardelta[n]=barindexendifendif//--------------------------------------------------------//if n>1 then//----- Epuisement Up-------------------------------------------------//divPriceCumdeltaEU = $cumdeltalow[n]>$cumdeltalow[n-1] and $pricelow[n]<$pricelow[n-1]//-----Divergence CumDelta & Price------------------------------------//if histo crosses over 0 and divPriceCumdeltaEU thendrawarrowup(barindex,$cumdeltalow[n])coloured("lightgreen")drawsegment($bardelta[n-1],$cumdeltaLow[n-1],$bardelta[n],$cumdeltaLow[n])coloured("lightgreen")//-----Divergence Histogram-Price---------------------------------//elsif histo crosses over 0 and divPriceCumdeltaEU thendrawarrowup(barindex,$cumdeltalow[n])coloured("yellow")drawsegment($bardelta[n-1],$cumdeltaLow[n-1],$bardelta[n],$cumdeltaLow[n])coloured("yellow")endifendif//--------------------------------------------------------//if n>1 then//----- Epuisement Down------------------------------------------------//divPriceCumdeltaED = $cumdeltahigh[n]<$cumdeltahigh[n-1] and $pricehigh[n]>$pricehigh[n-1]//-----Divergence CumDelta & Price------------------------------------//if histo crosses under 0 and divPriceCumdeltaED thendrawarrowdown(barindex,$cumdeltahigh[n])coloured("lightgreen")drawsegment($bardelta[n-1],$cumdeltahigh[n-1],$bardelta[n],$cumdeltahigh[n])coloured("red")//-----Divergence Histogram-Price---------------------------------//elsif histo crosses under 0 and divPriceCumdeltaED thendrawarrowdown(barindex,$cumdeltahigh[n])coloured("yellow")drawsegment($bardelta[n-1],$cumdeltahigh[n-1],$bardelta[n],$cumdeltahigh[n])coloured("yellow")endifendif//--------------------------------------------------------//Return//--------------------------------------------------------/09/05/2024 at 3:06 PM #237155Bon, je vois un premier problème. Je vois que vous avez calculé de nouveaux tableaux lorsque
histo crosses over 0
, selon la ligne 82. Le problème est le nombre qui définit la position de la valeur générée dans le tableau. Ce ne devrait pas être n mais une autre variable. Changez n pour m par exemple. Gardez à l'esprit que vous l'avez déjà défini dans la section ci-dessus et qu'il varie lorsquehisto crosses under 0
1 user thanked author for this post.
09/09/2024 at 8:57 AM #237338Bonjour @Iván, merci pour tes précédentes indications, elles m’ont permis d’avancer un peu…
J’ai cependant depuis la création de deux nouveaux blocs, lignes 138 à 177 et lignes 179 à 218, un problème d’affichage sur “drawarrowup, drawarrowdown et drawsegment”… Tout se positionne en haut de la Fenêtre de l’indicateur(comme sur la photo jointe) !
Si tu pouvais m’indiquer ce qui cloche ?
Merci
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224//"Absorption-Epuisement PriceCumDelta" Cycle via MACD////////////////////////////////////////////////////////////////////////////////////////////////////////--------------------------------------------------------////"Cumulative Delta-CVD" (by Nicolas/ProRealcode)//--------------------------------------------------------////U1if(close>=open and (close-open+2*(high-close)+2*(open-low)))>0 thenU1= volume*(high-low)/(close-open+2*(high-close)+2*(open-low))elseU1=0.0endif//D1if(close<open and (open-close+2*(high-open)+2*(close-low)))>0 thenD1 = volume*(high-low)/(open-close+2*(high-open)+2*(close-low))elseD1=0.0endif//--------------------------------------------------------////Deltaif(close>=open) thenDelta= U1elseDelta= -D1endif//--------------------------------------------------------//if barindex>1 thencumDelta=(cumDelta[1])+Deltaif close>=open thenhi= cumDeltar=255g=255b=255elsehi =cumDelta[1]endifif close<=open thenlo= cumDeltar=255g=0b=0elselo=cumDelta[1]endifdrawcandle(cumDelta[1], hi, lo, cumDelta) coloured(r,g,b)endif////////////////////////////////////////////////////////////////////////////////////////////////////////-----MACD-----------------------------------------------//fastema=average[12,1](close)slowema=average[26,1](close)mymacd=fastema-slowemasignal=average[9,1](mymacd)histo=mymacd-signal//////////////////////////////////////////////////////////////////////////////////////////////////////if histo crosses under 0 then //Bloc CVD Epuisement Up$priceClose[n+1]=close$histoClose[n+1]=histo$cumdeltaClose[n+1]=cumdelta$barprice[n+1]=barindex$barhisto[n+1]=barindex$bardelta[n+1]=barindexn=n+1elsif histo < 0 thenif close < $priceClose[n] then$priceClose[n]=close$barprice[n]=barindexendifif histo < $histoClose[n] then$histoClose[n]=histo$barhisto[n]=barindexendifif cumdelta < $cumdeltaClose[n] then$cumdeltaClose[n]=cumdelta$bardelta[n]=barindexendifendif//--------------------------------------------------------//if n>1 then//----- Epuisement Up-------------------------------------------------//EpuisementCumdeltaUp = $cumdeltaClose[n]>$cumdeltaClose[n-1] and $priceClose[n]<$priceClose[n-1]//-----Divergence CumDelta & Price------------------------------------//if histo crosses over 0 and EpuisementCumdeltaUp thendrawarrowup(barindex,$cumdeltalow[n])coloured("lightgreen")drawsegment($bardelta[n-1],$cumdeltaLow[n-1],$bardelta[n],$cumdeltaLow[n])coloured("lightgreen")//-----Divergence Histogram-Price---------------------------------//elsif histo crosses over 0 and EpuisementCumdeltaUp thendrawarrowup(barindex,$cumdeltalow[n])coloured("yellow")drawsegment($bardelta[n-1],$cumdeltaLow[n-1],$bardelta[n],$cumdeltaLow[n])coloured("yellow")endifendif//////////////////////////////////////////////////////////////////////////////////////////////////////if histo crosses over 0 then //Bloc CVD Epuisement Down$priceClose[m+1]=close$histoClose[m+1]=histo$cumdeltaClose[m+1]=cumdelta$barprice[m+1]=barindex$barhisto[m+1]=barindex$bardelta[m+1]=barindexm=m+1elsif histo > 0 thenif close > $priceClose[m] then$priceClose[m]=close$barprice[m]=barindexendifif histo > $histoClose[m] then$histoClose[m]=histo$barhisto[m]=barindexendifif cumdelta > $cumdeltaClose[m] then$cumdeltaClose[m]=cumdelta$bardelta[m]=barindexendifendif//--------------------------------------------------------//if m>1 then//----- Epuisement Down------------------------------------------------//EpuisementCumdeltaDown = $cumdeltaClose[m]<$cumdeltaClose[m-1] and $priceClose[m]>$priceClose[m-1]//-----Divergence CumDelta & Price------------------------------------//if histo crosses under 0 and EpuisementCumdeltaDown thendrawarrowdown(barindex,$cumdeltahigh[m])coloured("lightgreen")drawsegment($bardelta[m-1],$cumdeltahigh[m-1],$bardelta[m],$cumdeltahigh[m])coloured("red")//-----Divergence Histogram-Price---------------------------------//elsif histo crosses under 0 and EpuisementCumdeltaDown thendrawarrowdown(barindex,$cumdeltahigh[m])coloured("yellow")drawsegment($bardelta[m-1],$cumdeltahigh[m-1],$bardelta[m],$cumdeltahigh[m])coloured("yellow")endifendif//////////////////////////////////////////////////////////////////////////////////////////////////////if histo crosses under histo[1] then //Bloc CVD Epuisement Up via Macd[12,26,9](close)(Macd Ligne moins Signal)$priceClose[p+1]=close$histoClose[p+1]=histo$cumdeltaClose[p+1]=cumdelta$barprice[p+1]=barindex$barhisto[p+1]=barindex$bardelta[p+1]=barindexp=p+1elsif histo < histo[1] thenif close < $priceClose[p] then$priceClose[p]=close$barprice[p]=barindexendifif histo < $histoClose[p] then$histoClose[p]=histo$barhisto[p]=barindexendifif cumdelta < $cumdeltaClose[p] then$cumdeltaClose[p]=cumdelta$bardelta[p]=barindexendifendif//--------------------------------------------------------//if p>1 then//----- Epuisement Up-------------------------------------------------//EpuisementCumdeltaUpM = $cumdeltaClose[p]>$cumdeltaClose[p-1] and $priceClose[p]<$priceClose[p-1]//-----Divergence CumDelta & Price------------------------------------//if histo crosses over histo[1] and EpuisementCumdeltaUpM thendrawarrowup(barindex,$cumdeltalow[p])coloured("green")drawsegment($bardelta[p-1],$cumdeltaLow[p-1],$bardelta[p],$cumdeltaLow[p])coloured("green")//-----Divergence Histogram-Price---------------------------------//elsif histo crosses over histo[1] and EpuisementCumdeltaUpM thendrawarrowup(barindex,$cumdeltalow[p])coloured("yellow")drawsegment($bardelta[p-1],$cumdeltaLow[p-1],$bardelta[p],$cumdeltaLow[p])coloured("yellow")endifendif//////////////////////////////////////////////////////////////////////////////////////////////////////if histo crosses over histo[1] then //Bloc CVD Epuisement Down via Macd[12,26,9](close)(Macd Ligne moins Signal)$priceClose[q+1]=close$histoClose[q+1]=histo$cumdeltaClose[q+1]=cumdelta$barprice[q+1]=barindex$barhisto[q+1]=barindex$bardelta[q+1]=barindexq=q+1elsif histo > histo[1] thenif close > $priceClose[q] then$priceClose[q]=close$barprice[q]=barindexendifif histo > $histoClose[q] then$histoClose[q]=histo$barhisto[q]=barindexendifif cumdelta > $cumdeltaClose[q] then$cumdeltaClose[q]=cumdelta$bardelta[q]=barindexendifendif//--------------------------------------------------------//if q>1 then//----- Epuisement Down------------------------------------------------//EpuisementCumdeltaDownM = $cumdeltaClose[q]<$cumdeltaClose[q-1] and $priceClose[q]>$priceClose[q-1]//-----Divergence CumDelta & Price------------------------------------//if histo crosses under histo[1] and EpuisementCumdeltaDownM thendrawarrowdown(barindex,$cumdeltahigh[q])coloured("green")drawsegment($bardelta[q-1],$cumdeltahigh[q-1],$bardelta[q],$cumdeltahigh[q])coloured("red")//-----Divergence Histogram-Price---------------------------------//elsif histo crosses under histo[1] and EpuisementCumdeltaDownM thendrawarrowdown(barindex,$cumdeltahigh[q])coloured("yellow")drawsegment($bardelta[q-1],$cumdeltahigh[q-1],$bardelta[q],$cumdeltahigh[q])coloured("yellow")endifendif////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////Return//////////////////////////////////////////////////////////////////////////////////////////////////////09/16/2024 at 3:14 PM #237633 -
AuthorPosts
Find exclusive trading pro-tools on