Just looking for some assistance with the formulation of an indicator which shows when a chart is in an uptrend, in a horizontal trading range or in a down trend.
Just looking at a chart, these different zones are obvious, but coding an indicator is a little more tricky. When you overlay a 200day MA over the chart, it becomes clearer again. So I figured if I could calculate the slope of the MA, it will give me the answer, ie a slope of 0 - means flat trading range, positive slope means uptrend and negative slope means downtrend. I had very limited success with the linregslope function and have not been happy with the results. Just curious as to what the others use for this purpose.