Epuisement via CVD Cumulative Volume Delta (Bis)
Forums › ProRealTime forum Français › Support ProBuilder › Epuisement via CVD Cumulative Volume Delta (Bis)
- This topic has 9 replies, 3 voices, and was last updated 3 months 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 #23763309/16/2024 at 10:10 PM #23765709/17/2024 at 1:16 PM #23770909/17/2024 at 2:15 PM #237711Dans la première liste, les tableaux $cumdeltaLow et $cumdeltaHigh sont définis sur les lignes 60 et 86 et éventuellement sur 77 et 103.
Ceux-ci sont ensuite utilisés dans les instructions DrawArrow qui définissent la position de la valeur « Y » pour les flèches.
Dans la deuxième liste, ces mêmes tableaux sont utilisés dans les instructions fléchées, mais ne semblent pas être définis ailleurs dans la liste.
C’est peut-être pour cela que les flèches ne sont pas à leur place.
Les noms des variables ont-ils été modifiés ?
1 user thanked author for this post.
09/17/2024 at 3:06 PM #237715Vous avez raison, ils manquaient des coordonnées ! Désormais les segments et les flèches s’affichent de nouveaux, mais un autre problème survient… Ils s’affichent n’importe comment…!!!
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409//"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////////////////////////////////////////////////////////////////////////////////////////////////////////Signal = 0////////////////////////////////////////////////////////////////////////////////////////////////////////Epuisemnts vi Cycle Macd//////////////////////////////////////////////////////////////////////////////////////////////////////if histo crosses under 0 then //Bloc CVD Epuisement Up via Macd$priceClose[n+1]=close$histoClose[n+1]=histo$cumdeltaClose[n+1]=cumdelta$cumdeltaLow[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")//Signal = 1//-----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 via Macd$priceClose[m+1]=close$histoClose[m+1]=histo$cumdeltaClose[m+1]=cumdelta$cumdeltaHigh[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("red")drawsegment($bardelta[m-1],$cumdeltahigh[m-1],$bardelta[m],$cumdeltahigh[m])coloured("red")//Signal = -1//-----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$cumdeltaLow[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("lightgreen")drawsegment($bardelta[p-1],$cumdeltaLow[p-1],$bardelta[p],$cumdeltaLow[p])coloured("lightgreen")//Signal = 1//-----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$cumdeltaHigh[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("red")drawsegment($bardelta[q-1],$cumdeltahigh[q-1],$bardelta[q],$cumdeltahigh[q])coloured("red")//Signal = -1//-----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////////////////////////////////////////////////////////////////////////////////////////////////////////Absorptions via Cycle Macd//////////////////////////////////////////////////////////////////////////////////////////////////////if histo crosses under 0 then //Bloc CVD Absorption Up via Macd$priceClose[a+1]=close$histoClose[a+1]=histo$cumdeltaClose[a+1]=cumdelta$cumdeltaLow[a+1]=cumdelta$barprice[a+1]=barindex$barhisto[a+1]=barindex$bardelta[a+1]=barindexa=a+1elsif histo < 0 thenif close < $priceClose[a] then$priceClose[a]=close$barprice[a]=barindexendifif histo < $histoClose[a] then$histoClose[a]=histo$barhisto[a]=barindexendifif cumdelta < $cumdeltaClose[a] then$cumdeltaClose[a]=cumdelta$bardelta[a]=barindexendifendif//--------------------------------------------------------//if a>1 then//----- Absorption Up-------------------------------------------------//AbsorptionCumdeltaUp = $cumdeltaClose[a]<$cumdeltaClose[a-1] and $priceClose[a]>$priceClose[a-1]//-----Divergence CumDelta & Price------------------------------------//if histo crosses over 0 and AbsorptionCumdeltaUp thendrawarrowup(barindex,$cumdeltalow[a])coloured("lightgreen")drawsegment($bardelta[a-1],$cumdeltaLow[a-1],$bardelta[a],$cumdeltaLow[a])coloured("lightgreen")//Signal = 1//-----Divergence Histogram-Price---------------------------------//elsif histo crosses over 0 and AbsorptionCumdeltaUp thendrawarrowup(barindex,$cumdeltalow[a])coloured("yellow")drawsegment($bardelta[a-1],$cumdeltaLow[a-1],$bardelta[a],$cumdeltaLow[a])coloured("yellow")endifendif//////////////////////////////////////////////////////////////////////////////////////////////////////if histo crosses over 0 then //Bloc CVD Absorption Down via Macd$priceClose[b+1]=close$histoClose[b+1]=histo$cumdeltaClose[b+1]=cumdelta$cumdeltaHigh[b+1]=cumdelta$barprice[b+1]=barindex$barhisto[b+1]=barindex$bardelta[b+1]=barindexb=b+1elsif histo > 0 thenif close > $priceClose[b] then$priceClose[b]=close$barprice[b]=barindexendifif histo > $histoClose[b] then$histoClose[b]=histo$barhisto[b]=barindexendifif cumdelta > $cumdeltaClose[b] then$cumdeltaClose[b]=cumdelta$bardelta[b]=barindexendifendif//--------------------------------------------------------//if b>1 then//----- Absorption Down------------------------------------------------//AbsorptionCumdeltaDown = $cumdeltaClose[b]>$cumdeltaClose[b-1] and $priceClose[b]<$priceClose[b-1]//-----Divergence CumDelta & Price------------------------------------//if histo crosses under 0 and AbsorptionCumdeltaDown thendrawarrowdown(barindex,$cumdeltahigh[b])coloured("red")drawsegment($bardelta[b-1],$cumdeltahigh[b-1],$bardelta[b],$cumdeltahigh[b])coloured("red")//Signal = -1//-----Divergence Histogram-Price---------------------------------//elsif histo crosses under 0 and AbsorptionCumdeltaDown thendrawarrowdown(barindex,$cumdeltahigh[b])coloured("yellow")drawsegment($bardelta[b-1],$cumdeltahigh[b-1],$bardelta[b],$cumdeltahigh[b])coloured("yellow")endifendif//////////////////////////////////////////////////////////////////////////////////////////////////////if histo crosses under histo[1] then //Bloc CVD Absorption Up via Macd[12,26,9](close)(Macd Ligne moins Signal)$priceClose[c+1]=close$histoClose[c+1]=histo$cumdeltaClose[c+1]=cumdelta$cumdeltaLow[c+1]=cumdelta$barprice[c+1]=barindex$barhisto[c+1]=barindex$bardelta[c+1]=barindexc=c+1elsif histo < histo[1] thenif close < $priceClose[c] then$priceClose[c]=close$barprice[c]=barindexendifif histo < $histoClose[c] then$histoClose[c]=histo$barhisto[c]=barindexendifif cumdelta < $cumdeltaClose[c] then$cumdeltaClose[c]=cumdelta$bardelta[c]=barindexendifendif//--------------------------------------------------------//if c>1 then//----- Absorption Up-------------------------------------------------//AbsorptionCumdeltaUpM = $cumdeltaClose[c]<$cumdeltaClose[c-1] and $priceClose[c]>$priceClose[c-1]//-----Divergence CumDelta & Price------------------------------------//if histo crosses over histo[1] and AbsorptionCumdeltaUpM thendrawarrowup(barindex,$cumdeltalow[c])coloured("lightgreen")drawsegment($bardelta[c-1],$cumdeltaLow[c-1],$bardelta[c],$cumdeltaLow[c])coloured("lightgreen")//Signal = 1//-----Divergence Histogram-Price---------------------------------//elsif histo crosses over histo[1] and AbsorptionCumdeltaUpM thendrawarrowup(barindex,$cumdeltalow[c])coloured("yellow")drawsegment($bardelta[c-1],$cumdeltaLow[c-1],$bardelta[c],$cumdeltaLow[c])coloured("yellow")endifendif//////////////////////////////////////////////////////////////////////////////////////////////////////if histo crosses over histo[1] then //Bloc CVD Absorption Down via Macd[12,26,9](close)(Macd Ligne moins Signal)$priceClose[d+1]=close$histoClose[d+1]=histo$cumdeltaClose[d+1]=cumdelta$cumdeltaHigh[d+1]=cumdelta$barprice[d+1]=barindex$barhisto[d+1]=barindex$bardelta[d+1]=barindexd=d+1elsif histo > histo[1] thenif close > $priceClose[d] then$priceClose[d]=close$barprice[d]=barindexendifif histo > $histoClose[d] then$histoClose[d]=histo$barhisto[d]=barindexendifif cumdelta > $cumdeltaClose[d] then$cumdeltaClose[d]=cumdelta$bardelta[d]=barindexendifendif//--------------------------------------------------------//if d>1 then//----- Absorption Down------------------------------------------------//AbsorptionCumdeltaDownM = $cumdeltaClose[d]>$cumdeltaClose[d-1] and $priceClose[d]<$priceClose[d-1]//-----Divergence CumDelta & Price------------------------------------//if histo crosses under histo[1] and AbsorptionCumdeltaDownM thendrawarrowdown(barindex,$cumdeltahigh[d])coloured("red")drawsegment($bardelta[d-1],$cumdeltahigh[d-1],$bardelta[d],$cumdeltahigh[d])coloured("red")//Signal = -1//-----Divergence Histogram-Price---------------------------------//elsif histo crosses under histo[1] and AbsorptionCumdeltaDownM thendrawarrowdown(barindex,$cumdeltahigh[d])coloured("yellow")drawsegment($bardelta[d-1],$cumdeltahigh[d-1],$bardelta[d],$cumdeltahigh[d])coloured("yellow")endifendif//////////////////////////////////////////////////////////////////////////////////////////////////////Return////////////////////////////////////////////////////////////////////////////////////////////////////// -
AuthorPosts
Find exclusive trading pro-tools on