daystoconfirmuptrend = 50
cPrc1 = (close > Average[daysToConfirmUpTrend](close) AND Close > close [1])
maxDay = 10
maxDownDay = 0
maxdown = 0
FOR d = 1 TO maxDay DO
r = Close[d] - close[d+1]
IF r <0 and volume[d]> maxDown THEN
maxDown = volume[d]
maxDownDay = d
ENDIF
NEXT
IF maxDownday = 0 THEN
maxDowndayVol=0
ELSE
maxDowndayvol = volume[maxdownday]
ENDIF
cVol2 = (volume > maxDownDayvol)
cVol3=(volume > average[50] (volume))
Cprc2 = (close >= Average[20](close))
Cprc3 = (close CROSSES OVER Average[10](close) OR Close CROSSES OVER Average[50](close))
cPrc11 = (close > (high + low) *0.5)
ind1 = (cPrc1 AND cPrc2 AND (cPrc3 OR 1) AND cVol2 AND cvol3 and (cPrc11 OR 1))
RETURN ind1 COLOURED (0,0,200) AS "Pivot Pocket Vol50"
daystoconfirmuptrend = 50
cPrc1 = (close > Average[daysToConfirmUpTrend](close) AND Close > close [1])
maxDay = 10
maxDownDay = 0
maxdown = 0
FOR d = 1 TO maxDay DO
r = Close[d] - close[d+1]
IF r <0 and volume[d]> maxDown THEN
maxDown = volume[d]
maxDownDay = d
ENDIF
NEXT
IF maxDownday = 0 THEN
maxDowndayVol=0
ELSE
maxDowndayvol = volume[maxdownday]
ENDIF
cVol2 = (volume > maxDownDayvol)
cVol3=(volume > average[50] (volume))
Cprc2 = (close >= Average[20](close))
Cprc3 = (close CROSSES OVER Average[10](close) OR Close CROSSES OVER Average[50](close))
cPrc11 = (close > (high + low) *0.5)
ind1 = (cPrc1 AND cPrc2 AND (cPrc3 OR 1) AND cVol2 AND cvol3 and (cPrc11 OR 1))
SCREENER [IND1]