It is a simple indicator based on the upward or downward crossing of momentum with its average. Obviously it can be improved and if someone has the chance to try it and improve it well and let me know.
periodi = 20
sma = 5
valoresopra = 25
valoresotto = 8
Offset = 4 * pipsize
mom = momentum[periodi](close)
momsma = wilderAverage[sma](momentum[periodi](close))
c1 = (mom < -valoresotto)
c2 = (momsma CROSSES under mom)
c3 = (mom > valoresopra)
c4 = (momsma CROSSES over mom)
IF c1 AND c2 THEN
DRAWARROWUP(barindex, LOW - offset) COLOURED(50,205,50)
ENDIF
IF c3 AND c4 THEN
DRAWARROWdown(barindex, high + offset) COLOURED(255,0,0)
ENDIF
RETURN