Make several simple calculations and see which one works for you on sample/real data. *slope / gradient (as mentioned in other replies) *keep 6/10/12 etc.. Most recent highs - to get a rolling average of them. *Exponential moving average (more responsive that a moving avergage) Collect a few of these and you will find that one of them in comparison to the others gives you the indication than the samples are 'out of band'. Which is what I understand you to be seeking. Most of the calculations above can be maintained on a rolling basis without having to keep too much data.
M
MartinW1307
@MartinW1307