DEFPARAM DrawOnLastBarOnly = true
IF IntraDayBarIndex = 0 THEN
inizio = BarIndex
ENDIF
myH = ( DHIGH(1) )
myL = ( DLOW(1) )
myC = ( DCLOSE (1) )
IF OpenDayOfWeek = 1 THEN
myH = ( DHIGH(2) )
myL = ( DLOW(2) )
myC = ( DCLOSE (2) )
ENDIF
PP = myc//PP = Previous Day’s Close
R1 = ((myH-myL) * 1.1)/12+myC
RR2 = ((myH-myL)*1.1)/6+myC // Note: RR2 is used instead of R2 since R2 is the symbol for "R squared" in probuilder language.
R3 = ((myH-myL)*1.1)/4+myC
R4 = ((myH-myL)*1.1)/2+myC
S1 = myC-((myH-myL)*1.1)/12
S2 = myC-((myH-myL)*1.1)/6
S3 = myC-((myH-myL)*1.1)/4
S4 = myC-((myH-myL)*1.1)/2
DrawSegment(Inizio,R1,BarIndex,R1) COLOURED(255,0,0) style(dottedLine,2)
DrawText("Cama R1", BarIndex+5,R1) COLOURED(255,0,0)
DrawSegment(Inizio,RR2,BarIndex,RR2) COLOURED(255,0,0) style(dottedLine,2)
DrawText("Cama R2",BarIndex+5,RR2) COLOURED(255,0,0)
DrawSegment(Inizio,R3,BarIndex,R3) COLOURED(255,0,0) style(dottedLine,2)
DrawText("Cama R3",BarIndex+5,R3) COLOURED(255,0,0)
DrawSegment(Inizio,R4,BarIndex,R4) COLOURED(255,0,0) style(dottedLine,2)
DrawText("Cama R4",BarIndex+5,R4) COLOURED(255,0,0)
DrawSegment(Inizio,S1,BarIndex,S1) COLOURED(0,180,0) style(dottedLine,2)
DrawText("Cama S1",BarIndex+5,S1) COLOURED(0,180,0)
DrawSegment(Inizio,S2,BarIndex,S2) COLOURED(0,180,0) style(dottedLine,2)
DrawText("Cama S2",BarIndex+5,S2) COLOURED(0,180,0)
DrawSegment(Inizio,S3,BarIndex,S3) COLOURED(0,180,0) style(dottedLine,2)
DrawText("Cama S3",BarIndex+5,S3) COLOURED(0,180,0)
DrawSegment(Inizio,S4,BarIndex,S4) COLOURED(0,180,0) style(dottedLine,2)
DrawText("Cama S4",BarIndex+5,S4) COLOURED(0,180,0)
DrawSegment(Inizio,PP,BarIndex,PP) COLOURED(0,0,0) style(dottedLine,2)
DrawText("Cama PP",BarIndex+5,PP) COLOURED(0,0,0)
RETURN
//RETURN R1 COLOURED(255,0,0)style(dottedLine,2) AS "CAMA R1" , RR2 COLOURED(255,0,0)style(dottedLine,2) AS "CAMA R2" , R3 COLOURED(255,0,0)style(dottedLine,2) AS "CAMA R3", R4 COLOURED(255,0,0)style(dottedLine,2) AS "CAMA R4" , S1 COLOURED(0,180,0) style(dottedLine,2)AS "CAMA S1", S2 COLOURED(0,180,0) style(dottedLine,2)AS "CAMA S2" , S3 COLOURED(0,180,0)style(dottedLine,2)AS "CAMA S3" , S4 COLOURED(0,180,0) style(dottedLine,2)AS "CAMA S4" ,PP COLOURED(0,0,0)style(line,2) AS "CAMA PP"