Impec Robinhood.
Code : #
REM PP Futures sur graphiques CF.D cash (v.2)
REM Diff= CF.D cash - CF.D futures
REM Attention à bien prendre le contrat future le plus liquide (= échance la plus proche) et en lot plein
REM Exemple avec le Dow => spread à utiliser = CF.D Dow cash 10$ - CF.D Dow Futures (échéance la plus proche, 3 mois) 10$
REM Exemple avec le Nasdaq => spread à utiliser = CF.D Nasdaq cash 100$ - CF.D Nasdaq Futures (échéance la plus proche, 3 mois) 100$
REM Exemple avec le indice anglais => spread à utiliser = CF.D indice anglais cash 10£ - CF.D indice anglais Futures (échéance la plus proche, 3 mois) 10£
REM Exemple avec le Dax => spread à utiliser = CF.D Dax cash 25€ - CF.D Dax Futures (échéance la plus proche, 3 mois) 25€
REM Exemple avec le Cac => spread à utiliser = CF.D Cac cash 10€ - CF.D Cac Futures (échéance la plus proche, 1 mois) 10€
defparam drawonlastbaronly = true
///////////////////////////////////// VARIABLES /////////////////////////////////////////
// DOW
if close>20000 and close<30000 then
diff=13.7
HighJ=25832
LowJ=25625
SettlementJ=25666
HighH=26238
LowH=25872
SettlementH=26031
HighM=26238
LowM=24862
SettlementM=25913
// décalage vertical texte/lignes horizontales
Voffset=4*pointsize
endif
// NASDAQ
if close>6000 and close<8000 then
diff=-2.2
HighJ=7182.0
LowJ=7124.25
SettlementJ=7165.5
HighH=7168.5
LowH=7048.0
SettlementH=7156.0
HighM=7168.5
LowM=6841.0
SettlementM=7102.5
// décalage vertical texte/lignes horizontales
Voffset=1*pointsize
endif
// CAC
if close>4000 and close<6000 then
diff=0.9
HighJ=5314.5
LowJ=5276.5
SettlementJ=7165.5
HighH=5285.5
LowH=5195.5
SettlementH=5263
HighM=5247.5
LowM=4945
SettlementM=5239
// décalage vertical texte/lignes horizontales
Voffset=1*pointsize
endif
// DAX
if close>9000 and close<15000 then
Diff=-1.6
HighJ=11614
LowJ=11448.5
SettlementJ=11510.5
HighH=11675.5
LowH=11397
SettlementH=11599.5
HighM=11555.5
LowM=10856.5
SettlementM=11520
// décalage vertical texte/lignes horizontales
Voffset=2*pointsize
endif
////////////////////////////////////// CALCULS //////////////////////////////////////////
// POINTS PIVOTS JOURNALIERS
PPJ = (HighJ + LowJ + SettlementJ) / 3
R3J = HighJ + 2 * (PPJ - LowJ)
R2J = PPJ + (HighJ - LowJ)
R1J = (2 * PPJ) - LowJ
S1J = (2 * PPJ) - HighJ
S2J = PPJ - (HighJ - LowJ)
S3J = LowJ - 2 * (HighJ - PPJ)
HighJ=HighJ + Diff
LowJ=LowJ + Diff
SettlementJ = SettlementJ + Diff
PPJ = PPJ + Diff
R3J = R3J + Diff
R2J = R2J + Diff
R1J = R1J + Diff
S1J = S1J + Diff
S2J = S2J + Diff
S3J = S3J + Diff
midR3J = (R2J + R3J) / 2
midR2J = (R1J + R2J) / 2
midR1J = (PPJ + R1J) / 2
midS1J = (PPJ + S1J) / 2
midS2J = (S1J + S2J) / 2
midS3J = (S2J + S3J) / 2
// POINTS PIVOTS HEBDO
PPH = (HighH + LowH + SettlementH) / 3
R3H = HighH + 2 * (PPH - LowH)
R2H = PPH + (HighH - LowH)
R1H = (2 * PPH) - LowH
S1H = (2 * PPH) - HighH
S2H = PPH - (HighH - LowH)
S3H = LowH - 2 * (HighH - PPH)
HighH=HighH + Diff
LowH=LowH + Diff
SettlementH = SettlementH + Diff
PPH = PPH + Diff
R3H = R3H + Diff
R2H = R2H + Diff
R1H = R1H + Diff
S1H = S1H + Diff
S2H = S2H + Diff
S3H = S3H + Diff
midR3H = (R2H + R3H) / 2
midR2H = (R1H + R2H) / 2
midR1H = (PPH + R1H) / 2
midS1H = (PPH + S1H) / 2
midS2H = (S1H + S2H) / 2
midS3H = (S2H + S3H) / 2
// POINTS PIVOTS MENSUELS
PPM = (HighM + LowM + SettlementM) / 3
R3M = HighM + 2 * (PPM - LowM)
R2M = PPM + (HighM - LowM)
R1M = (2 * PPM) - LowM
S1M = (2 * PPM) - HighM
S2M = PPM - (HighM - LowM)
S3M = LowM - 2 * (HighM - PPM)
HighM=HighM + Diff
LowM=LowM + Diff
SettlementM = SettlementM + Diff
PPM = PPM + Diff
R3M = R3M + Diff
R2M = R2M + Diff
R1M = R1M + Diff
S1M = S1M + Diff
S2M = S2M + Diff
S3M = S3M + Diff
midR3M = (R2M + R3M) / 2
midR2M = (R1M + R2M) / 2
midR1M = (PPM + R1M) / 2
midS1M = (PPM + S1M) / 2
midS2M = (S1M + S2M) / 2
midS3M = (S2M + S3M) / 2
/////////////////////////////////// NIVEAUX RONDS ///////////////////////////////////////
milieu = SettlementJ
centaine = round(milieu/100) * 100
lp1 = centaine + 50
lp2 = centaine + 100
lp3 = centaine + 150
lp4 = centaine + 200
lm1 = centaine - 50
lm2 = centaine - 100
lm3 = centaine - 150
lm4 = centaine - 200
///////////////////////////////////// AFFICHAGE /////////////////////////////////////////
DRAWTEXT("Haut J",barindex-4,HighJ+Voffset,SansSerif,Bold)coloured(127,255,212)
DRAWTEXT("Bas J",barindex-4,LowJ+Voffset,SansSerif,Bold)coloured(127,255,212)
DRAWTEXT("Haut H",barindex-4,HighH+Voffset,SansSerif,Bold)coloured(127,255,212)
DRAWTEXT("Bas H",barindex-4,LowH+Voffset,SansSerif,Bold)coloured(127,255,212)
DRAWTEXT("Haut M",barindex-4,HighM+Voffset,SansSerif,Bold)coloured(127,255,212)
DRAWTEXT("Bas M",barindex-4,LowM+Voffset,SansSerif,Bold)coloured(127,255,212)
DRAWTEXT("Settle J",barindex-4,SettlementJ+Voffset,SansSerif,Bold)coloured(255,255,0)
DRAWTEXT("Settle H",barindex-4,SettlementH+Voffset,SansSerif,Bold)coloured(255,255,0)
DRAWTEXT("Settle M",barindex-4,SettlementM+Voffset,SansSerif,Bold)coloured(255,255,0)
DRAWTEXT("Piv J",barindex-4,PPJ+Voffset,SansSerif,Bold)coloured(0, 0, 0)
DRAWTEXT("Piv H",barindex-4,PPH+Voffset,SansSerif,Bold)coloured(0, 0, 0)
DRAWTEXT("Piv M",barindex-4,PPM+Voffset,SansSerif,Bold)coloured(0, 0, 0)
DRAWTEXT("R3J",barindex-4,R3J+Voffset,SansSerif,Bold)coloured(255, 0, 0)
DRAWTEXT("R2J",barindex-4,R2J+Voffset,SansSerif,Bold)coloured(255, 0, 0)
DRAWTEXT("R1J",barindex-4,R1J+Voffset,SansSerif,Bold)coloured(255, 0, 0)
DRAWTEXT("S1J",barindex-4,S1J+Voffset,SansSerif,Bold)coloured(0, 128, 0)
DRAWTEXT("S2J",barindex-4,S2J+Voffset,SansSerif,Bold)coloured(0, 128, 0)
DRAWTEXT("S3J",barindex-4,S3J+Voffset,SansSerif,Bold)coloured(0, 128, 0)
DRAWTEXT("R3H",barindex-4,R3H+Voffset,SansSerif,Bold)coloured(255, 0, 0)
DRAWTEXT("R2H",barindex-4,R2H+Voffset,SansSerif,Bold)coloured(255, 0, 0)
DRAWTEXT("R1H",barindex-4,R1H+Voffset,SansSerif,Bold)coloured(255, 0, 0)
DRAWTEXT("S1H",barindex-4,S1H+Voffset,SansSerif,Bold)coloured(0, 128, 0)
DRAWTEXT("S2H",barindex-4,S2H+Voffset,SansSerif,Bold)coloured(0, 128, 0)
DRAWTEXT("S3H",barindex-4,S3H+Voffset,SansSerif,Bold)coloured(0, 128, 0)
DRAWTEXT("R3M",barindex-4,R3M+Voffset,SansSerif,Bold)coloured(255, 0, 0)
DRAWTEXT("R2M",barindex-4,R2M+Voffset,SansSerif,Bold)coloured(255, 0, 0)
DRAWTEXT("R1M",barindex-4,R1M+Voffset,SansSerif,Bold)coloured(255, 0, 0)
DRAWTEXT("S1M",barindex-4,S1M+Voffset,SansSerif,Bold)coloured(0, 128, 0)
DRAWTEXT("S2M",barindex-4,S2M+Voffset,SansSerif,Bold)coloured(0, 128, 0)
DRAWTEXT("S3M",barindex-4,S3M+Voffset,SansSerif,Bold)coloured(0, 128, 0)
DRAWTEXT("midR3J",barindex-4,midR3J+Voffset,SansSerif,Bold)coloured(255, 0, 0)
DRAWTEXT("midR2J",barindex-4,midR2J+Voffset,SansSerif,Bold)coloured(255, 0, 0)
DRAWTEXT("midR1J",barindex-4,midR1J+Voffset,SansSerif,Bold)coloured(255, 0, 0)
DRAWTEXT("midS1J",barindex-4,midS1J+Voffset,SansSerif,Bold)coloured(0, 128, 0)
DRAWTEXT("midS2J",barindex-4,midS2J+Voffset,SansSerif,Bold)coloured(0, 128, 0)
DRAWTEXT("midS3J",barindex-4,midS3J+Voffset,SansSerif,Bold)coloured(0, 128, 0)
DRAWTEXT("midR3H",barindex-4,midR3H+Voffset,SansSerif,Bold)coloured(255, 0, 0)
DRAWTEXT("midR2H",barindex-4,midR2H+Voffset,SansSerif,Bold)coloured(255, 0, 0)
DRAWTEXT("midR1H",barindex-4,midR1H+Voffset,SansSerif,Bold)coloured(255, 0, 0)
DRAWTEXT("midS1H",barindex-4,midS1H+Voffset,SansSerif,Bold)coloured(0, 128, 0)
DRAWTEXT("midS2H",barindex-4,midS2H+Voffset,SansSerif,Bold)coloured(0, 128, 0)
DRAWTEXT("midS3H",barindex-4,midS3H+Voffset,SansSerif,Bold)coloured(0, 128, 0)
DRAWTEXT("midR3M",barindex-4,midR3M+Voffset,SansSerif,Bold)coloured(255, 0, 0)
DRAWTEXT("midR2M",barindex-4,midR2M+Voffset,SansSerif,Bold)coloured(255, 0, 0)
DRAWTEXT("midR1M",barindex-4,midR1M+Voffset,SansSerif,Bold)coloured(255, 0, 0)
DRAWTEXT("midS1M",barindex-4,midS1M+Voffset,SansSerif,Bold)coloured(0, 128, 0)
DRAWTEXT("midS2M",barindex-4,midS2M+Voffset,SansSerif,Bold)coloured(0, 128, 0)
DRAWTEXT("midS3M",barindex-4,midS3M+Voffset,SansSerif,Bold)coloured(0, 128, 0)
DRAWHLINE(lp1) COLOURED(255, 127, 80, 0)
DRAWHLINE(lp2) COLOURED(255, 127, 80)
DRAWHLINE(lp3) COLOURED(255, 127, 80, 0)
DRAWHLINE(lp4) COLOURED(255, 127, 80)
DRAWHLINE(lm1) COLOURED(255, 127, 80, 0)
DRAWHLINE(lm2) COLOURED(255, 127, 80)
DRAWHLINE(lm3) COLOURED(255, 127, 80, 0)
DRAWHLINE(lm4) COLOURED(255, 127, 80)
Return HighJ COLOURED(127, 255, 212) STYLE(DOTTEDLINE) AS "HighJ", LowJ COLOURED(127,255,212) STYLE(DOTTEDLINE) AS "LowJ", HighH COLOURED(127, 255, 212) STYLE(DOTTEDLINE) AS "HighH", LowH COLOURED(127,255,212) STYLE(DOTTEDLINE) AS "LowH", HighM COLOURED(127, 255, 212) STYLE(DOTTEDLINE) AS "HighM", LowM COLOURED(127,255,212) STYLE(DOTTEDLINE) AS "LowM", SettlementJ COLOURED(255,255,0) STYLE(DOTTEDLINE) AS "SettlementJ", SettlementH COLOURED(255,255,0) STYLE(DOTTEDLINE) AS "SettlementH", SettlementM COLOURED(255,255,0) STYLE(DOTTEDLINE) AS "SettlementM", PPJ COLOURED(0,0,0) STYLE(LINE) AS "PPJ", PPH COLOURED(0,0,0) STYLE(LINE) AS "PPH", PPM COLOURED(0,0,0) STYLE(LINE) AS "PPM", S1J COLOURED(0, 128, 0) STYLE(LINE) AS "S1J", S2J COLOURED(0, 128, 0) STYLE(LINE) AS "S2J", S3J COLOURED(0, 128, 0) STYLE(LINE) AS "S3J", S1H COLOURED(0, 128, 0) STYLE(LINE) AS "S1H", S2H COLOURED(0, 128, 0) STYLE(LINE) AS "S2H", S3H COLOURED(0, 128, 0) STYLE(LINE) AS "S3H", S1M COLOURED(0, 128, 0) STYLE(LINE) AS "S1M", S2M COLOURED(0, 128, 0) STYLE(LINE) AS "S2M", S3M COLOURED(0, 128, 0) STYLE(LINE) AS "S3M", R1J COLOURED(255, 0, 0) STYLE(LINE) AS "R1J", R2J COLOURED(255, 0, 0) STYLE(LINE) AS "R2J", R3J COLOURED(255, 0, 0) STYLE(LINE) AS "R3J", R1H COLOURED(255, 0, 0) STYLE(LINE) AS "R1H", R2H COLOURED(255, 0, 0) STYLE(LINE) AS "R2H", R3H COLOURED(255, 0, 0) STYLE(LINE) AS "R3H", R1M COLOURED(255, 0, 0) STYLE(LINE) AS "R1M", R2M COLOURED(255, 0, 0) STYLE(LINE) AS "R2M", R3M COLOURED(255, 0, 0) STYLE(LINE) AS "R3M", midS1J COLOURED(0, 128, 0) STYLE(DOTTEDLINE) AS "midS1J", midS2J COLOURED(0, 128, 0) STYLE(DOTTEDLINE) AS "midS2J", midS3J COLOURED(0, 128, 0) STYLE(DOTTEDLINE) AS "midS3J", midS1H COLOURED(0, 128, 0) STYLE(DOTTEDLINE) AS "midS1H", midS2H COLOURED(0, 128, 0) STYLE(DOTTEDLINE) AS "midS2H", midS3H COLOURED(0, 128, 0) STYLE(DOTTEDLINE) AS "midS3H", midS1M COLOURED(0, 128, 0) STYLE(DOTTEDLINE) AS "midS1M", midS2M COLOURED(0, 128, 0) STYLE(DOTTEDLINE) AS "midS2M", midS3M COLOURED(0, 128, 0) STYLE(DOTTEDLINE) AS "midS3M", midR1J COLOURED(255, 0, 0) STYLE(DOTTEDLINE) AS "midR1J", midR2J COLOURED(255, 0, 0) STYLE(DOTTEDLINE) AS "midR2J", midR3J COLOURED(255, 0, 0) STYLE(DOTTEDLINE) AS "midR3J", midR1H COLOURED(255, 0, 0) STYLE(DOTTEDLINE) AS "midR1H", midR2H COLOURED(255, 0, 0) STYLE(DOTTEDLINE) AS "midR2H", midR3H COLOURED(255, 0, 0) STYLE(DOTTEDLINE) AS "midR3H", midR1M COLOURED(255, 0, 0) STYLE(DOTTEDLINE) AS "midR1M", midR2M COLOURED(255, 0, 0) STYLE(DOTTEDLINE) AS "midR2M", midR3M COLOURED(255, 0, 0) STYLE(DOTTEDLINE) AS "midR3M", lp1 COLOURED(255, 127, 80) STYLE (DOTTEDLINE) AS "Niveau50", lp2 COLOURED(255, 127, 80) AS "Niveau100", lp3 COLOURED(255, 127, 80) STYLE (DOTTEDLINE) AS "Niveau150", lp4 COLOURED(255, 127, 80) AS "Niveau200", lm1 COLOURED(255, 127, 80) STYLE (DOTTEDLINE) AS "Niveau50", lm2 COLOURED(255, 127, 80) AS "Niveau100", lm3 COLOURED(255, 127, 80) STYLE (DOTTEDLINE) AS "Niveau150", lm4 COLOURED(255, 127, 80) AS "Niveau200"
Je crois qu'on est bon.