Very simple representation of a trend, this one cumulate the candlesticks closes above and under a defined period of a simple moving average. Simple but yet effective to avoid classical whipsaw, i believe this indicator could help any trend followers in trading decision. Any comments are welcome !
// Parameters :
// N = 30
i1 = average[N](close)
IF (close>i1) THEN
a = a + 1
ELSE
a = a - 1
ENDIF
i2 = average[N](a)
RETURN a as "cumulated close over/under MA", i2 coloured(238,230,133) as "trend filter"