How to keep the highest value ever reached?

hello…

i thought in the meantime i know vvvv pretty well. but now i stumbled over a problem that seamed easy to me in the first time but now cant find a solution that works…

i like to do a node that keeps the highest value that an index have ever reached, as long the changes under this highest point, nothing happens, as soon it rises above it this threshold point moves further…

i played around with sample and hold, frame difference etc… didnt work…

hope anyone can help…
cheers ele

ups after a few hours of kopfzerbrechen i just found a sloution by myself…

and its so simple, sometimes i just think to far.

i attached the patch is here if someones interested…

cheers
ele

KeepMaxValue.v4p (4.0 kB)

It could even be simpler…

see the screenshots