This indicator is based on adjustable artificial high and low values. The average filter regression is a kind of smoothed path between the price movements particular at higher percentages of high and low
p = 10
percentage = p/100
MyHigh = close + close * percentage
MyLow = close - close * percentage
ONCE AFR = medianprice
IF MyLow > AFR THEN
AFR = MyLow
ENDIF
IF MyHigh < AFR THEN
AFR = MyHigh
ENDIF
IF Close > AFR THEN
DRAWPOINT(barindex, close, 1)coloured(0,51,255)
DRAWSEGMENT(barindex, high, barindex, low)coloured(0,0,255)
ELSE
DRAWPOINT(barindex, close, 1)coloured(251,0,255)
DRAWSEGMENT(barindex, high, barindex, low)coloured(255,0,255)
ENDIF
RETURN Close, AFR