I started using/coding PRT last month, so please be kind. This is my first indicator, good for entry/exit positions.
Based on Bollinger Bands percentage width, it gives signals when bands are exiting from previous contraction periods.
MyBoll = (close[0] - BollingerDown)/(BollingerUp - BollingerDown)*100
MyBoll2 = (high[0] - BollingerDown)/(BollingerUp - BollingerDown)*100
MyBoll3 = (Low[0] - BollingerDown)/(BollingerUp - BollingerDown)*100
X = (myBoll2[0] + myBoll2[1] + myBoll2[2]) /3
Y = (myBoll3[0] + myBoll3[1] + myBoll3[2]) /3
rge = averagetruerange[10](close)
if MyBoll >= 50 THEN
upBoll = X > 100
downBOLL = 0
ELSE
upBOLL = 0
downBOLL = Y < 0
ENDIF
If upBOLL[1] > 0 and upBOLL = 0 then
DRAWARROWDOWN(barindex[1],high[1]+rge)coloured(249,0,224)
endif
if downboll[1] > 0 and downboll = 0 then
DRAWARROWUP(barindex[1],low[1]-rge)coloured(0,249,45)
endif
RETURN