I'm looking to find the maximum value in a trend during the current time duration. So, for instance, in an osculating trend of 6 hours, what would the maximum value be? I also want to be able to use that value in a formula with another signal. Right now, I am able to find the max value, but it says that it's scalar and can't be used in a formula. I tired the .toSignal(), but that gives an error.