Comptage pour distribution

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #188017 quote
    Antoine
    Participant
    Average

    Bonjour à tous,

    Je suis actuellement bloqué sur mon programme

    En effet je pense que mon code est faux, le but de ce programme est de faire une distribution par niveau (0 à 12) de mon nuage de points, avec une clôture du prix positive.

    Le bout de programme qui est faux commence à partir de la ligne 898.

    Merci par avance de votre aide

    DEFPARAM DRAWONLASTBARONLY=true
    
    TIMEFRAME(1 HOUR)
    K4a=Stochastic[PERIODEK,VITESSEK](close)
    D4a=average[PERIODED](K4a)
    
    K4a1=Stochastic[PERIODEK1,VITESSEK1](close)
    D4a1=average[PERIODED1](K4a1)
    
    K4a2=Stochastic[PERIODEK2,VITESSEK2](close)
    D4a2=average[PERIODED2](K4a2)
    /////////////////////////////////////////////////////
    If K4a[0]<50 Then
    BaisseA=1
    Else
    BaisseA=0
    Endif
    
    If K4a[0]>50 Then
    HausseA=1
    Else
    HausseA=0
    Endif
    
    ///rouge
    IF ( D4a[0]<65 AND D4a[0]<D4a[1] and K4a[0]<D4a[0] and K4a[0]<30 and K4a[0]<K4a[1]) THEN
    X1A=-1
    Else
    X1A=0
    endif
    
    IF (D4a[0]<55 and K4a[0]<D4a[0] and D4a[0]<D4a[1]) THEN
    X2A=-1
    Else
    X2A=0
    endif
    
    IF (D4a[0]<20) THEN
    X3A=-1
    Else
    X3A=0
    endif
    
    ////vert
    IF (D4a[0]>35 AND D4a[0]>D4a[1] and K4a[0]>D4a[0] and K4a[0]>70 and K4a[0]>K4a[1]) THEN
    X4A=1
    Else
    X4A=0
    endif
    
    IF (D4a[0]>55 and K4a[0]>D4a[0] and D4a[0]>D4a[1]) THEN
    X5A=1
    Else
    X5A=0
    endif
    
    IF (D4a[0]>80) THEN
    X6A=1
    Else
    X6A=0
    endif
    
    ////////////////////////Si Baisse
    IF (X1A+X2A+X3A)<0 Then
    A=-1
    Endif
    
    ////////////////////////Si Hausse
    IF (X4A+X5A+X6A)>0 Then
    A=1
    Endif
    
    /////////////////////////Si neutre dans de la baisse
    IF (X1A+X2A+X3A)=0 and BaisseA=1 Then
    A=0
    Endif
    
    /////////////////////////Si neutre dans de la hausse
    IF (X4A+X5A+X6A)=0 and HausseA=1 Then
    A=0
    Endif
    
    ///////////////////////////////////////////////////////////////////////////////////////////////////////
    If K4a1[0]<50 Then
    Baisse1A=1
    Else
    Baisse1A=0
    Endif
    
    If K4a1[0]>50 Then
    Hausse1A=1
    Else
    Hausse1A=0
    Endif
    
    ///rouge
    IF ( D4a1[0]<65 AND D4a1[0]<D4a1[1] and K4a1[0]<D4a1[0] and K4a1[0]<30 and K4a1[0]<K4a1[1]) THEN
    X11A=-1
    Else
    X11A=0
    endif
    
    IF (D4a1[0]<55 and K4a1[0]<D4a1[0] and D4a1[0]<D4a1[1]) THEN
    X21A=-1
    Else
    X21A=0
    endif
    
    IF (D4a1[0]<20) THEN
    X31A=-1
    Else
    X31A=0
    endif
    
    ////vert
    IF (D4a1[0]>35 AND D4a1[0]>D4a1[1] and K4a1[0]>D4a1[0] and K4a1[0]>70 and K4a1[0]>K4a1[1]) THEN
    X41A=1
    Else
    X41A=0
    endif
    
    IF (D4a1[0]>55 and K4a1[0]>D4a1[0] and D4a1[0]>D4a1[1]) THEN
    X51A=1
    Else
    X51A=0
    endif
    
    IF (D4a1[0]>80) THEN
    X61A=1
    Else
    X61A=0
    endif
    
    ////////////////////////Si Baisse
    IF (X11A+X21A+X31A)<0 Then
    A1=-1
    Endif
    
    ////////////////////////Si Hausse
    IF (X41A+X51A+X61A)>0 Then
    A1=1
    Endif
    
    /////////////////////////Si neutre dans de la baisse
    IF (X11A+X21A+X31A)=0 and Baisse1A=1 Then
    A1=0
    Endif
    
    /////////////////////////Si neutre dans de la hausse
    IF (X41A+X51A+X61A)=0 and Hausse1A=1 Then
    A1=0
    Endif
    ////////////////////////////////////////////////////////////////////////////////////
    
    If K4a2[0]<50 Then
    Baisse2A=1
    Else
    Baisse2A=0
    Endif
    
    If K4a2[0]>50 Then
    Hausse2A=1
    Else
    Hausse2A=0
    Endif
    
    ///rouge
    IF ( D4a2[0]<65 AND D4a2[0]<D4a2[1] and K4a2[0]<D4a2[0] and K4a2[0]<30 and K4a2[0]<K4a2[1]) THEN
    X12A=-1
    Else
    X12A=0
    endif
    
    IF (D4a2[0]<55 and K4a2[0]<D4a2[0] and D4a2[0]<D4a2[1]) THEN
    X22A=-1
    Else
    X22A=0
    endif
    
    IF (D4a2[0]<20) THEN
    X32A=-1
    Else
    X32A=0
    endif
    
    ////vert
    IF (D4a2[0]>35 AND D4a2[0]>D4a2[1] and K4a2[0]>D4a2[0] and K4a2[0]>70 and K4a2[0]>K4a2[1]) THEN
    X42A=1
    Else
    X42A=0
    endif
    
    IF (D4a2[0]>55 and K4a2[0]>D4a2[0] and D4a2[0]>D4a2[1]) THEN
    X52A=1
    Else
    X52A=0
    endif
    
    IF (D4a2[0]>80) THEN
    X62A=1
    Else
    X62A=0
    endif
    
    ////////////////////////Si Baisse
    IF (X12A+X22A+X32A)<0 Then
    A2=-1
    Endif
    
    ////////////////////////Si Hausse
    IF (X42A+X52A+X62A)>0 Then
    A2=1
    Endif
    
    /////////////////////////Si neutre dans de la baisse
    IF (X12A+X22A+X32A)=0 and Baisse2A=1 Then
    A2=0
    Endif
    
    /////////////////////////Si neutre dans de la hausse
    IF (X42A+X52A+X62A)=0 and Hausse2A=1 Then
    A2=0
    Endif
    
    TIMEFRAME(2 HOUR)
    
    K4b=Stochastic[PERIODEK,VITESSEK](close)
    D4b=average[PERIODED](K4b)
    
    K4b1=Stochastic[PERIODEK1,VITESSEK1](close)
    D4b1=average[PERIODED1](K4b1)
    
    K4b2=Stochastic[PERIODEK2,VITESSEK2](close)
    D4b2=average[PERIODED2](K4b2)
    /////////////////////////////////////////////////////
    If K4B[0]<50 Then
    BaisseB=1
    Else
    BaisseB=0
    Endif
    
    If K4B[0]>50 Then
    HausseB=1
    Else
    HausseB=0
    Endif
    
    ///rouge
    IF ( D4b[0]<65 AND D4b[0]<D4b[1] and K4b[0]<D4b[0] and K4b[0]<30 and K4b[0]<K4b[1]) THEN
    X1B=-1
    Else
    X1B=0
    endif
    
    IF (D4b[0]<55 and K4b[0]<D4b[0] and D4b[0]<D4b[1]) THEN
    X2B=-1
    Else
    X2B=0
    endif
    
    IF (D4b[0]<20) THEN
    X3B=-1
    Else
    X3B=0
    endif
    
    ////vert
    IF (D4b[0]>35 AND D4b[0]>D4b[1] and K4b[0]>D4b[0] and K4b[0]>70 and K4b[0]>K4b[1]) THEN
    X4B=1
    Else
    X4B=0
    endif
    
    IF (D4b[0]>55 and K4b[0]>D4b[0] and D4b[0]>D4b[1]) THEN
    X5B=1
    Else
    X5B=0
    endif
    
    IF (D4b[0]>80) THEN
    X6B=1
    Else
    X6B=0
    endif
    
    ////////////////////////Si Baisse
    IF (X1B+X2B+X3B)<0 Then
    B=-1
    Endif
    
    ////////////////////////Si Hausse
    IF (X4B+X5B+X6B)>0 Then
    B=1
    Endif
    
    /////////////////////////Si neutre dans de la baisse
    IF (X1B+X2B+X3B)=0 and BaisseB=1 Then
    B=0
    Endif
    
    /////////////////////////Si neutre dans de la hausse
    IF (X4B+X5B+X6B)=0 and HausseB=1 Then
    B=0
    Endif
    
    ///////////////////////////////////////////////////////////////////////////////////////////////////////
    If K4b1[0]<50 Then
    Baisse1B=1
    Else
    Baisse1B=0
    Endif
    
    If K4b1[0]>50 Then
    Hausse1B=1
    Else
    Hausse1B=0
    Endif
    
    ///rouge
    IF ( D4b1[0]<65 AND D4b1[0]<D4b1[1] and K4b1[0]<D4b1[0] and K4b1[0]<30 and K4b1[0]<K4b1[1]) THEN
    X11B=-1
    Else
    X11B=0
    endif
    
    IF (D4b1[0]<55 and K4b1[0]<D4b1[0] and D4b1[0]<D4b1[1]) THEN
    X21B=-1
    Else
    X21B=0
    endif
    
    IF (D4b1[0]<20) THEN
    X31B=-1
    Else
    X31B=0
    endif
    
    ////vert
    IF (D4b1[0]>35 AND D4b1[0]>D4b1[1] and K4b1[0]>D4b1[0] and K4b1[0]>70 and K4b1[0]>K4b1[1]) THEN
    X41B=1
    Else
    X41B=0
    endif
    
    IF (D4b1[0]>55 and K4b1[0]>D4b1[0] and D4b1[0]>D4b1[1]) THEN
    X51B=1
    Else
    X51B=0
    endif
    
    IF (D4b1[0]>80) THEN
    X61B=1
    Else
    X61B=0
    endif
    
    ////////////////////////Si Baisse
    IF (X11B+X21B+X31B)<0 Then
    B1=-1
    Endif
    
    ////////////////////////Si Hausse
    IF (X41B+X51B+X61B)>0 Then
    B1=1
    Endif
    
    /////////////////////////Si neutre dans de la baisse
    IF (X11B+X21B+X31B)=0 and Baisse1B=1 Then
    B1=0
    Endif
    
    /////////////////////////Si neutre dans de la hausse
    IF (X41B+X51B+X61B)=0 and Hausse1B=1 Then
    B1=0
    Endif
    ////////////////////////////////////////////////////////////////////////////////////
    
    If K4b2[0]<50 Then
    Baisse2B=1
    Else
    Baisse2B=0
    Endif
    
    If K4b2[0]>50 Then
    Hausse2B=1
    Else
    Hausse2B=0
    Endif
    
    ///rouge
    IF ( D4b2[0]<65 AND D4b2[0]<D4b2[1] and K4b2[0]<D4b2[0] and K4b2[0]<30 and K4b2[0]<K4b2[1]) THEN
    X12B=-1
    Else
    X12B=0
    endif
    
    IF (D4b2[0]<55 and K4b2[0]<D4b2[0] and D4b2[0]<D4b2[1]) THEN
    X22B=-1
    Else
    X22B=0
    endif
    
    IF (D4b2[0]<20) THEN
    X32B=-1
    Else
    X32B=0
    endif
    
    ////vert
    IF (D4b2[0]>35 AND D4b2[0]>D4b2[1] and K4b2[0]>D4b2[0] and K4b2[0]>70 and K4b2[0]>K4b2[1]) THEN
    X42B=1
    Else
    X42B=0
    endif
    
    IF (D4b2[0]>55 and K4b2[0]>D4b2[0] and D4b2[0]>D4b2[1]) THEN
    X52B=1
    Else
    X52B=0
    endif
    
    IF (D4b2[0]>80) THEN
    X62B=1
    Else
    X62B=0
    endif
    
    ////////////////////////Si Baisse
    IF (X12B+X22B+X32B)<0 Then
    B2=-1
    Endif
    
    ////////////////////////Si Hausse
    IF (X42B+X52B+X62B)>0 Then
    B2=1
    Endif
    
    /////////////////////////Si neutre dans de la baisse
    IF (X12B+X22B+X32B)=0 and Baisse2B=1 Then
    B2=0
    Endif
    
    /////////////////////////Si neutre dans de la hausse
    IF (X42B+X52B+X62B)=0 and Hausse2B=1 Then
    B2=0
    Endif
    
    TIMEFRAME(4 HOUR)
    K4Q=Stochastic[PERIODEK,VITESSEK](close)
    D4Q=average[PERIODED](K4Q)
    
    K4Q1=Stochastic[PERIODEK1,VITESSEK1](close)
    D4Q1=average[PERIODED1](K4Q1)
    
    K4Q2=Stochastic[PERIODEK2,VITESSEK2](close)
    D4Q2=average[PERIODED2](K4Q2)
    /////////////////////////////////////////////////////
    If K4Q[0]<50 Then
    BaisseQ=1
    Else
    BaisseQ=0
    Endif
    
    If K4Q[0]>50 Then
    HausseQ=1
    Else
    HausseQ=0
    Endif
    
    ///rouge
    IF ( D4Q[0]<65 AND D4Q[0]<D4Q[1] and K4Q[0]<D4Q[0] and K4Q[0]<30 and K4Q[0]<K4Q[1]) THEN
    X1Q=-1
    Else
    X1Q=0
    endif
    
    IF (D4Q[0]<55 and K4Q[0]<D4Q[0] and D4Q[0]<D4Q[1]) THEN
    X2Q=-1
    Else
    X2Q=0
    endif
    
    IF (D4Q[0]<20) THEN
    X3Q=-1
    Else
    X3Q=0
    endif
    
    ////vert
    IF (D4Q[0]>35 AND D4Q[0]>D4Q[1] and K4Q[0]>D4Q[0] and K4Q[0]>70 and K4Q[0]>K4Q[1]) THEN
    X4Q=1
    Else
    X4Q=0
    endif
    
    IF (D4Q[0]>55 and K4Q[0]>D4Q[0] and D4Q[0]>D4Q[1]) THEN
    X5Q=1
    Else
    X5Q=0
    endif
    
    IF (D4Q[0]>80) THEN
    X6Q=1
    Else
    X6Q=0
    endif
    
    ////////////////////////Si Baisse
    IF (X1Q+X2Q+X3Q)<0 Then
    Q=-1
    Endif
    
    ////////////////////////Si Hausse
    IF (X4Q+X5Q+X6Q)>0 Then
    Q=1
    Endif
    
    /////////////////////////Si neutre dans de la Qaisse
    IF (X1Q+X2Q+X3Q)=0 and BaisseQ=1 Then
    Q=0
    Endif
    
    /////////////////////////Si neutre dans de la hausse
    IF (X4Q+X5Q+X6Q)=0 and HausseQ=1 Then
    Q=0
    Endif
    
    ///////////////////////////////////////////////////////////////////////////////////////////////////////
    If K4Q1[0]<50 Then
    Baisse1Q=1
    Else
    Baisse1Q=0
    Endif
    
    If K4Q1[0]>50 Then
    Hausse1Q=1
    Else
    Hausse1Q=0
    Endif
    
    ///rouge
    IF ( D4Q1[0]<65 AND D4Q1[0]<D4Q1[1] and K4Q1[0]<D4Q1[0] and K4Q1[0]<30 and K4Q1[0]<K4Q1[1]) THEN
    X11Q=-1
    Else
    X11Q=0
    endif
    
    IF (D4Q1[0]<55 and K4Q1[0]<D4Q1[0] and D4Q1[0]<D4Q1[1]) THEN
    X21Q=-1
    Else
    X21Q=0
    endif
    
    IF (D4Q1[0]<20) THEN
    X31Q=-1
    Else
    X31Q=0
    endif
    
    ////vert
    IF (D4Q1[0]>35 AND D4Q1[0]>D4Q1[1] and K4Q1[0]>D4Q1[0] and K4Q1[0]>70 and K4Q1[0]>K4Q1[1]) THEN
    X41Q=1
    Else
    X41Q=0
    endif
    
    IF (D4Q1[0]>55 and K4Q1[0]>D4Q1[0] and D4Q1[0]>D4Q1[1]) THEN
    X51Q=1
    Else
    X51Q=0
    endif
    
    IF (D4Q1[0]>80) THEN
    X61Q=1
    Else
    X61Q=0
    endif
    
    ////////////////////////Si Baisse
    IF (X11Q+X21Q+X31Q)<0 Then
    Q1=-1
    Endif
    
    ////////////////////////Si Hausse
    IF (X41Q+X51Q+X61Q)>0 Then
    Q1=1
    Endif
    
    /////////////////////////Si neutre dans de la Baisse
    IF (X11Q+X21Q+X31Q)=0 and Baisse1Q=1 Then
    Q1=0
    Endif
    
    /////////////////////////Si neutre dans de la hausse
    IF (X41Q+X51Q+X61Q)=0 and Hausse1Q=1 Then
    Q1=0
    Endif
    ////////////////////////////////////////////////////////////////////////////////////
    
    If K4Q2[0]<50 Then
    Baisse2Q=1
    Else
    Baisse2Q=0
    Endif
    
    If K4Q2[0]>50 Then
    Hausse2Q=1
    Else
    Hausse2Q=0
    Endif
    
    ///rouge
    IF ( D4Q2[0]<65 AND D4Q2[0]<D4Q2[1] and K4Q2[0]<D4Q2[0] and K4Q2[0]<30 and K4Q2[0]<K4Q2[1]) THEN
    X12Q=-1
    Else
    X12Q=0
    endif
    
    IF (D4Q2[0]<55 and K4Q2[0]<D4Q2[0] and D4Q2[0]<D4Q2[1]) THEN
    X22Q=-1
    Else
    X22Q=0
    endif
    
    IF (D4Q2[0]<20) THEN
    X32Q=-1
    Else
    X32Q=0
    endif
    
    ////vert
    IF (D4Q2[0]>35 AND D4Q2[0]>D4Q2[1] and K4Q2[0]>D4Q2[0] and K4Q2[0]>70 and K4Q2[0]>K4Q2[1]) THEN
    X42Q=1
    Else
    X42Q=0
    endif
    
    IF (D4Q2[0]>55 and K4Q2[0]>D4Q2[0] and D4Q2[0]>D4Q2[1]) THEN
    X52Q=1
    Else
    X52Q=0
    endif
    
    IF (D4Q2[0]>80) THEN
    X62Q=1
    Else
    X62Q=0
    endif
    
    ////////////////////////Si Baisse
    IF (X12Q+X22Q+X32Q)<0 Then
    Q2=-1
    Endif
    
    ////////////////////////Si Hausse
    IF (X42Q+X52Q+X62Q)>0 Then
    Q2=1
    Endif
    
    /////////////////////////Si neutre dans de la Baisse
    IF (X12Q+X22Q+X32Q)=0 and Baisse2Q=1 Then
    Q2=0
    Endif
    
    /////////////////////////Si neutre dans de la hausse
    IF (X42Q+X52Q+X62Q)=0 and Hausse2Q=1 Then
    Q2=0
    Endif
    
    TIMEFRAME(30 minutes)
    
    K4W=Stochastic[PERIODEK,VITESSEK](close)
    D4W=average[PERIODED](K4W)
    
    K4W1=Stochastic[PERIODEK1,VITESSEK1](close)
    D4W1=average[PERIODED1](K4W1)
    
    K4W2=Stochastic[PERIODEK2,VITESSEK2](close)
    D4W2=average[PERIODED2](K4W2)
    /////////////////////////////////////////////////////
    If K4W[0]<50 Then
    BaisseW=1
    Else
    BaisseW=0
    Endif
    
    If K4W[0]>50 Then
    HausseW=1
    Else
    HausseW=0
    Endif
    
    ///rouge
    IF ( D4W[0]<65 AND D4W[0]<D4W[1] and K4W[0]<D4W[0] and K4W[0]<30 and K4W[0]<K4W[1]) THEN
    X1W=-1
    Else
    X1W=0
    endif
    
    IF (D4W[0]<55 and K4W[0]<D4W[0] and D4W[0]<D4W[1]) THEN
    X2W=-1
    Else
    X2W=0
    endif
    
    IF (D4W[0]<20) THEN
    X3W=-1
    Else
    X3W=0
    endif
    
    ////vert
    IF (D4W[0]>35 AND D4W[0]>D4W[1] and K4W[0]>D4W[0] and K4W[0]>70 and K4W[0]>K4W[1]) THEN
    X4W=1
    Else
    X4W=0
    endif
    
    IF (D4W[0]>55 and K4W[0]>D4W[0] and D4W[0]>D4W[1]) THEN
    X5W=1
    Else
    X5W=0
    endif
    
    IF (D4W[0]>80) THEN
    X6W=1
    Else
    X6W=0
    endif
    
    ////////////////////////Si Baisse
    IF (X1W+X2W+X3W)<0 Then
    W=-1
    Endif
    
    ////////////////////////Si Hausse
    IF (X4W+X5W+X6W)>0 Then
    W=1
    Endif
    
    /////////////////////////Si neutre dans de la Waisse
    IF (X1W+X2W+X3W)=0 and BaisseW=1 Then
    W=0
    Endif
    
    /////////////////////////Si neutre dans de la hausse
    IF (X4W+X5W+X6W)=0 and HausseW=1 Then
    W=0
    Endif
    
    ///////////////////////////////////////////////////////////////////////////////////////////////////////
    If K4W1[0]<50 Then
    Baisse1W=1
    Else
    Baisse1W=0
    Endif
    
    If K4W1[0]>50 Then
    Hausse1W=1
    Else
    Hausse1W=0
    Endif
    
    ///rouge
    IF ( D4W1[0]<65 AND D4W1[0]<D4W1[1] and K4W1[0]<D4W1[0] and K4W1[0]<30 and K4W1[0]<K4W1[1]) THEN
    X11W=-1
    Else
    X11W=0
    endif
    
    IF (D4W1[0]<55 and K4W1[0]<D4W1[0] and D4W1[0]<D4W1[1]) THEN
    X21W=-1
    Else
    X21W=0
    endif
    
    IF (D4W1[0]<20) THEN
    X31W=-1
    Else
    X31W=0
    endif
    
    ////vert
    IF (D4W1[0]>35 AND D4W1[0]>D4W1[1] and K4W1[0]>D4W1[0] and K4W1[0]>70 and K4W1[0]>K4W1[1]) THEN
    X41W=1
    Else
    X41W=0
    endif
    
    IF (D4W1[0]>55 and K4W1[0]>D4W1[0] and D4W1[0]>D4W1[1]) THEN
    X51W=1
    Else
    X51W=0
    endif
    
    IF (D4W1[0]>80) THEN
    X61W=1
    Else
    X61W=0
    endif
    
    ////////////////////////Si Baisse
    IF (X11W+X21W+X31W)<0 Then
    W1=-1
    Endif
    
    ////////////////////////Si Hausse
    IF (X41W+X51W+X61W)>0 Then
    W1=1
    Endif
    
    /////////////////////////Si neutre dans de la Waisse
    IF (X11W+X21W+X31W)=0 and Baisse1W=1 Then
    W1=0
    Endif
    
    /////////////////////////Si neutre dans de la hausse
    IF (X41W+X51W+X61W)=0 and Hausse1W=1 Then
    W1=0
    Endif
    ////////////////////////////////////////////////////////////////////////////////////
    
    If K4W2[0]<50 Then
    Baisse2W=1
    Else
    Baisse2W=0
    Endif
    
    If K4W2[0]>50 Then
    Hausse2W=1
    Else
    Hausse2W=0
    Endif
    
    ///rouge
    IF ( D4W2[0]<65 AND D4W2[0]<D4W2[1] and K4W2[0]<D4W2[0] and K4W2[0]<30 and K4W2[0]<K4W2[1]) THEN
    X12W=-1
    Else
    X12W=0
    endif
    
    IF (D4W2[0]<55 and K4W2[0]<D4W2[0] and D4W2[0]<D4W2[1]) THEN
    X22W=-1
    Else
    X22W=0
    endif
    
    IF (D4W2[0]<20) THEN
    X32W=-1
    Else
    X32W=0
    endif
    
    ////vert
    IF (D4W2[0]>35 AND D4W2[0]>D4W2[1] and K4W2[0]>D4W2[0] and K4W2[0]>70 and K4W2[0]>K4W2[1]) THEN
    X42W=1
    Else
    X42W=0
    endif
    
    IF (D4W2[0]>55 and K4W2[0]>D4W2[0] and D4W2[0]>D4W2[1]) THEN
    X52W=1
    Else
    X52W=0
    endif
    
    IF (D4W2[0]>80) THEN
    X62W=1
    Else
    X62W=0
    endif
    
    ////////////////////////Si Baisse
    IF (X12W+X22W+X32W)<0 Then
    W2=-1
    Endif
    
    ////////////////////////Si Hausse
    IF (X42W+X52W+X62W)>0 Then
    W2=1
    Endif
    
    /////////////////////////Si neutre dans de la Waisse
    IF (X12W+X22W+X32W)=0 and Baisse2W=1 Then
    W2=0
    Endif
    
    /////////////////////////Si neutre dans de la hausse
    IF (X42W+X52W+X62W)=0 and Hausse2W=1 Then
    W2=0
    Endif
     
    timeFrame(default)
    
    COMPTAGE=A+A1+A2+B+B1+B2+Q+Q1+Q2+W+W1+W2
    
    
    ///////////////////////////////////////////////////////////////GAUSSIENNE
    
    maxcount=0
    For i=0 to 0
    count=0
    For i1=0 to PDONNEES
    If Close[i1]>Open[i1] and Comptage[i1]=0 Then
    count=count+1
    Endif
    Next
    maxcount=max(maxcount,count)
    Next
    
    For i2=1 to 1
    count1=0
    For i3=0 to PDONNEES
    If Close[i3]>Open[i3] and Comptage[i3]=0 Then
    count1=count1+1
    Endif
    Next
    maxcount1=max(maxcount1,count1)
    Next
    
    For i4=2 to 2
    count2=0
    For i5=0 to PDONNEES
    If Close[i5]>Open[i5] and Comptage[i5]=0 Then
    count2=count2+1
    Endif
    Next
    maxcount2=max(maxcount2,count2)
    Next
    
    For i6=3 to 3
    count3=0
    For i7=0 to PDONNEES
    If Close[i7]>Open[i7] and Comptage[i7]=0 Then
    count3=count3+1
    Endif
    Next
    maxcount3=max(maxcount3,count3)
    Next
    
    For i8=4 to 4
    count4=0
    For i9=0 to PDONNEES
    If Close[i9]>Open[i9] and Comptage[i9]=0 Then
    count4=count4+1
    Endif
    Next
    maxcount4=max(maxcount4,count4)
    Next
    
    For i10=5 to 5
    count5=0
    For i11=0 to PDONNEES
    If Close[i11]>Open[i11] and Comptage[i11]=0 Then
    count5=count5+1
    Endif
    Next
    maxcount5=max(maxcount5,count5)
    Next
    
    For i12=6 to 6
    count6=0
    For i13=0 to PDONNEES
    If Close[i13]>Open[i13] and Comptage[i13]=0 Then
    count6=count6+1
    Endif
    Next
    maxcount6=max(maxcount6,count6)
    Next
    
    For i14=7 to 7
    count7=0
    For i15=0 to PDONNEES
    If Close[i15]>Open[i15] and Comptage[i15]=0 Then
    count7=count7+1
    Endif
    Next
    maxcount7=max(maxcount7,count7)
    Next
    
    For i16=8 to 8
    count8=0
    For i17=0 to PDONNEES
    If Close[i17]>Open[i17] and Comptage[i17]=0 Then
    count8=count8+1
    Endif
    Next
    maxcount8=max(maxcount8,count8)
    Next
    
    For i18=9 to 9
    count9=0
    For i19=0 to PDONNEES
    If Close[i19]>Open[i19] and Comptage[i19]=0 Then
    count9=count9+1
    Endif
    Next
    maxcount9=max(maxcount9,count9)
    Next
    
    For i20=10 to 10
    count10=0
    For i21=0 to PDONNEES
    If Close[i21]>Open[i21] and Comptage[i21]=0 Then
    count10=count10+1
    Endif
    Next
    maxcount10=max(maxcount10,count10)
    Next
    
    For i22=11 to 11
    count11=0
    For i23=0 to PDONNEES
    If Close[i23]>Open[i23] and Comptage[i23]=0 Then
    count11=count11+1
    Endif
    Next
    maxcount11=max(maxcount11,count11)
    Next
    
    For i24=12 to 12
    count12=0
    For i25=0 to PDONNEES
    If Close[i25]>Open[i25] and Comptage[i25]=0 Then
    count12=count12+1
    Endif
    Next
    maxcount12=max(maxcount12,count12)
    Next
    
    drawtext("#maxcount#",barindex+10,0,dialog,bold,20)
    drawtext("#maxcount1#",barindex+10,1,dialog,bold,20)
    drawtext("#maxcount2#",barindex+10,2,dialog,bold,20)
    drawtext("#maxcount3#",barindex+10,3,dialog,bold,20)
    drawtext("#maxcount4#",barindex+10,4,dialog,bold,20)
    drawtext("#maxcount5#",barindex+10,5,dialog,bold,20)
    drawtext("#maxcount6#",barindex+10,6,dialog,bold,20)
    drawtext("#maxcount7#",barindex+10,7,dialog,bold,20)
    drawtext("#maxcount8#",barindex+10,8,dialog,bold,20)
    drawtext("#maxcount9#",barindex+10,9,dialog,bold,20)
    drawtext("#maxcount10#",barindex+10,10,dialog,bold,20)
    drawtext("#maxcount11#",barindex+10,11,dialog,bold,20)
    drawtext("#maxcount12#",barindex+10,12,dialog,bold,20)
    
    Return COMPTAGE as "COMPTAGE HEAT MAP"
    
    MAGIC-STOCHASTIC-V2-1.itf
    #188157 quote
    Antoine
    Participant
    Average

    Bonjour à tous, je pense avoir un code qui se rapproche de quelque chose, mais ca ne marche toujours pas . J’ai un message d’erreur “Une valeur entiere est attendue pour niveau”.

    Le code à modifier commence à partir de la ligne 898, j’ai joint le fichier ITF

    Pouvez-vous m’aider ?

    ///////////////////////////////////////////////////////////////GAUSSIENNE
    
    for i = 0 to 12
    If comptage = i and close>open then
    $niveau[i] = $niveau[i]+1
    maxval = max(maxval,$niveau[i])
    break
    endif
    next
    
    if islastbarupdate then
    for i = 0 to 12
    thisperc = round(($niveau[i]/maxval)*100)
    if comptage = i then
    drawpoint(barindex+thisperc+5,i,3) coloured(0,0,255)
    drawtext("#thisperc#%",barindex+115,i,sansserif,bold,14) coloured(0,0,128)
    endif
    drawrectangle(barindex+5,i,barindex+thisperc+5,a) coloured(0,0,128)
    next
    Endif
    MAGIC-STOCHASTIC-V2-2.itf
    #188169 quote
    JC_Bywan
    Moderator
    Master

    Bonjour,

    j’ai jeté un oeil, je n’ai pas de message d’erreur, je suppose que tu penses que ton code est faux car il n’affiche pas ce que tu attends. Sans forcément savoir plus précisément ce que tu attends, c’était un peu long à décortiquer, mais voici au moins 2 éléments “étranges” à la lecture du code:

    – Les i2, i4 , i&nombre pair… décrivent des boucles for next de 1 seul élément, donc soit ces for next sont potentiellement inutiles, soit l’intention était de leur faire parcourir plus d’un élément et il faudrait revoir leur premier et/ou dernier élément

    – Les boucles i&nombre IMPAIR vont toutes de 0 à pdonnees (quel qu’il soit), elles vont toutes augmenter leur count&nombre (et donc maxcount&nombre) respectif exactement de la même façon puisqu’elles vont avoir le même nombre de fois où Close[i&nombre]>Open[i&nombre] and Comptage[i&nombre]=0 .

    En d’autres termes, tu as refait pour chaque maxcount en dehors du 0 un calcul identique en changeant juste le nom des i, donc à la sortie, dans les drawtext, ça donne le même résultat sur tous les maxcount… (sauf celui=0). Il faudrait que tu repartes de ce que tu veux vraiment pour comprendre la différence manquante à introduire dans les calculs pour le moment identiques des maxcount…

    Antoine thanked this post
    #188172 quote
    Antoine
    Participant
    Average

    Bonjour JC,

    Merci pour ta réponse !

    La première erreur était que je travaillai toujours sur le niveau 0 alors que mes niveaux de travail allaient de 0 à +12, j’ai donc corrigé.

    Tu trouveras le code modifié ci-joint. Cependant quand je charge sur N période arrière je ne comprends pas pourquoi il m’affiche des valeurs, alors que sur les  dernière périodes réglées en variable. On voit très bien qu’aucun point du nuage de point, ont été positif durant les N dernières périodes.. J’ai mis des captures ci-joint pour que tu puisses comprendre.

    MAGIC-STOCHASTIC-V2-TEST.itf TEST-AVEC-PERIODE-5.jpg TEST-AVEC-PERIODE-5.jpg TEST-AVEC-PERIODE-500.jpg TEST-AVEC-PERIODE-500.jpg
    #188176 quote
    Antoine
    Participant
    Average

    L’objectif de cette distribution serait de compter le nombre de fois par niveau de 0 jusqu’à 12 du “comptage” ou l’on a une cloture positive.

    #188177 quote
    JC_Bywan
    Moderator
    Master

    Même si tu as remis les count à 0, chaque maxcount&nombre étant défini comme maximum de lui même avec chaque count&nombre de même nature, les maxcount ne sont jamais remis à 0, donc le comptage que tu affiches reste à un max historique peu importe ton N

    #188181 quote
    Antoine
    Participant
    Average

    Merci de m’avoir guidé vers la solution JC.

    Est-ce que tu penses que je peux regrouper les boucles for pour que le calcul et le chargement soit plus rapide ?

    Par ex si je prends en compte 10 000 périodes arrière

    PERIODE-5.jpg PERIODE-5.jpg PERIODE-500.jpg PERIODE-500.jpg
    #190037 quote
    Antoine
    Participant
    Average

    Bonjour à tous,

    Je suis actuellement bloqué sur un bout de code en effet je n’arrive pas à comprendre l’erreur que j’ai pu faire.

    J’ai réalisé une distribution sur plusieurs niveaux induite d’un comptage de positionnement stochastic.

    Le problème est qu’il s’agit toujours du comptage du niveau 1 qui remonte, les lignes concernées sont de 900-948 sur le itf.

    Voici le bout de code qui ne fonctionne pas :

    timeFrame(default)
    
    COMPTAGE=A+A1+A2+B+B1+B2+Q+Q1+Q2+W+W1+W2
    MAGICSTO=COMPTAGE
    
    //////////////////////////////////NV
    
    For i=1 to 12
    countH=0
    countHB=0
    For j=0 to DONNEES
    If MAGICSTO[j+1]=1 Then
    If MAGICSTO[j]>=1 Then
    DeltaH=1
    Else
    DeltaH=0
    Endif
    If MAGICSTO[j]<1 Then
    DeltaHB=1
    Else
    DeltaHB=0
    Endif
    countH=countH+DELTAH
    countHB=countHB+DELTAHB
    Endif
    Next
    
    //NOMBRE DE FOIS NV
    NBFOISNV=(countH+countHB)
    
    //RATIO NV
    RATIOH=round((countH*100)/NBFOISNV)
    RATIOHB=round((countHB*100)/NBFOISNV)
    //NV
    DRAWRECTANGLE(barindex+40, i , barindex+40-countH, i)coloured(0,255,100)
    DRAWRECTANGLE(barindex+40, i , barindex+40+countHB, i)coloured(255,20,147)
    
    If AfficherNombreDeFois=1 Then
    //NV
    DRAWTEXT("#countH#",barindex+40-countH-20,i,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#countHB#",barindex+40+countHB+20,i,sansserif,bold,10)coloured(255,20,147)
    Endif
    
    If AfficherRatio=1 Then
    //NV
    DRAWTEXT("#RATIOH#%",barindex+40-countH-10,i,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#RATIOHB#%",barindex+40+countHB+10,i,sansserif,bold,10)coloured(255,20,147)
    Endif
    
    Next
    
    If DataBox Then
    DRAWSEGMENT(barindex, 0, barindex-DONNEES, 0)coloured(65,105,225)
    Endif
    
    Return MAGICSTO as "MAGICSTO HEAT MAP"
    

    Et voici le code qui fonctionne que  j’ai voulu optimiser qui lui dissocie chaque niveau, mais il est beaucoup trop lourd et pas du tout optimisé…

    /////////////////////////////////NV1
    
    NIVcount1H=0
    For i2H=1 to 1
    count1H=0
    For i3H=0 to DONNEES
    If MAGICSTO[i3H+1]=1 Then
    If MAGICSTO[i3H]>=1 Then
    Delta1H=1
    Else
    Delta1H=0
    Endif
    count1H=count1H+DELTA1H
    Endif
    Next
    NIVcount1H=max(NIVcount1H,count1H)
    Next
    
    NIVcount1HB=0
    For i2HB=1 to 1
    count1HB=0
    For i3HB=0 to DONNEES
    If MAGICSTO[i3HB+1]=1 Then
    If MAGICSTO[i3HB]<1 Then
    Delta1HB=1
    Else
    Delta1HB=0
    Endif
    count1HB=count1HB+DELTA1HB
    Endif
    Next
    NIVcount1HB=max(NIVcount1HB,count1HB)
    Next
    
    //////////////////////////////////NV2
    
    NIVcount2H=0
    For i4H=2 to 2
    count2H=0
    For i5H=0 to DONNEES
    If MAGICSTO[i5H+1]=2 Then
    If MAGICSTO[i5H]>=2 Then
    Delta2H=1
    Else
    Delta2H=0
    Endif
    count2H=count2H+DELTA2H
    Endif
    Next
    NIVcount2H=max(NIVcount2H,count2H)
    Next
    
    NIVcount2HB=0
    For i4HB=2 to 2
    count2HB=0
    For i5HB=0 to DONNEES
    If MAGICSTO[i5HB+1]=2 Then
    If MAGICSTO[i5HB]<2 Then
    Delta2HB=1
    Else
    Delta2HB=0
    Endif
    count2HB=count2HB+DELTA2HB
    Endif
    Next
    NIVcount2HB=max(NIVcount2HB,count2HB)
    Next
    
    //////////////////////////////////NV3
    
    NIVcount3H=0
    For i6H=3 to 3
    count3H=0
    For i7H=0 to DONNEES
    If MAGICSTO[i7H+1]=3 Then
    If MAGICSTO[i7H]>=3 Then
    Delta3H=1
    Else
    Delta3H=0
    Endif
    count3H=count3H+DELTA3H
    Endif
    Next
    NIVcount3H=max(NIVcount3H,count3H)
    Next
    
    NIVcount3HB=0
    For i6HB=3 to 3
    count3HB=0
    For i7HB=0 to DONNEES
    If MAGICSTO[i7HB+1]=3 Then
    If MAGICSTO[i7HB]<3 Then
    Delta3HB=1
    Else
    Delta3HB=0
    Endif
    count3HB=count3HB+DELTA3HB
    Endif
    Next
    NIVcount3HB=max(NIVcount3HB,count3HB)
    Next
    
    //////////////////////////////////NV4
    
    NIVcount4H=0
    For i8H=4 to 4
    count4H=0
    For i9H=0 to DONNEES
    If MAGICSTO[i9H+1]=4 Then
    If MAGICSTO[i9H]>=4 Then
    Delta4H=1
    Else
    Delta4H=0
    Endif
    count4H=count4H+DELTA4H
    Endif
    Next
    NIVcount4H=max(NIVcount4H,count4H)
    Next
    
    NIVcount4HB=0
    For i8HB=4 to 4
    count4HB=0
    For i9HB=0 to DONNEES
    If MAGICSTO[i9HB+1]=4 Then
    If MAGICSTO[i9HB]<4 Then
    Delta4HB=1
    Else
    Delta4HB=0
    Endif
    count4HB=count4HB+DELTA4HB
    Endif
    Next
    NIVcount4HB=max(NIVcount4HB,count4HB)
    Next
    
    ////////////////////////////////NV5
    
    NIVcount5H=0
    For i10H=5 to 5
    count5H=0
    For i11H=0 to DONNEES
    If MAGICSTO[i11H+1]=5 Then
    If MAGICSTO[i11H]>=5 Then
    Delta5H=1
    Else
    Delta5H=0
    Endif
    count5H=count5H+DELTA5H
    Endif
    Next
    NIVcount5H=max(NIVcount5H,count5H)
    Next
    
    NIVcount5HB=0
    For i10HB=5 to 5
    count5HB=0
    For i11HB=0 to DONNEES
    If MAGICSTO[i11HB+1]=5 Then
    If MAGICSTO[i11HB]<5 Then
    Delta5HB=1
    Else
    Delta5HB=0
    Endif
    count5HB=count5HB+DELTA5HB
    Endif
    Next
    NIVcount5HB=max(NIVcount5HB,count5HB)
    Next
    
    //////////////////////////////NV6
    
    NIVcount6H=0
    For i12H=6 to 6
    count6H=0
    For i13H=0 to DONNEES
    If MAGICSTO[i13H+1]=6 Then
    If MAGICSTO[i13H]>=6 Then
    Delta6H=1
    Else
    Delta6H=0
    Endif
    count6H=count6H+DELTA6H
    Endif
    Next
    NIVcount6H=max(NIVcount6H,count6H)
    Next
    
    NIVcount6HB=0
    For i12HB=6 to 6
    count6HB=0
    For i13HB=0 to DONNEES
    If MAGICSTO[i13HB+1]=6 Then
    If MAGICSTO[i13HB]<6 Then
    Delta6HB=1
    Else
    Delta6HB=0
    Endif
    count6HB=count6HB+DELTA6HB
    Endif
    Next
    NIVcount6HB=max(NIVcount6HB,count6HB)
    Next
    
    //////////////////////////NV7
    
    NIVcount7H=0
    For i14H=7 to 7
    count7H=0
    For i15H=0 to DONNEES
    If MAGICSTO[i15H+1]=7 Then
    If MAGICSTO[i15H]>=7 Then
    Delta7H=1
    Else
    Delta7H=0
    Endif
    count7H=count7H+DELTA7H
    Endif
    Next
    NIVcount7H=max(NIVcount7H,count7H)
    Next
    
    NIVcount7HB=0
    For i14HB=7 to 7
    count7HB=0
    For i15HB=0 to DONNEES
    If MAGICSTO[i15HB+1]=7 Then
    If MAGICSTO[i15HB]<7 Then
    Delta7HB=1
    Else
    Delta7HB=0
    Endif
    count7HB=count7HB+DELTA7HB
    Endif
    Next
    NIVcount7HB=max(NIVcount7HB,count7HB)
    Next
    
    //////////////////////////NV8
    
    NIVcount8H=0
    For i16H=8 to 8
    count8H=0
    For i17H=0 to DONNEES
    If MAGICSTO[i17H+1]=8 Then
    If MAGICSTO[i17H]>=8 Then
    Delta8H=1
    Else
    Delta8H=0
    Endif
    count8H=count8H+DELTA8H
    Endif
    Next
    NIVcount8H=max(NIVcount8H,count8H)
    Next
    
    NIVcount8HB=0
    For i16HB=8 to 8
    count8HB=0
    For i17HB=0 to DONNEES
    If MAGICSTO[i17HB+1]=8 Then
    If MAGICSTO[i17HB]<8 Then
    Delta8HB=1
    Else
    Delta8HB=0
    Endif
    count8HB=count8HB+DELTA8HB
    Endif
    Next
    NIVcount8HB=max(NIVcount8HB,count8HB)
    Next
    
    //////////////////////////NV9
    
    NIVcount9H=0
    For i18H=9 to 9
    count9H=0
    For i19H=0 to DONNEES
    If MAGICSTO[i19H+1]=9 Then
    If MAGICSTO[i19H]>=9 Then
    Delta9H=1
    Else
    Delta9H=0
    Endif
    count9H=count9H+DELTA9H
    Endif
    Next
    NIVcount9H=max(NIVcount9H,count9H)
    Next
    
    NIVcount9HB=0
    For i18HB=9 to 9
    count9HB=0
    For i19HB=0 to DONNEES
    If MAGICSTO[i19HB+1]=9 Then
    If MAGICSTO[i19HB]<9 Then
    Delta9HB=1
    Else
    Delta9HB=0
    Endif
    count9HB=count9HB+DELTA9HB
    Endif
    Next
    NIVcount9HB=max(NIVcount9HB,count9HB)
    Next
    
    //////////////////////////NV10
    
    NIVcount10H=0
    For i20H=10 to 10
    count10H=0
    For i21H=0 to DONNEES
    If MAGICSTO[i21H+1]=10 Then
    If MAGICSTO[i21H]>=10 Then
    Delta10H=1
    Else
    Delta10H=0
    Endif
    count10H=count10H+DELTA10H
    Endif
    Next
    NIVcount10H=max(NIVcount10H,count10H)
    Next
    
    NIVcount10HB=0
    For i20HB=10 to 10
    count10HB=0
    For i21HB=0 to DONNEES
    If MAGICSTO[i21HB+1]=10 Then
    If MAGICSTO[i21HB]<10 Then
    Delta10HB=1
    Else
    Delta10HB=0
    Endif
    count10HB=count10HB+DELTA10HB
    Endif
    Next
    NIVcount10HB=max(NIVcount10HB,count10HB)
    Next
    
    //////////////////////////NV11
    
    NIVcount11H=0
    For i21H=11 to 11
    count11H=0
    For i22H=0 to DONNEES
    If MAGICSTO[i22H+1]=11 Then
    If MAGICSTO[i22H]>=11 Then
    Delta11H=1
    Else
    Delta11H=0
    Endif
    count11H=count11H+DELTA11H
    Endif
    Next
    NIVcount11H=max(NIVcount11H,count11H)
    Next
    
    NIVcount11HB=0
    For i21HB=11 to 11
    count11HB=0
    For i22HB=0 to DONNEES
    If MAGICSTO[i22HB+1]=11 Then
    If MAGICSTO[i22HB]<11 Then
    Delta11HB=1
    Else
    Delta11HB=0
    Endif
    count11HB=count11HB+DELTA11HB
    Endif
    Next
    NIVcount11HB=max(NIVcount11HB,count11HB)
    Next
    
    //////////////////////////NV12
    
    NIVcount12H=0
    For i22H=12 to 12
    count12H=0
    For i23H=0 to DONNEES
    If MAGICSTO[i23H+1]=12 Then
    If MAGICSTO[i23H]>=12 Then
    Delta12H=1
    Else
    Delta12H=0
    Endif
    count12H=count12H+DELTA12H
    Endif
    Next
    NIVcount12H=max(NIVcount12H,count12H)
    Next
    
    NIVcount12HB=0
    For i22HB=12 to 12
    count12HB=0
    For i23HB=0 to DONNEES
    If MAGICSTO[i23HB+1]=12 Then
    If MAGICSTO[i23HB]<12 Then
    Delta12HB=1
    Else
    Delta12HB=0
    Endif
    count12HB=count12HB+DELTA12HB
    Endif
    Next
    NIVcount12HB=max(NIVcount12HB,count12HB)
    Next
    
    //NOMBRE DE FOIS NV1
    NBFOISNV1=(NIVcount1H+NIVcount1HB)
    //NOMBRE DE FOIS NV2
    NBFOISNV2=(NIVcount2H+NIVcount2HB)
    //NOMBRE DE FOIS NV3
    NBFOISNV3=(NIVcount3H+NIVcount3HB)
    //NOMBRE DE FOIS NV4
    NBFOISNV4=(NIVcount4H+NIVcount4HB)
    //NOMBRE DE FOIS NV5
    NBFOISNV5=(NIVcount5H+NIVcount5HB)
    //NOMBRE DE FOIS NV6
    NBFOISNV6=(NIVcount6H+NIVcount6HB)
    //NOMBRE DE FOIS NV7
    NBFOISNV7=(NIVcount7H+NIVcount7HB)
    //NOMBRE DE FOIS NV8
    NBFOISNV8=(NIVcount8H+NIVcount8HB)
    //NOMBRE DE FOIS NV9
    NBFOISNV9=(NIVcount9H+NIVcount9HB)
    //NOMBRE DE FOIS NV10
    NBFOISNV10=(NIVcount10H+NIVcount10HB)
    //NOMBRE DE FOIS NV11
    NBFOISNV11=(NIVcount11H+NIVcount11HB)
    //NOMBRE DE FOIS NV12
    NBFOISNV12=(NIVcount12H+NIVcount12HB)
    
    //RATIO NV1
    RATIO1H=round((NIVcount1H*100)/NBFOISNV1)
    RATIO1HB=round((NIVcount1HB*100)/NBFOISNV1)
    //RATIO NV2
    RATIO2H=round((NIVcount2H*100)/NBFOISNV2)
    RATIO2HB=round((NIVcount2HB*100)/NBFOISNV2)
    //RATIO NV3
    RATIO3H=round((NIVcount3H*100)/NBFOISNV3)
    RATIO3HB=round((NIVcount3HB*100)/NBFOISNV3)
    //RATIO NV4
    RATIO4H=round((NIVcount4H*100)/NBFOISNV4)
    RATIO4HB=round((NIVcount4HB*100)/NBFOISNV4)
    //RATIO NV5
    RATIO5H=round((NIVcount5H*100)/NBFOISNV5)
    RATIO5HB=round((NIVcount5HB*100)/NBFOISNV5)
    //RATIO NV6
    RATIO6H=round((NIVcount6H*100)/NBFOISNV6)
    RATIO6HB=round((NIVcount6HB*100)/NBFOISNV6)
    //RATIO NV7
    RATIO7H=round((NIVcount7H*100)/NBFOISNV7)
    RATIO7HB=round((NIVcount7HB*100)/NBFOISNV7)
    //RATIO NV8
    RATIO8H=round((NIVcount8H*100)/NBFOISNV8)
    RATIO8HB=round((NIVcount8HB*100)/NBFOISNV8)
    //RATIO NV9
    RATIO9H=round((NIVcount9H*100)/NBFOISNV9)
    RATIO9HB=round((NIVcount9HB*100)/NBFOISNV9)
    //RATIO NV10
    RATIO10H=round((NIVcount10H*100)/NBFOISNV10)
    RATIO10HB=round((NIVcount10HB*100)/NBFOISNV10)
    //RATIO NV11
    RATIO11H=round((NIVcount11H*100)/NBFOISNV11)
    RATIO11HB=round((NIVcount11HB*100)/NBFOISNV11)
    //RATIO NV2
    RATIO12H=round((NIVcount12H*100)/NBFOISNV12)
    RATIO12HB=round((NIVcount12HB*100)/NBFOISNV12)
    
    
    //NV1
    DRAWRECTANGLE(barindex+40, 1 , barindex+40-NIVcount1H, 1)coloured(0,255,100)
    DRAWRECTANGLE(barindex+40, 1 , barindex+40+NIVcount1HB, 1)coloured(255,20,147)
    //NV2
    DRAWRECTANGLE(barindex+40, 2 , barindex+40-NIVcount2H, 2)coloured(0,255,100)
    DRAWRECTANGLE(barindex+40, 2 , barindex+40+NIVcount2HB, 2)coloured(255,20,147)
    //NV3
    DRAWRECTANGLE(barindex+40, 3 , barindex+40-NIVcount3H, 3)coloured(0,255,100)
    DRAWRECTANGLE(barindex+40, 3 , barindex+40+NIVcount3HB, 3)coloured(255,20,147)
    //NV4
    DRAWRECTANGLE(barindex+40, 4 , barindex+40-NIVcount4H, 4)coloured(0,255,100)
    DRAWRECTANGLE(barindex+40, 4 , barindex+40+NIVcount4HB, 4)coloured(255,20,147)
    //NV5
    DRAWRECTANGLE(barindex+40, 5 , barindex+40-NIVcount5H, 5)coloured(0,255,100)
    DRAWRECTANGLE(barindex+40, 5 , barindex+40+NIVcount5HB, 5)coloured(255,20,147)
    //NV6
    DRAWRECTANGLE(barindex+40, 6 , barindex+40-NIVcount6H, 6)coloured(0,255,100)
    DRAWRECTANGLE(barindex+40, 6 , barindex+40+NIVcount6HB, 6)coloured(255,20,147)
    //NV7
    DRAWRECTANGLE(barindex+40, 7 , barindex+40-NIVcount7H, 7)coloured(0,255,100)
    DRAWRECTANGLE(barindex+40, 7 , barindex+40+NIVcount7HB, 7)coloured(255,20,147)
    //NV8
    DRAWRECTANGLE(barindex+40, 8 , barindex+40-NIVcount8H, 8)coloured(0,255,100)
    DRAWRECTANGLE(barindex+40, 8 , barindex+40+NIVcount8HB, 8)coloured(255,20,147)
    //NV9
    DRAWRECTANGLE(barindex+40, 9 , barindex+40-NIVcount9H, 9)coloured(0,255,100)
    DRAWRECTANGLE(barindex+40, 9 , barindex+40+NIVcount9HB, 9)coloured(255,20,147)
    //NV10
    DRAWRECTANGLE(barindex+40, 10 , barindex+40-NIVcount10H, 10)coloured(0,255,100)
    DRAWRECTANGLE(barindex+40, 10 , barindex+40+NIVcount10HB, 10)coloured(255,20,147)
    //NV11
    DRAWRECTANGLE(barindex+40, 11 , barindex+40-NIVcount11H, 11)coloured(0,255,100)
    DRAWRECTANGLE(barindex+40, 11 , barindex+40+NIVcount11HB, 11)coloured(255,20,147)
    //NV12
    DRAWRECTANGLE(barindex+40, 12 , barindex+40-NIVcount12H, 12)coloured(0,255,100)
    DRAWRECTANGLE(barindex+40, 12 , barindex+40+NIVcount12HB, 12)coloured(255,20,147)
    
    
    If DataBox Then
    DRAWSEGMENT(barindex, 0, barindex-DONNEES, 0)coloured(65,105,225)
    Endif
    
    If AfficherNombreDeFois=1 Then
    //NV1
    DRAWTEXT("#NIVcount1H#",barindex+40-NIVcount1H-20,1,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#NIVcount1HB#",barindex+40+NIVcount1HB+20,1,sansserif,bold,10)coloured(255,20,147)
    //NV2
    DRAWTEXT("#NIVcount2H#",barindex+40-NIVcount2H-20,2,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#NIVcount2HB#",barindex+40+NIVcount2HB+20,2,sansserif,bold,10)coloured(255,20,147)
    //NV3
    DRAWTEXT("#NIVcount3H#",barindex+40-NIVcount3H-20,3,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#NIVcount3HB#",barindex+40+NIVcount3HB+20,3,sansserif,bold,10)coloured(255,20,147)
    //NV4
    DRAWTEXT("#NIVcount4H#",barindex+40-NIVcount4H-20,4,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#NIVcount4HB#",barindex+40+NIVcount4HB+20,4,sansserif,bold,10)coloured(255,20,147)
    //NV5
    DRAWTEXT("#NIVcount5H#",barindex+40-NIVcount5H-20,5,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#NIVcount5HB#",barindex+40+NIVcount5HB+20,5,sansserif,bold,10)coloured(255,20,147)
    //NV6
    DRAWTEXT("#NIVcount6H#",barindex+40-NIVcount6H-20,6,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#NIVcount6HB#",barindex+40+NIVcount6HB+20,6,sansserif,bold,10)coloured(255,20,147)
    //NV7
    DRAWTEXT("#NIVcount7H#",barindex+40-NIVcount7H-20,7,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#NIVcount7HB#",barindex+40+NIVcount7HB+20,7,sansserif,bold,10)coloured(255,20,147)
    //NV8
    DRAWTEXT("#NIVcount8H#",barindex+40-NIVcount8H-20,8,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#NIVcount8HB#",barindex+40+NIVcount8HB+20,8,sansserif,bold,10)coloured(255,20,147)
    //NV9
    DRAWTEXT("#NIVcount9H#",barindex+40-NIVcount9H-20,9,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#NIVcount9HB#",barindex+40+NIVcount9HB+20,9,sansserif,bold,10)coloured(255,20,147)
    //NV10
    DRAWTEXT("#NIVcount10H#",barindex+40-NIVcount10H-20,10,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#NIVcount10HB#",barindex+40+NIVcount10HB+20,10,sansserif,bold,10)coloured(255,20,147)
    //NV11
    DRAWTEXT("#NIVcount11H#",barindex+40-NIVcount11H-20,11,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#NIVcount11HB#",barindex+40+NIVcount11HB+20,11,sansserif,bold,10)coloured(255,20,147)
    //NV12
    DRAWTEXT("#NIVcount12H#",barindex+40-NIVcount12H-20,12,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#NIVcount12HB#",barindex+40+NIVcount12HB+20,12,sansserif,bold,10)coloured(255,20,147)
    Endif
    
    If AfficherRatio=1 Then
    //NV1
    DRAWTEXT("#RATIO1H#%",barindex+40-NIVcount1H-10,1,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#RATIO1HB#%",barindex+40+NIVcount1HB+10,1,sansserif,bold,10)coloured(255,20,147)
    //NV2
    DRAWTEXT("#RATIO2H#%",barindex+40-NIVcount2H-10,2,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#RATIO2HB#%",barindex+40+NIVcount2HB+10,2,sansserif,bold,10)coloured(255,20,147)
    //NV3
    DRAWTEXT("#RATIO3H#%",barindex+40-NIVcount3H-10,3,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#RATIO3HB#%",barindex+40+NIVcount3HB+10,3,sansserif,bold,10)coloured(255,20,147)
    //NV4
    DRAWTEXT("#RATIO4H#%",barindex+40-NIVcount4H-10,4,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#RATIO4HB#%",barindex+40+NIVcount4HB+10,4,sansserif,bold,10)coloured(255,20,147)
    //NV5
    DRAWTEXT("#RATIO5H#%",barindex+40-NIVcount5H-10,5,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#RATIO5HB#%",barindex+40+NIVcount5HB+10,5,sansserif,bold,10)coloured(255,20,147)
    //NV6
    DRAWTEXT("#RATIO6H#%",barindex+40-NIVcount6H-10,6,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#RATIO6HB#%",barindex+40+NIVcount6HB+10,6,sansserif,bold,10)coloured(255,20,147)
    //NV7
    DRAWTEXT("#RATIO7H#%",barindex+40-NIVcount7H-10,7,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#RATIO7HB#%",barindex+40+NIVcount7HB+10,7,sansserif,bold,10)coloured(255,20,147)
    //NV8
    DRAWTEXT("#RATIO8H#%",barindex+40-NIVcount8H-10,8,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#RATIO8HB#%",barindex+40+NIVcount8HB+10,8,sansserif,bold,10)coloured(255,20,147)
    //NV9
    DRAWTEXT("#RATIO9H#%",barindex+40-NIVcount9H-10,9,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#RATIO9HB#%",barindex+40+NIVcount9HB+10,9,sansserif,bold,10)coloured(255,20,147)
    //NV10
    DRAWTEXT("#RATIO10H#%",barindex+40-NIVcount10H-10,10,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#RATIO10HB#%",barindex+40+NIVcount10HB+10,10,sansserif,bold,10)coloured(255,20,147)
    //NV11
    DRAWTEXT("#RATIO11H#%",barindex+40-NIVcount11H-10,11,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#RATIO11HB#%",barindex+40+NIVcount11HB+10,11,sansserif,bold,10)coloured(255,20,147)
    //NV12
    DRAWTEXT("#RATIO12H#%",barindex+40-NIVcount12H-10,12,sansserif,bold,10)coloured(0,255,100)
    DRAWTEXT("#RATIO12HB#%",barindex+40+NIVcount12HB+10,12,sansserif,bold,10)coloured(255,20,147)
    Endif
    
    Return MAGICSTO as "MAGICSTO HEAT MAP"
    

    Merci par avance, pour votre aide

    Bonne fin de journée à vous

    MAGIC-STOCHASTIC-DEV.itf
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.

Comptage pour distribution


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Antoine @antoine83640 Participant
Summary

This topic contains 7 replies,
has 2 voices, and was last updated by Antoine
3 years, 12 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 02/10/2022
Status: Active
Attachments: 7 files
Logo Logo
Loading...