How it works ? - it calculates main trend direction by using the length that is user-defined. so you can change it as you wish - then it calculates trend direction for each 9 lower lengths. if you set the length = 20 then the lengths are 19, 18,...11 - and it checks if the trend directions that came from lower lengths is same or not with main trend direction. - it changes the trend color of the ribbon.