Set user variable
Name: high_level
Value: IF(total_funds>high_level,total_funds,high_level)
The above is for real mode.
You could run the trigger periodically, or after each market.
A constant is just that (stays the same). A variable changes. In the above example you would set a constant to initialise the high_level variable. e.g value=0 to start, or to reset a variable at the start of each new market, or day etc.
Here is the value formula which should work with both test mode and real mode. I have not tested it so please try it using test mode.
IF(test_mode=1,IF(test_funds>high_level,test_funds,high_level),IF(total_funds>high_level,total_funds,high_level))