The idea is to characterize recent curve shape (momentum) with numbers.
A positive curve value combined with positive Slope Calculation ought to mean a new local low (for now).
Not perfect. Maybe others can add to this. Lookback window plays a huge role. Comments in the code.
Positive value: Sort of bowl-shaped.
Negative value: Sort of hat-shaped.