I was thinking something like this for either 50, 100, 200 as they move slower, but not sure if there is a better way:
Here is an image.
We can clearly see the red moving average is in a uptrend, along with the whitish yellow color below it
Code:
uptrend = SimpleMovingAvg(close, 100) > SimpleMovingAvg(close, 100)[10];
Here is an image.
We can clearly see the red moving average is in a uptrend, along with the whitish yellow color below it