points camarilla weekly à ajuster

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #245925 quote
    geroniman
    Participant
    Junior

    idem pour les points camarilla weekly  la cloture weekly du es /nq/ym est celle de 23h et non de 22h ce qui décale les niveaux. Pour la semaine dernière les niveaux sont décalés de 6 pts entre le close de 23h et de 22h .avec 6 points de moins, les niveaux camarilla cette semaine seraient parfaits.

    #246009 quote
    geroniman
    Participant
    Junior
    DefParam DrawOnLastBarOnly = true
    
    IF DAYOFWEEK < DAYOFWEEK[1] THEN
    weekhigh = prevweekhigh
    weeklow = prevweeklow
    weekclose = prevweekclose
    prevweekhigh = HIGH
    prevweeklow = LOW
    ENDIF
    
    prevweekhigh = MAX(prevweekhigh, HIGH)
    prevweeklow = MIN(prevweeklow, LOW)
    prevweekclose = CLOSE
    
    MYh = ( weekhigh )
    L = ( weeklow )
    C = ( weekclose)
    
    alpha = 250
    
    PPW = ROUND (C,2)
    rem DrawSegment(startbar,PP,barindex,PP) coloured(0,0,0,alpha)
    DrawText(” ◄ PPW #PPW#”,barindex,PPW,Dialog,Bold,16) coloured(250,250,250,alpha)
    //R050W = ROUND((R1W+PPW)/2,2)
    rem DrawSegment(startbar,R1,barindex,R1) coloured(0,0,0,alpha)
    //DrawText(” ◄ R0W 0.50 #R050W#”,barindex,R050W,Dialog,Bold,15) coloured(255,255,255,alpha)
    R0W=(PPW+R1W)/2
    DrawText(” ^ ◄ R0W #R0W#”,barindex,R0W,Dialog,Bold,12) coloured(250,250,250,alpha)
    
    R1W = ROUND(((myH-L) * 1.1)/12+C,2)
    rem DrawSegment(startbar,R1,barindex,R1) coloured(0,0,0,alpha)
    DrawText(” ^ ◄ R1W #R1W#”,barindex,R1W,Dialog,Bold,12) coloured(250,250,250,alpha)
    //R1050W = ROUND((R1W+R2W)/2,2)
    rem DrawSegment(startbar,R1,barindex,R1) coloured(0,0,0,alpha)
    //DrawText(” ◄ R1bW 50% #R1050W#”,barindex,R1050W,Dialog,Bold,15) coloured(255,255,255,alpha)
    R1W50=(R1W+R2W)/2
    DrawText(” ^ ◄ R1W50 #R1W50#”,barindex,R1W50,Dialog,Bold,12) coloured(250,250,250,alpha)
    R2W = ROUND(((myH-L)*1.1)/6+C,2)
    rem DrawSegment(startbar,RR2,barindex,RR2) coloured(0,0,0,alpha)
    DrawText(” ◄ R2W #R2W#”,barindex,R2W,Dialog,Bold,12) coloured(250,250,250,alpha)
    //R2050W = ROUND((R2W+R3W)/2,2)
    rem DrawSegment(startbar,R1,barindex,R1) coloured(0,0,0,alpha)
    //DrawText(” ◄ R2W 50% #R2050W#”,barindex,R2050W,Dialog,Bold,15) coloured(255,255,255,alpha)
    R2W50=(R2W+R3W)/2
    DrawText(” ^ ◄ R2W50 #R2W50#”,barindex,R2W50,Dialog,Bold,12) coloured(250,250,250,alpha)
    R3W = ROUND(((myH-L)*1.1)/4+C,2)
    rem DrawSegment(startbar,RR3,barindex,RR3) coloured(0,0,0,alpha)
    DrawText(” ◄ R3W #R3W#”,barindex,R3W,Dialog,Bold,14) coloured(250,250,250,alpha)
    
    R3050W=ROUND((R3W+R4W)/2,2)
    rem DrawSegment(startbar,RR3b,barindex,RR3b) coloured(0,0,0,alpha)
    DrawText(” ◄ R3W 50% #R3050W#”,barindex,R3050W,Dialog,Bold,12) coloured(250,250,250,alpha)
    R3038W=ROUND (R3W +.382*( R4W-R3W),2)
    rem DrawSegment(startbar,RR3b,barindex,RR3b) coloured(0,0,0,alpha)
    DrawText(” ◄ R3W 38% #R3038W#”,barindex,R3038W,Dialog,Bold,12) coloured(250,250,250,alpha)
    R30618W=ROUND (R3W +.618*( R4W-R3W),2)
    rem DrawSegment(startbar,RR3b,barindex,RR3b) coloured(0,0,0,alpha)
    DrawText(” ◄ R3W 62% #R30618W#”,barindex,R30618W,Dialog,Bold,12) coloured(250,250,250,alpha)
    //R3075W=ROUND((R3050W+R4W)/2,2)
    rem DrawSegment(startbar,RR3b,barindex,RR3b) coloured(0,0,0,alpha)
    //DrawText(” ◄ R3W 75% #R3075W#”,barindex,R3075W,Dialog,Bold,15) coloured(0,0,0,alpha)
    R4W =ROUND (((myH-L)*1.1)/2+C,2)
    rem DrawSegment(startbar,RR4,barindex,RR4) coloured(0,0,0,alpha)
    DrawText(” ◄ R4W #R4W#”,barindex,R4W,Dialog,Bold,14) coloured(250,250,250,alpha)
    //R4025W = ROUND ((R4W+R4050W)/2,2)
    rem DrawSegment(startbar,RR4b,barindex,RR4b) coloured(0,0,0,alpha)
    //DrawText(” ◄ R4W 25% #R4025W#”,barindex,R4025W,Dialog,Bold,15) coloured(255,255,255,alpha)
    
    R4023W = ROUND (R4W – 0.236 *( R1W-R4W),2)
    rem DrawSegment(startbar,RR4b,barindex,RR4b) coloured(0,0,0,alpha)
    DrawText(” ◄ R4W 23% #R4023W#”,barindex,R4023W,Dialog,Bold,10) coloured(250,250,250,alpha)
    
    R4x50W =ROUND((R4W+R5W)/2,2)
    
    rem DrawSegment(startbar,RR4a,barindex,RR4a) coloured(0,0,0,alpha)
    DrawText(” ◄ R4x50W #R4x50W#”,barindex,R4x50W,Dialog,Bold,12) coloured(250,250,250,alpha)
    //R4038W =ROUND(R4W+0.382*(R5W-R4W),2)
    //RR4X= (RR4+RR4b)/2
    rem DrawSegment(startbar,RR4a,barindex,RR4a) coloured(0,0,0,alpha)
    //DrawText(” ◄ R4W 38% #R4038W#”,barindex,R4038W,Dialog,Bold,15) coloured(255,255,255,alpha)
    
    R4x62W = ROUND (R4W – 0.618 *( R1W-R4W),2)
    rem DrawSegment(startbar,RR4b,barindex,RR4b) coloured(0,0,0,alpha)
    DrawText(” ◄ R4x62W #R4x62W#”,barindex,R4x62W,Dialog,Bold,12) coloured(250,250,250,alpha)
    R4x76W = ROUND (R4W – 0.764 *( R1W-R4W),2)
    rem DrawSegment(startbar,RR4b,barindex,RR4b) coloured(0,0,0,alpha)
    DrawText(” ◄ R4x76W #R4x76W#”,barindex,R4x76W,Dialog,Bold,12) coloured(250,250,250,alpha)
    R4x38W = ROUND (R4W – 0.382 *( R1W-R4W),2)
    rem DrawSegment(startbar,RR4b,barindex,RR4b) coloured(0,0,0,alpha)
    DrawText(” ◄ R4x38W #R4x38W#”,barindex,R4x38W,Dialog,Bold,12) coloured(250,250,250,alpha)
    //R4075W = ROUND ((R4050W+R5W)/2,2)
    rem DrawSegment(startbar,RR4b,barindex,RR4b) coloured(0,0,0,alpha)
    //DrawText(” ◄ R4W 75% #R4075W#”,barindex,R4075W,Dialog,Bold,15) coloured(255,255,255,alpha)
    //R4c1W = ROUND (R4W+0.618*(R5W-R4W),2)
    rem DrawSegment(startbar,RR4b,barindex,RR4b) coloured(0,0,0,alpha)
    //DrawText(” ◄ R4c1W #R4c1W#”,barindex,R4c1W,Dialog,Bold,12) coloured(255,165,0,alpha)
    
    R5W = ROUND(2*R4W-R1W,2)
    rem DrawSegment(startbar,RR5,barindex,RR5) coloured(0,0,0,alpha)
    DrawText(” ◄ R5W #R5W#”,barindex,R5W,Dialog,Bold,12) coloured(250,250,250,alpha)
    
    //R5025W = ROUND ((R5W+R5050W)/2,2)
    rem DrawSegment(startbar,RR4b,barindex,RR4b) coloured(0,0,0,alpha)
    //DrawText(” ◄ R5W 25% #R5025W#”,barindex,R5025W,Dialog,Bold,15) coloured(255,255,255,alpha)
    R5x50W = ROUND (R5W + 0.5 *( R6W-R5W),2)
    rem DrawSegment(startbar,RR4b,barindex,RR4b) coloured(0,0,0,alpha)
    DrawText(” ◄ R5x50W #R5x50W#”,barindex,R5x50W,Dialog,Bold,15) coloured(255,255,255,alpha)
    R5x62W = ROUND (R5W + 0.62 *( R6W-R5W),2)
    rem DrawSegment(startbar,RR4b,barindex,RR4b) coloured(0,0,0,alpha)
    DrawText(” ◄ R5x62W #R5x62W#”,barindex,R5x62W,Dialog,Bold,15) coloured(255,165,0,alpha)
    R5x38W = ROUND (R5W + 0.38 *( R6W-R5W),2)
    rem DrawSegment(startbar,RR4b,barindex,RR4b) coloured(0,0,0,alpha)
    DrawText(” ◄ R5x38W #R5x38W#”,barindex,R5x38W,Dialog,Bold,15) coloured(255,165,0,alpha)
    R5x76W = ROUND (R5x50W + 0.52 *( R6W-R5x50W),2)
    rem DrawSegment(startbar,RR4b,barindex,RR4b) coloured(0,0,0,alpha)
    DrawText(” ◄ R5x76W #R5x76W#”,barindex,R5x76W,Dialog,Bold,15) coloured(255,165,0,alpha)
    R6W = ROUND(R4W+1.618*(R4W-R1W),0)
    rem DrawSegment(startbar,RR6,barindex,RR6) coloured(0,0,0,alpha)
    DrawText(” ◄ R6W #R6W#”,barindex,R6W,Dialog,Bold,12) coloured(250,250,250,alpha)
    
    //R6aW = ROUND ((R6W+R6bW)/2,2)
    rem DrawSegment(startbar,RR4b,barindex,RR4b) coloured(0,0,0,alpha)
    //DrawText(” ◄ R6W 25% #R6aW#”,barindex,R6aW,Dialog,Bold,15) coloured(255,165,0,alpha)
    //R6bW = ROUND (R6W + 0.5 *( R7W-R6W),2)
    rem DrawSegment(startbar,RR4b,barindex,RR4b) coloured(0,0,0,alpha)
    //DrawText(” ◄ R6W 50% #R6bW#”,barindex,R6bW,Dialog,Bold,15) coloured(255,255,255,alpha)
    //R6cW = ROUND (R6bW + 0.5 *( R7W-R6bW),2)
    rem DrawSegment(startbar,RR4b,barindex,RR4b) coloured(0,0,0,alpha)
    //DrawText(” ◄ R6W 75% #R6cW#”,barindex,R6cW,Dialog,Bold,15) coloured(255,165,0,alpha)
    
    R7W = ROUND(R4W+2*(R4W-R1W),2)
    rem DrawSegment(startbar,RR7,barindex,RR7) coloured(0,0,0,alpha)
    DrawText(” ◄ R7W #R7W#” ,barindex,R7W,Dialog,Bold,12) coloured(250,250,250,alpha)
    //S0W =ROUND((PPW+S1W)/2,2)
    //rem DrawSegment(startbar,S1,barindex,S1) coloured(0,0,0,alpha)
    //DrawText(” ◄ S0W #S0W#”,barindex,S0W,Dialog,Bold,15) coloured(0,255,255,alpha)
    S1W =ROUND(C-((myH-L)*1.1)/12,2)
    rem DrawSegment(startbar,S1,barindex,S1) coloured(0,0,0,alpha)
    DrawText(” ◄ S1W #S1W#”,barindex,S1W,Dialog,Bold,12) coloured(250,250,250,alpha)
    //S0W =ROUND((PPW+S1W)*0.5,2)
    rem DrawSegment(startbar,S1,barindex,S1) coloured(0,0,0,alpha)
    //DrawText(” ◄ S0W #S0W#”,barindex,S0W,Dialog,Bold,15) coloured(255,255,255,alpha)
    S1050W =ROUND((S1W+S2W)/2,2)
    rem DrawSegment(startbar,S1,barindex,S1) coloured(0,0,0,alpha)
    DrawText(” ◄ S1W 50% #S1050W#”,barindex,S1050W,Dialog,Bold,15) coloured(255,255,255,alpha)
    //S1x50W=ROUND(S1W-0.618*(S1W-S2W),2)
    rem DrawSegment(startbar,SS3b,barindex,SS3b) coloured(0,0,0,alpha)
    //DrawText(” ◄ S1W 62% #S1618W# “,barindex,S1618W,Dialog,Bold,10) coloured(250,250,250,alpha)
    S2W =ROUND( C-((myH-L)*1.1)/6,2)
    rem DrawSegment(startbar,SS2,barindex,SS2) coloured(0,0,0,alpha)
    DrawText(” ◄ S2W #S2W#”,barindex,S2W,Dialog,Bold,12) coloured(250,250,250,alpha)
    S2050W =ROUND((S2W+S3W)/2,2)
    rem DrawSegment(startbar,S1,barindex,S1) coloured(0,0,0,alpha)
    DrawText(” ◄ S2W 50% #S2050W#”,barindex,S2050W,Dialog,Bold,15) coloured(255,255,255,alpha)
    
    S3W =ROUND( C-((myH-L)*1.1)/4,2)
    rem DrawSegment(startbar,SS3,barindex,SS3) coloured(0,0,0,alpha)
    DrawText(” ◄ S3W #S3W#”,barindex,S3W,Dialog,Bold,14) coloured(250,250,250,alpha)
    //S3236W=ROUND((S3W-0.236*(S3W-S4W)),2)
    rem DrawSegment(startbar,SS3b,barindex,SS3b) coloured(◄ S3W 23.6% #S3236W# “,barindex,S3236W,Dialog,Bold,25) coloured(0,255,255,alpha)
    //S3025W =ROUND((S3W+S3050W)/2,0)
    rem DrawSegment(startbar,SS3,barindex,SS3) coloured(0,0,0,alpha)
    //DrawText(” ◄ S3W 25% #S3025W#”,barindex,S3025W,Dialog,Bold,12) coloured(0,255,255,alpha)
    //S3a1W =ROUND((S3aW+S3050W)/2,2)
    rem DrawSegment(startbar,SS3,barindex,SS3) coloured(0,0,0,alpha)
    //DrawText(” ◄ S3a1W #S3a1W#”,barindex,S3a1W,Dialog,Bold,12) coloured(255,165,0,alpha)
    S3x50W=ROUND((S3W+S4W)/2,2)
    rem DrawSegment(startbar,SS3b,barindex,SS3b) coloured(0,0,0,alpha)
    DrawText(” ◄ S3W 50% #S3050W# “,barindex,S3x50W,Dialog,Bold,10) coloured(250,250,250,alpha)
    
     
    
    S3x38W=ROUND(S3W-0.382*(S3W-S4W),2)
    rem DrawSegment(startbar,SS3b,barindex,SS3b) coloured(0,0,0,alpha)
    DrawText(” ◄ S3aW 38% #S3038W# “,barindex,S3x38W,Dialog,Bold,10) coloured(250,250,250,alpha)
    
    S3x62W=ROUND(S3W-0.618*(S3W-S4W),2)
    rem DrawSegment(startbar,SS3b,barindex,SS3b) coloured(0,0,0,alpha)
    DrawText(” ◄ S3W 62% #S3618W# “,barindex,S3x62W,Dialog,Bold,10) coloured(250,250,250,alpha)
    //S3b1W=ROUND((S3050W+S3cW)/2,2)
    rem DrawSegment(startbar,SS3b,barindex,SS3b) coloured(0,0,0,alpha)
    //DrawText(” ◄ S3b1W #S3b1W# “,barindex,S3b1W,Dialog,Bold,12) coloured(255,165,0,alpha)
    
    //S3cW=ROUND((S3050W+S4W)/2,2)
    rem DrawSegment(startbar,SS3b,barindex,SS3b) coloured(0,0,0,alpha)
    //DrawText(” ◄ S3cW #S3cW# “,barindex,S3cW,Dialog,Bold,15) coloured(255,165,0,alpha)
    
    S4W =ROUND( C-((myH-L)*1.1)/2,2)
    //SS4x=(SS4+SS4b)/2
    rem DrawSegment(startbar,SS4,barindex,SS4) coloured(0,0,0,alpha)
    DrawText(” ◄ S4W #S4W#”,barindex,S4W,Dialog,Bold,14) coloured(250,250,250,alpha)
    //S4aW =ROUND((S4W+S4bW)/2,2)
    //SS4x=(SS4+SS4b)/2
    rem DrawSegment(startbar,SS4,barindex,SS4) coloured(0,0,0,alpha)
    //DrawText(” ◄ S4W 25% #S4aW#”,barindex,S4aW,Dialog,Bold,15) coloured(255,255,255,alpha)
    //S4a1W =ROUND((S4W+S4aW)/2,2)
    //SS4x=(SS4+SS4b)/2
    rem DrawSegment(startbar,SS4,barindex,SS4) coloured(0,0,0,alpha)
    //DrawText(” ◄ S4a1W #S4a1W#”,barindex,S4a1W,Dialog,Bold,15) coloured(255,165,0,alpha)
    
    S4x50W = ROUND(S4W-0.5 * (S1W-S4W),2)
    rem DrawSegment(startbar,SS4a,barindex,SS4a) coloured(0,0,0,alpha)
    DrawText(” ◄ S4W 50% #S4bW#”,barindex,S4x50W,Dialog,Bold,10) coloured(250,250,250,alpha)
    //S4a2W =ROUND((S4aW+S4bW)/2,2)
    //SS4x=(SS4+SS4b)/2
    rem DrawSegment(startbar,SS4,barindex,SS4) coloured(0,0,0,alpha)
    //DrawText(” ◄ S4a2W #S4a2W#”,barindex,S4a2W,Dialog,Bold,15) coloured(255,165,0,alpha)
    
    //S4b2W = ROUND(S4W-0.618 *(S1W-S4W),2)
    rem DrawSegment(startbar,SS4b,barindex,SS4b) coloured(0,0,0,alpha)
    //DrawText(” ◄ S4W 61.8% #S4b2W#”,barindex,S4b2W,Dialog,Bold,15) coloured(255,165,0,alpha)
    //S4aW =ROUND(S4W-0.25 * (S1W-S4W),2)
    //SS4x=(SS4+SS4b)/2
    rem DrawSegment(startbar,SS4,barindex,SS4) coloured(0,0,0,alpha)
    //DrawText(” ◄ S4W 25% #S4aW#”,barindex,S4aW,Dialog,Bold,12) coloured(250,250,250,alpha)
    S4x62W =ROUND(S4W-0.62 * (S1W-S4W),2)
    //SS4x=(SS4+SS4b)/2
    rem DrawSegment(startbar,SS4,barindex,SS4) coloured(0,0,0,alpha)
    DrawText(” ◄ S4W 62% #S4cW#”,barindex,S4x62W,Dialog,Bold,10) coloured(250,250,250,alpha)
    S5W = ROUND(2*S4W-S1W,2)
    rem DrawSegment(startbar,SS5,barindex,SS5) coloured(0,0,0,alpha)
    DrawText(” ◄ S5W #S5W#”,barindex,S5W,Dialog,Bold,12) coloured(250,250,250,alpha)
    S5bW = ROUND(S5W-0.5*(S5W-S6W),2)
    rem DrawSegment(startbar,SS5,barindex,SS5) coloured(0,0,0,alpha)
    DrawText(” ◄ S5bW #S5bW#”,barindex,S5bW,Dialog,Bold,12) coloured(250,250,250,alpha)
    
    S6W = ROUND(S4W-1.618*(S1W-S4W),2)
    rem DrawSegment(startbar,SS6,barindex,SS6) coloured(0,0,0,alpha)
    DrawText(” ◄ S6W #S6W#”,barindex,S6W,Dialog,Bold,12) coloured(250,250,250,alpha)
    
    S7W = ROUND(S4W-2*(S1W-S4W),2)
    rem DrawSegment(startbar,SS7,barindex,SS7) coloured(0,0,0,alpha)
    DrawText(” ◄ S7W #S7W#”,barindex,S7W,Dialog,Bold,12) coloured(250,250,250,alpha)
    
    //BasW = ROUND(Dlow(1))
    rem DrawSegment(startbar,SS7,barindex,SS7) coloured(0,0,0,alpha)
    //DrawText(” ◄ PrecBasD #BasD#”,barindex,BasD,Dialog,Bold,12) coloured(250,250,250,alpha)
    
    //HautW = ROUND(Dhigh(1))
    rem DrawSegment(startbar,SS7,barindex,SS7) coloured(0,0,0,alpha)
    //DrawText(” ◄ PrecHautD #HautD#”,barindex,HautD,Dialog,Bold,12) coloured(250,250,250,alpha)
    
    RETURN// PPW COLOURED(0,0,1) AS ” PPW” , R1W COLOURED(255,204,204) AS “R1W” , R2W COLOURED(255,204,204) AS “R2W” , R3W COLOURED(255,0,0) AS “R3W” , R3bW COLOURED(0,255,255) AS “R3bW” , R4W COLOURED(0,255,0) AS “R4W” , R4aW COLOURED(0,255,255) AS “R4aW” , R4bW COLOURED(0,255,255) AS “R4bW” , R5W COLOURED(255,255,0) AS “R5W” , R6W COLOURED(255,153,0) AS “R6W” , R7W COLOURED(255,153,0) AS “R7W” , S1W COLOURED(255,204,204) AS “S1W” , S2W COLOURED(255,204,204) AS “S2W” , S3W COLOURED(0,255,0) AS “S3W” , S3bW COLOURED(0,255,255) AS “S3bW” ,S4W COLOURED(255,0,0) AS “S4W” ,S4aW COLOURED(0,255,255) AS “S4aW” ,S4bW COLOURED(0,255,255) AS “S4bW” , S5W COLOURED(255,255,0) AS “S5W” , S6W COLOURED(255,153,0) AS “S6W” , S7W COLOURED(255,153,0) AS “S7W” ,BasD COLOURED(0,0,1) AS ” BasD”,HautD COLOURED(0,0,1) AS ” HautD”
    
    #246193 quote
    Iván González
    Moderator
    Master

    Le problème est le même que celui que je vous mentionnais dans le message précédent. En calculant le prix de clôture en journalier, vous n’obtiendrez pas le même résultat que si vous le calculez en intraday.

    #246276 quote
    Iván González
    Moderator
    Master

    Modifiez les premières lignes de votre code par celles-ci.

    DefParam DrawOnLastBarOnly = true
    
    timecheck=220000
    if opentime>timecheck and opentime[1]<=timecheck then
    closeveille=close[1]
    endif
    
    IF DAYOFWEEK < DAYOFWEEK[1] THEN
    weekhigh = prevweekhigh
    weeklow = prevweeklow
    weekclose = prevweekclose
    prevweekhigh = HIGH
    prevweeklow = LOW
    ENDIF
    
    prevweekhigh = MAX(prevweekhigh, HIGH)
    prevweeklow = MIN(prevweeklow, LOW)
    prevweekclose = closeveille
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

points camarilla weekly à ajuster


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
geroniman @geroniman Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by Iván González
9 months, 2 weeks ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 04/15/2025
Status: Active
Attachments: 1 files
Logo Logo
Loading...