it’s a breakout strategy that uses multiple Pivot Point’s averages.
How it works?
You have two options:
(description from original author LonesomeTheBlue)
//PRC_Pivot Trend | indicator
//17.04.23
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
//author: LonesomeTheBlue
// --- settings
prd = 4 //Pivot Point Period
pnum = 3 //number of PP to check
// --- end of settings
once BarsAfter = prd
once BarsBefore = prd
once BarLookBack = prd + 1
IF low[BarsAfter] < lowest[BarsBefore](low)[BarLookBack] THEN
IF low[BarsAfter] = lowest[BarLookBack](low) THEN
$pllev[x] = low[BarsAfter]
x=x+1
ENDIF
ENDIF
IF high[BarsAfter] > highest[BarsBefore](high)[BarLookBack] THEN
IF high[BarsAfter] = highest[BarLookBack](high) THEN
$phlev[y] = high[BarsAfter]
y=y+1
ENDIF
ENDIF
lrate = 0.0
for i = 0 to lastset($pllev) - 1
rate = (close - $pllev[i]) / $pllev[i]
lrate = lrate+(rate / pnum)
next
hrate = 0.0
for i = 1 to lastset($phlev) - 1
rate = (close - $phlev[i]) / $phlev[i]
hrate = hrate+(rate / pnum)
next
trend = 0
if hrate>0 and lrate>0 then
trend=1
elsif hrate<0 and lrate<0 then
trend=-1
endif
if trend=1 then
r=33
r=150
b=243
elsif trend=-1 then
r=255
g=152
b=0
endif
colorbetween(hrate,lrate,r,g,b,40)
mid = average[9]((hrate + lrate) / 2)
if mid>=0 then
if mid>=mid[1] then
cr=33
cg=150
cb=243
else
cr=49
cg=27
cb=146
endif
else
if mid<=mid[1] then
cr=255
cg=82
cb=82
else
cr=255
cg=152
cb=0
endif
endif
return hrate coloured("red") style(line,2), lrate coloured("lime") style(line,2), mid style(line,2) coloured(cr,cg,cb),0 style(dottedline2) coloured("grey")