Epuisement via CVD Cumulative Volume Delta (Bis)

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #237073 quote
    Alai-n
    Participant
    Veteran

    Je relance le sujet comme ceci, car impossible de le remonter dans la file depuis des semaines…

    #237094 quote
    Iván González
    Moderator
    Master

    Bonjour. 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.

    #237128 quote
    Alai-n
    Participant
    Veteran

    Bonjour Ivan, j’ai juste retouché les lignes 94, 98, 102… J’ai beaucoup de mal à reprendre ton code pour l’amener à terme!

    //"Absorption-Epuisement PriceCumDelta" Cycle via MACD
    //--------------------------------------------------------//
     
    //--------------------------------------------------------//
    //"Cumulative Delta" (by Nicolas/ProRealcode)
    //--------------------------------------------------------//
    //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
    r=255
    g=255
    b=255
    else
    hi =cumDelta[1]
    endif
    if close<=open then
    lo= cumDelta
    r=255
    g=0
    b=0
    else
    lo=cumDelta[1]
    endif
    drawcandle(cumDelta[1], hi, lo, cumDelta) coloured(r,g,b)
    endif
    //--------------------------------------------------------//
    //-----MACD-----------------------------------------------//
    fastema=average[12,1](close)
    slowema=average[26,1](close)
    mymacd=fastema-slowema
    signal=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]=barindex
    n=n+1
     
    elsif histo < 0 then
     
    if low < $pricelow[n] then
    $pricelow[n]=low
    $barprice[n]=barindex
    endif
    if histo < $histolow[n] then
    $histoLow[n]=histo
    $barhisto[n]=barindex
    endif
    if cumdelta < $cumdeltalow[n] then
    $cumdeltaLow[n]=cumdelta
    $bardelta[n]=barindex
    endif
    endif
    //--------------------------------------------------------//
    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]=barindex
    n=n+1
     
    elsif histo > 0 then
     
    if high > $pricehigh[n] then
    $pricehigh[n]=high
    $barprice[n]=barindex
    endif
    if histo > $histohigh[n] then
    $histoHigh[n]=histo
    $barhisto[n]=barindex
    endif
    if cumdelta > $cumdeltahigh[n] then
    $cumdeltahigh[n]=cumdelta
    $bardelta[n]=barindex
    endif
    endif
    //--------------------------------------------------------//
    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 then
    drawarrowup(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 then
    drawarrowup(barindex,$cumdeltalow[n])coloured("yellow")
    drawsegment($bardelta[n-1],$cumdeltaLow[n-1],$bardelta[n],$cumdeltaLow[n])coloured("yellow")
    endif
    endif
    //--------------------------------------------------------//
    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 then
    drawarrowdown(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 then
    drawarrowdown(barindex,$cumdeltahigh[n])coloured("yellow")
    drawsegment($bardelta[n-1],$cumdeltahigh[n-1],$bardelta[n],$cumdeltahigh[n])coloured("yellow")
    endif
    endif
     
    //--------------------------------------------------------//
    Return
    //--------------------------------------------------------/
    #237155 quote
    Iván González
    Moderator
    Master

    Bon, 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 lorsque histo crosses under 0

    Alai-n thanked this post
    #237338 quote
    Alai-n
    Participant
    Veteran

    Bonjour @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

    //"Absorption-Epuisement PriceCumDelta" Cycle via MACD
    //////////////////////////////////////////////////////////////////////////////////////////////////////
     
    //--------------------------------------------------------//
    //"Cumulative Delta-CVD" (by Nicolas/ProRealcode)
    //--------------------------------------------------------//
    //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
    r=255
    g=255
    b=255
    else
    hi =cumDelta[1]
    endif
    if close<=open then
    lo= cumDelta
    r=255
    g=0
    b=0
    else
    lo=cumDelta[1]
    endif
    drawcandle(cumDelta[1], hi, lo, cumDelta) coloured(r,g,b)
    endif
    //////////////////////////////////////////////////////////////////////////////////////////////////////
    //-----MACD-----------------------------------------------//
    fastema=average[12,1](close)
    slowema=average[26,1](close)
    mymacd=fastema-slowema
    signal=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]=barindex
    n=n+1
     
    elsif histo < 0 then
     
    if close < $priceClose[n] then
    $priceClose[n]=close
    $barprice[n]=barindex
    endif
    if histo < $histoClose[n] then
    $histoClose[n]=histo
    $barhisto[n]=barindex
    endif
    if cumdelta < $cumdeltaClose[n] then
    $cumdeltaClose[n]=cumdelta
    $bardelta[n]=barindex
    endif
    endif
    //--------------------------------------------------------//
    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 then
    drawarrowup(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 then
    drawarrowup(barindex,$cumdeltalow[n])coloured("yellow")
    drawsegment($bardelta[n-1],$cumdeltaLow[n-1],$bardelta[n],$cumdeltaLow[n])coloured("yellow")
    endif
    endif
    //////////////////////////////////////////////////////////////////////////////////////////////////////
    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]=barindex
    m=m+1
     
    elsif histo > 0 then
     
    if close > $priceClose[m] then
    $priceClose[m]=close
    $barprice[m]=barindex
    endif
    if histo > $histoClose[m] then
    $histoClose[m]=histo
    $barhisto[m]=barindex
    endif
    if cumdelta > $cumdeltaClose[m] then
    $cumdeltaClose[m]=cumdelta
    $bardelta[m]=barindex
    endif
    endif
    //--------------------------------------------------------//
    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 then
    drawarrowdown(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 then
    drawarrowdown(barindex,$cumdeltahigh[m])coloured("yellow")
    drawsegment($bardelta[m-1],$cumdeltahigh[m-1],$bardelta[m],$cumdeltahigh[m])coloured("yellow")
    endif
    endif
    //////////////////////////////////////////////////////////////////////////////////////////////////////
    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]=barindex
    p=p+1
     
    elsif histo < histo[1] then
     
    if close < $priceClose[p] then
    $priceClose[p]=close
    $barprice[p]=barindex
    endif
    if histo < $histoClose[p] then
    $histoClose[p]=histo
    $barhisto[p]=barindex
    endif
    if cumdelta < $cumdeltaClose[p] then
    $cumdeltaClose[p]=cumdelta
    $bardelta[p]=barindex
    endif
    endif
    //--------------------------------------------------------//
    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 then
    drawarrowup(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 then
    drawarrowup(barindex,$cumdeltalow[p])coloured("yellow")
    drawsegment($bardelta[p-1],$cumdeltaLow[p-1],$bardelta[p],$cumdeltaLow[p])coloured("yellow")
    endif
    endif
    //////////////////////////////////////////////////////////////////////////////////////////////////////
    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]=barindex
    q=q+1
     
    elsif histo > histo[1] then
     
    if close > $priceClose[q] then
    $priceClose[q]=close
    $barprice[q]=barindex
    endif
    if histo > $histoClose[q] then
    $histoClose[q]=histo
    $barhisto[q]=barindex
    endif
    if cumdelta > $cumdeltaClose[q] then
    $cumdeltaClose[q]=cumdelta
    $bardelta[q]=barindex
    endif
    endif
    //--------------------------------------------------------//
    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 then
    drawarrowdown(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 then
    drawarrowdown(barindex,$cumdeltahigh[q])coloured("yellow")
    drawsegment($bardelta[q-1],$cumdeltahigh[q-1],$bardelta[q],$cumdeltahigh[q])coloured("yellow")
    endif
    endif
    //////////////////////////////////////////////////////////////////////////////////////////////////////
    
    
    //////////////////////////////////////////////////////////////////////////////////////////////////////
    Return
    //////////////////////////////////////////////////////////////////////////////////////////////////////
    
    #237633 quote
    Alai-n
    Participant
    Veteran

    UP

    #237657 quote
    druby
    Participant
    New

    Où sont définis les tableaux utilisés dans les instructions drawArrow et drawSegment !

    #237709 quote
    Alai-n
    Participant
    Veteran

    Je ne suis pas sur de bien comprendre la question! Mais j’aurais tendance à répondre au début de chaque bloc… Par Ex pour le premier ligne 58 à 63.

    #237711 quote
    druby
    Participant
    New

    Dans 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 ?

    Alai-n thanked this post
    #237715 quote
    Alai-n
    Participant
    Veteran

    Vous 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…!!!

    //"Absorption-Epuisement PriceCumDelta" Cycle via MACD
    //////////////////////////////////////////////////////////////////////////////////////////////////////
     
    //--------------------------------------------------------//
    //"Cumulative Delta-CVD" (by Nicolas/ProRealcode)
    //--------------------------------------------------------//
    //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
    r=255
    g=255
    b=255
    else
    hi =cumDelta[1]
    endif
    if close<=open then
    lo= cumDelta
    r=255
    g=0
    b=0
    else
    lo=cumDelta[1]
    endif
    drawcandle(cumDelta[1], hi, lo, cumDelta) coloured(r,g,b)
    endif
    //////////////////////////////////////////////////////////////////////////////////////////////////////
    //-----MACD-----------------------------------------------//
    fastema=average[12,1](close)
    slowema=average[26,1](close)
    mymacd=fastema-slowema
    signal=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]=barindex
    n=n+1
     
    elsif histo < 0 then
     
    if close < $priceClose[n] then
    $priceClose[n]=close
    $barprice[n]=barindex
    endif
    if histo < $histoClose[n] then
    $histoClose[n]=histo
    $barhisto[n]=barindex
    endif
    if cumdelta < $cumdeltaClose[n] then
    $cumdeltaClose[n]=cumdelta
    $bardelta[n]=barindex
    endif
    endif
    //--------------------------------------------------------//
    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 then
    drawarrowup(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 then
    drawarrowup(barindex,$cumdeltalow[n])coloured("yellow")
    drawsegment($bardelta[n-1],$cumdeltaLow[n-1],$bardelta[n],$cumdeltaLow[n])coloured("yellow")
    endif
    endif
    //////////////////////////////////////////////////////////////////////////////////////////////////////
    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]=barindex
    m=m+1
     
    elsif histo > 0 then
     
    if close > $priceClose[m] then
    $priceClose[m]=close
    $barprice[m]=barindex
    endif
    if histo > $histoClose[m] then
    $histoClose[m]=histo
    $barhisto[m]=barindex
    endif
    if cumdelta > $cumdeltaClose[m] then
    $cumdeltaClose[m]=cumdelta
    $bardelta[m]=barindex
    endif
    endif
    //--------------------------------------------------------//
    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 then
    drawarrowdown(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 then
    drawarrowdown(barindex,$cumdeltahigh[m])coloured("yellow")
    drawsegment($bardelta[m-1],$cumdeltahigh[m-1],$bardelta[m],$cumdeltahigh[m])coloured("yellow")
    endif
    endif
    //////////////////////////////////////////////////////////////////////////////////////////////////////
    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]=barindex
    p=p+1
    
    elsif histo < histo[1] then
    
    if close < $priceClose[p] then
    $priceClose[p]=close
    $barprice[p]=barindex
    endif
    if histo < $histoClose[p] then
    $histoClose[p]=histo
    $barhisto[p]=barindex
    endif
    if cumdelta < $cumdeltaClose[p] then
    $cumdeltaClose[p]=cumdelta
    $bardelta[p]=barindex
    endif
    endif
    //--------------------------------------------------------//
    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 then
    drawarrowup(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 then
    drawarrowup(barindex,$cumdeltalow[p])coloured("yellow")
    drawsegment($bardelta[p-1],$cumdeltaLow[p-1],$bardelta[p],$cumdeltaLow[p])coloured("yellow")
    endif
    endif
    //////////////////////////////////////////////////////////////////////////////////////////////////////
    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]=barindex
    q=q+1
    
    elsif histo > histo[1] then
    
    if close > $priceClose[q] then
    $priceClose[q]=close
    $barprice[q]=barindex
    endif
    if histo > $histoClose[q] then
    $histoClose[q]=histo
    $barhisto[q]=barindex
    endif
    if cumdelta > $cumdeltaClose[q] then
    $cumdeltaClose[q]=cumdelta
    $bardelta[q]=barindex
    endif
    endif
    //--------------------------------------------------------//
    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 then
    drawarrowdown(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 then
    drawarrowdown(barindex,$cumdeltahigh[q])coloured("yellow")
    drawsegment($bardelta[q-1],$cumdeltahigh[q-1],$bardelta[q],$cumdeltahigh[q])coloured("yellow")
    endif
    endif
    //////////////////////////////////////////////////////////////////////////////////////////////////////
    //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]=barindex
    a=a+1
     
    elsif histo < 0 then
     
    if close < $priceClose[a] then
    $priceClose[a]=close
    $barprice[a]=barindex
    endif
    if histo < $histoClose[a] then
    $histoClose[a]=histo
    $barhisto[a]=barindex
    endif
    if cumdelta < $cumdeltaClose[a] then
    $cumdeltaClose[a]=cumdelta
    $bardelta[a]=barindex
    endif
    endif
    //--------------------------------------------------------//
    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 then
    drawarrowup(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 then
    drawarrowup(barindex,$cumdeltalow[a])coloured("yellow")
    drawsegment($bardelta[a-1],$cumdeltaLow[a-1],$bardelta[a],$cumdeltaLow[a])coloured("yellow")
    endif
    endif
    //////////////////////////////////////////////////////////////////////////////////////////////////////
    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]=barindex
    b=b+1
     
    elsif histo > 0 then
     
    if close > $priceClose[b] then
    $priceClose[b]=close
    $barprice[b]=barindex
    endif
    if histo > $histoClose[b] then
    $histoClose[b]=histo
    $barhisto[b]=barindex
    endif
    if cumdelta > $cumdeltaClose[b] then
    $cumdeltaClose[b]=cumdelta
    $bardelta[b]=barindex
    endif
    endif
    //--------------------------------------------------------//
    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 then
    drawarrowdown(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 then
    drawarrowdown(barindex,$cumdeltahigh[b])coloured("yellow")
    drawsegment($bardelta[b-1],$cumdeltahigh[b-1],$bardelta[b],$cumdeltahigh[b])coloured("yellow")
    endif
    endif
    //////////////////////////////////////////////////////////////////////////////////////////////////////
    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]=barindex
    c=c+1
    
    elsif histo < histo[1] then
    
    if close < $priceClose[c] then
    $priceClose[c]=close
    $barprice[c]=barindex
    endif
    if histo < $histoClose[c] then
    $histoClose[c]=histo
    $barhisto[c]=barindex
    endif
    if cumdelta < $cumdeltaClose[c] then
    $cumdeltaClose[c]=cumdelta
    $bardelta[c]=barindex
    endif
    endif
    //--------------------------------------------------------//
    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 then
    drawarrowup(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 then
    drawarrowup(barindex,$cumdeltalow[c])coloured("yellow")
    drawsegment($bardelta[c-1],$cumdeltaLow[c-1],$bardelta[c],$cumdeltaLow[c])coloured("yellow")
    endif
    endif
    //////////////////////////////////////////////////////////////////////////////////////////////////////
    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]=barindex
    d=d+1
    
    elsif histo > histo[1] then
    
    if close > $priceClose[d] then
    $priceClose[d]=close
    $barprice[d]=barindex
    endif
    if histo > $histoClose[d] then
    $histoClose[d]=histo
    $barhisto[d]=barindex
    endif
    if cumdelta > $cumdeltaClose[d] then
    $cumdeltaClose[d]=cumdelta
    $bardelta[d]=barindex
    endif
    endif
    //--------------------------------------------------------//
    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 then
    drawarrowdown(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 then
    drawarrowdown(barindex,$cumdeltahigh[d])coloured("yellow")
    drawsegment($bardelta[d-1],$cumdeltahigh[d-1],$bardelta[d],$cumdeltahigh[d])coloured("yellow")
    endif
    endif
    
    
    //////////////////////////////////////////////////////////////////////////////////////////////////////
    Return
    //////////////////////////////////////////////////////////////////////////////////////////////////////
    
Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.

Epuisement via CVD Cumulative Volume Delta (Bis)


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Alai-n @alai-n Participant
Summary

This topic contains 9 replies,
has 3 voices, and was last updated by Alai-n
1 year, 4 months ago.

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