If someone could please help me with this code I got for Bill Williams fractals (prorealtime). I don't know what [PC] should be? The variables can be 2,or 5. When I tried to put it on my price chart, it shorten all the candlesticks. I would appreciate any help. Thanks
//CP=variables -default=2
if high[PC]>=highest[2*CP+1](high) then
LH=1
else
LH=0
endif
if low[PC]<=lowest[2*CP+1](low)then
LL=-1
else
LL=0
endif
if LH=1 then
HiL=high[CP]
endif
if LL=-1then
LoL=low[CP]
endif
LoL coloured return(255,0,0) as "low" coloured HiL(0,255,0) as "high"
////////////end
//CP=variables -default=2
if high[PC]>=highest[2*CP+1](high) then
LH=1
else
LH=0
endif
if low[PC]<=lowest[2*CP+1](low)then
LL=-1
else
LL=0
endif
if LH=1 then
HiL=high[CP]
endif
if LL=-1then
LoL=low[CP]
endif
LoL coloured return(255,0,0) as "low" coloured HiL(0,255,0) as "high"
////////////end