Forgive me as I am no mathematician.
What would be appropriate ways of defining “almost flat” mathematically ?
I have a rolling series of values that are the output of a moving average function.
The goal is to identify when the trend is flat or “almost flat”.
We are also talking about what are numerically small changes (i.e. behind the decimal point).
For example, something like this would be classified as a light down trend :
1.22122
1.22058
1.22019
1.21970
1.21930
However, something like this would be “almost flat”:
1.21564
1.21550
1.21552
1.21543
1.21578
I have tried to do a little research on the matter, and once possibility I’ve come up with is linear regression slope, but given the small changes between values, from my limited understanding I think that would be better suited to more significant changes