If you only need to track highest balance, then you don't need an array for that, but simply a variable. Or two: one for the balance and one for its timestamp. If you want this to survive restart, you may need to keep it on file as well. (Alternatively include an initial account history scan to recover it; though this is easily done wrong

)
The other condition, of a pair having traded 1 unit (since when the most recent
highest balance was reached [?]) requires account history processing; not too difficult either.

(Or, it could possibly be maintained as a state flag that gets raised as soon as the condition arises; less computation but requires more care to ensure it is maintained correctly )