peterf1966
Experienced member
- Messages
- 1,252
- Likes
- 2
Those of you who use Camarilla indicators might like this. I've adapted it from some code
Note here I used the 1.1 formula, I have seen other versions on the web, I have no idea which is correct
Cut and paste into a new indicator then add it to your chart(s)
Note As IG opens on a Sunday etc I changed the code so that Sunday and Monday will use Fridays closing etc whereas Tues will use Mon as usual
Without warranty, maintenance or any other commitment, but let me know if it doesnt work
X--------X
REM Camarilla Pivot Points
if dayofweek=0 then
H = ( DHIGH(2) )
L = ( DLOW(2) )
C = ( DCLOSE (2) )
endif
if dayofweek=1 then
H = ( DHIGH(3) )
L = ( DLOW(3) )
C = ( DCLOSE (3) )
endif
if dayofweek>1 then
H = ( DHIGH(1) )
L = ( DLOW(1) )
C = ( DCLOSE (1) )
endif
PP = C
R1 = ((H-L) * 1.1)/12+C
RR2 = ((H-L)*1.1)/6+C // Note: RR2 is used instead of R2 since R2 is the symbol for "R squared" in probuilder language.
R3 = ((H-L)*1.1)/4+C
R4 = ((H-L)*1.1)/2+C
S1 = C-((H-L)*1.1)/12
S2 = C-((H-L)*1.1)/6
S3 = C-((H-L)*1.1)/4
S4 = C-((H-L)*1.1)/2
RETURN PP COLOURED(0,0,0) AS "CAMA PP" ,R1 COLOURED(155,155,155) AS "CAMA R1" ,RR2 COLOURED(0,0,255) AS "CAMA R2" ,R3 COLOURED(0,180,0) AS "CAMA R3" ,R4 COLOURED(255,0,0) AS "CAMA R4" ,S1 COLOURED(155,155,155) AS "CAMA S1" ,S2 COLOURED(0,0,255) AS "CAMA S2" ,S3 COLOURED(0,180,0) AS "CAMA S3" ,S4 COLOURED(255,0,0) AS "CAMA S4"
Hi, should PP be (H+C+L)/3 ?, and not just C?